apm821xx: MX60(W): enable u-boot environment
[openwrt/openwrt.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 esac
21
22 config_load ubootenv
23 config_foreach ubootenv_add_app_config ubootenv
24
25 exit 0