kernel: move mv88e6xxx fix to generic backports
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / cns3xxx
1 #
2 # Copyright (C) 2013 OpenWrt.org
3 #
4
5 [ -e /etc/config/ubootenv ] && exit 0
6
7 touch /etc/config/ubootenv
8
9 . /lib/uboot-envtools.sh
10 . /lib/functions.sh
11
12 board=$(board_name)
13
14 case "$board" in
15 laguna)
16 # Laguna uboot env size/erasesize vary depending on NOR vs SPI FLASH
17 size=$(grep mtd1 /proc/mtd | awk '{print $2}')
18 erasesize=$(grep mtd1 /proc/mtd | awk '{print $3}')
19 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x$size" "0x$erasesize"
20 ;;
21 esac
22
23 config_load ubootenv
24 config_foreach ubootenv_add_app_config ubootenv
25
26 exit 0