1#!/bin/sh 2# 3# Copyright (C) 2013-2014 OpenWrt.org 4# 5 6[ -e /etc/config/ubootenv ] && exit 0 7 8touch /etc/config/ubootenv 9 10. /lib/imx6.sh 11. /lib/uboot-envtools.sh 12. /lib/functions.sh 13 14board=$(imx6_board_name) 15 16case "$board" in 17*gw5*) 18 if [ -c /dev/mtd1 ]; then 19 # board boots from NAND 20 ubootenv_add_uci_config /dev/mtd1 0x0 0x20000 0x40000 21 ubootenv_add_uci_config /dev/mtd1 0x80000 0x20000 0x40000 22 else 23 # board boots from microSD 24 ubootenv_add_uci_config /dev/mmcblk0 0xb1400 0x20000 0x20000 25 ubootenv_add_uci_config /dev/mmcblk0 0xd1400 0x20000 0x20000 26 fi 27 ;; 28"wandboard") 29 ubootenv_add_uci_config "/dev/mmcblk0" "0x60000" "0x2000" "0x2000" 30 ;; 31esac 32 33config_load ubootenv 34config_foreach ubootenv_add_app_config ubootenv 35 36exit 0 37