Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / package / boot / uboot-envtools / files / apm821xx
1 #!/bin/sh
2
3 [ -e /etc/config/ubootenv ] && exit 0
4
5 touch /etc/config/ubootenv
6
7 . /lib/uboot-envtools.sh
8 . /lib/functions.sh
9
10 board=$(board_name)
11
12 case "$board" in
13 meraki,mr24)
14         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000" "4"
15         ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "4"
16         ;;
17 meraki,mx60)
18         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "4"
19         ;;
20 netgear,wndap620|\
21 netgear,wndap660)
22         ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000" "4"
23         ;;
24 esac
25
26 config_load ubootenv
27 config_foreach ubootenv_add_app_config ubootenv
28
29 exit 0