imx6 715 B

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