mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
37 lines
705 B
Bash
37 lines
705 B
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2011-2012 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
|
|
*360,t7* |\
|
|
livinet,zr-3020*)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" "1"
|
|
;;
|
|
h3c,nx30pro |\
|
|
cmcc,rax3000m)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x80000" "0x20000" "4"
|
|
;;
|
|
xiaomi,mi-router-wr30u* |\
|
|
xiaomi,redmi-router-ax6000*)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x10000" "0x20000" "1"
|
|
;;
|
|
*konka,komi-a31*)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x80000" "1"
|
|
;;
|
|
esac
|
|
|
|
config_load ubootenv
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
exit 0
|