mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
uboot-envtools: add configuration for Bananapi BPi-R2
Add fw_env configuration for the BPi-R2 which is a mediatek/mt7623 devboard which can be booted from SD Card or eMMC. Auto detect the boot device and add environment accordingly. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
a71fa5e476
commit
6b2000b6ff
25
package/boot/uboot-envtools/files/mediatek_mt7623
Normal file
25
package/boot/uboot-envtools/files/mediatek_mt7623
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
bananapi,bpi-r2)
|
||||
. /lib/upgrade/common.sh
|
||||
export_bootdevice
|
||||
export_partdevice ubootpart 1
|
||||
ubootenv_add_uci_config "/dev/$ubootpart" "0xb0000" "0x10000" "0x10000" "1"
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config ubootenv
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user