mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
49 lines
1.0 KiB
Bash
49 lines
1.0 KiB
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
|
|
cmcc,rax3000m-emmc |\
|
|
glinet,gl-mt6000 |\
|
|
jdcloud,re-cp-03)
|
|
env_dev=$(find_mmc_part "u-boot-env")
|
|
[ -n "$env_dev" ] && ubootenv_add_uci_config "$env_dev" "0" "0x80000"
|
|
;;
|
|
*360,t7* |\
|
|
livinet,zr-3020*)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" "1"
|
|
;;
|
|
h3c,nx30pro |\
|
|
*clt,r30b1* |\
|
|
cmcc,rax3000m)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x80000" "0x20000" "4"
|
|
;;
|
|
*imou,lc-hx3001*)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x80000" "0x80000" "1"
|
|
;;
|
|
xiaomi,mi-router-ax3000t* |\
|
|
xiaomi,mi-router-wr30u* |\
|
|
xiaomi,redmi-router-ax6000*)
|
|
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x10000" "0x20000" "1"
|
|
;;
|
|
nradio,wt9103 |\
|
|
*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
|