uboot-envtools: Apply ramips device renames
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / ramips
1 #!/bin/sh
2 #
3 # Copyright (C) 2011-2012 OpenWrt.org
4 #
5
6 [ -e /etc/config/ubootenv ] && exit 0
7
8 touch /etc/config/ubootenv
9
10 . /lib/uboot-envtools.sh
11 . /lib/functions.sh
12
13 board=$(board_name)
14
15 case "$board" in
16 alfa-network,ac1200rm|\
17 alfa-network,awusfree1|\
18 alfa-network,tube-e4g)
19 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
20 ;;
21 allnet,all0256n-4m|\
22 allnet,all0256n-8m|\
23 allnet,all5002)
24 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
25 ;;
26 buffalo,wsr-1166dhp|\
27 buffalo,wsr-600dhp|\
28 mediatek,linkit-smart-7688|\
29 samknows,whitebox-v8|\
30 xiaomi,miwifi-nano|\
31 zbtlink,zbt-wg2626)
32 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
33 ;;
34 xiaomi,mir3p|\
35 xiaomi,mir3g)
36 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
37 ;;
38 esac
39
40 config_load ubootenv
41 config_foreach ubootenv_add_app_config ubootenv
42
43 exit 0