3 # Copyright (C) 2011-2012 OpenWrt.org
6 _ubootenv_add_uci_config
() {
15 set ubootenv.@$cfgtype[-1].dev='$dev'
16 set ubootenv.@$cfgtype[-1].offset='$offset'
17 set ubootenv.@$cfgtype[-1].envsize='$envsize'
18 set ubootenv.@$cfgtype[-1].secsize='$secsize'
19 set ubootenv.@$cfgtype[-1].numsec='$numsec'
24 ubootenv_add_uci_config
() {
25 _ubootenv_add_uci_config
"ubootenv" "$@"
28 ubootenv_add_uci_sys_config
() {
29 _ubootenv_add_uci_config
"ubootsys" "$@"
32 ubootenv_add_app_config
() {
39 config_get cfgtype
"$1" TYPE
40 config_get dev
"$1" dev
41 config_get offset
"$1" offset
42 config_get envsize
"$1" envsize
43 config_get secsize
"$1" secsize
44 config_get numsec
"$1" numsec
45 grep -q "^[[:space:]]*${dev}[[:space:]]*${offset}" "/etc/fw_${cfgtype#uboot}.config" || echo "$dev $offset $envsize $secsize $numsec" >>"/etc/fw_${cfgtype#uboot}.config"