1
0

imx6 737 B

123456789101112131415161718192021222324252627282930313233343536
  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/imx6.sh
  8. . /lib/uboot-envtools.sh
  9. . /lib/functions.sh
  10. board=$(imx6_board_name)
  11. case "$board" in
  12. *gw5*)
  13. if [ -c /dev/mtd1 ]; then
  14. # board boots from NAND
  15. ubootenv_add_uci_config /dev/mtd1 0x0 0x20000 0x40000
  16. ubootenv_add_uci_config /dev/mtd1 0x80000 0x20000 0x40000
  17. else
  18. # board boots from microSD
  19. ubootenv_add_uci_config /dev/mmcblk0 0xb1400 0x20000 0x20000
  20. ubootenv_add_uci_config /dev/mmcblk0 0xd1400 0x20000 0x20000
  21. fi
  22. ;;
  23. "wandboard")
  24. ubootenv_add_uci_config "/dev/mmcblk0" "0x60000" "0x2000" "0x2000"
  25. ;;
  26. esac
  27. config_load ubootenv
  28. config_foreach ubootenv_add_app_config ubootenv
  29. exit 0