[kernel/2.6.37] refresh patches
[openwrt.git] / package / uboot-envtools / files / uboot-envtools.init
1 #!/bin/sh /etc/rc.common
2 # (C) 2011 OpenWrt.org
3 # Creates /etc/fw_env.conf for fw_printenv (and fw_setenv)
4
5 START=80
6
7 create_fwenv_config() {
8 local dev
9 local offset
10 local envsize
11 local secsize
12 local numsec
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
19 }
20
21 start() {
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
24 config_load ubootenv
25 config_foreach create_fwenv_config ubootenv
26 }
27 }
This page took 0.046575 seconds and 5 git commands to generate.