[openwrt/openwrt] ramips: Add support command fw_setsys for Xiaomi routers
LEDE Commits
lede-commits at lists.infradead.org
Sat Aug 6 13:29:17 PDT 2022
chunkeey pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/ecf0dc7055fa8133560f12367f359f44709d133c
commit ecf0dc7055fa8133560f12367f359f44709d133c
Author: Oleg S <remittor at gmail.com>
AuthorDate: Tue Jul 19 15:06:50 2022 +0300
ramips: Add support command fw_setsys for Xiaomi routers
The system parameters are contained in the Bdata partition.
To use the fw_setsys command, you need to create a file
fw_sys.config.
This file is created after calling the functions
ubootenv_add_uci_sys_config and ubootenv_add_app_config.
Signed-off-by: Oleg S <remittor at gmail.com>
[ wrapped commit description to 72 char ]
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
(cherry picked from commit 6c7e337c80f92693c2ca628a4a56aeaec4cc3ca8)
---
package/boot/uboot-envtools/files/ramips | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips
index d97c812881..eb391218c1 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -35,10 +35,7 @@ buffalo,wsr-1166dhp|\
buffalo,wsr-600dhp|\
mediatek,linkit-smart-7688|\
samknows,whitebox-v8|\
-xiaomi,mi-router-3g-v2|\
-xiaomi,mi-router-4a-gigabit|\
xiaomi,mi-router-4c|\
-xiaomi,miwifi-3c|\
xiaomi,miwifi-nano|\
zbtlink,zbt-wg2626|\
zte,mf283plus)
@@ -59,13 +56,22 @@ linksys,ea7300-v1|\
linksys,ea7300-v2|\
linksys,ea7500-v2|\
linksys,ea8100-v1|\
-linksys,ea8100-v2|\
+linksys,ea8100-v2)
+ ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
+ ;;
+xiaomi,mi-router-3g-v2|\
+xiaomi,mi-router-4a-gigabit|\
+xiaomi,miwifi-3c)
+ ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
+ ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
+ ;;
xiaomi,mi-router-3g|\
xiaomi,mi-router-3-pro|\
xiaomi,mi-router-4|\
xiaomi,mi-router-ac2100|\
xiaomi,redmi-router-ac2100)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
+ ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
;;
zyxel,nr7101)
idx="$(find_mtd_index Config)"
More information about the lede-commits
mailing list