1 #!/bin/sh /etc/rc.common
3 # Creates /etc/fw_env.conf for fw_printenv (and fw_setenv)
7 create_fwenv_config
() {
13 config_get dev
"$1" dev
14 config_get offset
"$1" offset
"0x0000"
15 config_get envsize
"$1" envsize
16 config_get secsize
"$1" secsize
17 config_get numsec
"$1" numsec
18 echo "$dev $offset $envsize $secsize $numsec" >>/etc
/fw_env.config
22 [ ! -e /etc
/fw_env.config
] && {
23 echo "# MTD device name Device offset Env. size Flash sector size Number of sectors" >/etc
/fw_env.config
25 config_foreach create_fwenv_config ubootenv