aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-02-12 03:09:39 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-02-28 01:23:48 +0000
commit42f3efec962cd4ce0189976fa5b9f293e79eb4e0 (patch)
treedb864ce914fc349b38ab7b320a0d72f6383691fe /package
parented5000431940c0c8ae2b5704faa0ceb68a299102 (diff)
downloadupstream-42f3efec962cd4ce0189976fa5b9f293e79eb4e0.tar.gz
upstream-42f3efec962cd4ce0189976fa5b9f293e79eb4e0.tar.bz2
upstream-42f3efec962cd4ce0189976fa5b9f293e79eb4e0.zip
uboot-envtools: add defaults for linksys-e8450-ubi
Add U-Boot environment configuration for the Linksys E8450 (UBI) to allow access to the bootloader environment from OpenWrt via 'fw_printenv' and 'fw_setenv'. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package')
-rw-r--r--package/boot/uboot-envtools/files/mediatek25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/files/mediatek b/package/boot/uboot-envtools/files/mediatek
new file mode 100644
index 0000000000..c821a1f25a
--- /dev/null
+++ b/package/boot/uboot-envtools/files/mediatek
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# 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
+"linksys,e8450-ubi")
+ ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+ ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0