aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-envtools
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-07-12 16:49:12 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-07-20 04:11:05 +0100
commit6b2000b6ff19165d33b7f67fb7275334cbf80395 (patch)
tree0d23a32a621d61a16815c344fe13300cac8174d0 /package/boot/uboot-envtools
parenta71fa5e4766d2fba5b8195bbfdaae5d488797b69 (diff)
downloadupstream-6b2000b6ff19165d33b7f67fb7275334cbf80395.tar.gz
upstream-6b2000b6ff19165d33b7f67fb7275334cbf80395.tar.bz2
upstream-6b2000b6ff19165d33b7f67fb7275334cbf80395.zip
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>
Diffstat (limited to 'package/boot/uboot-envtools')
-rw-r--r--package/boot/uboot-envtools/files/mediatek_mt762325
1 files changed, 25 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/files/mediatek_mt7623 b/package/boot/uboot-envtools/files/mediatek_mt7623
new file mode 100644
index 0000000000..863c8bc211
--- /dev/null
+++ b/package/boot/uboot-envtools/files/mediatek_mt7623
@@ -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