imx6 818 B

123456789101112131415161718192021222324252627282930313233343536373839
  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=$(board_name)
  11. case "$board" in
  12. apalis*)
  13. ubootenv_add_uci_config $(bootdev_from_uuid)boot0 -0x2200 0x2000 0x200 10
  14. ;;
  15. *gw5*)
  16. if [ -c /dev/mtd1 ]; then
  17. # board boots from NAND
  18. ubootenv_add_uci_config /dev/mtd1 0x0 0x20000 0x40000
  19. ubootenv_add_uci_config /dev/mtd1 0x80000 0x20000 0x40000
  20. else
  21. # board boots from microSD
  22. ubootenv_add_uci_config /dev/mmcblk0 0xb1400 0x20000 0x20000
  23. ubootenv_add_uci_config /dev/mmcblk0 0xd1400 0x20000 0x20000
  24. fi
  25. ;;
  26. wandboard)
  27. ubootenv_add_uci_config "/dev/mmcblk0" "0x60000" "0x2000" "0x2000"
  28. ;;
  29. esac
  30. config_load ubootenv
  31. config_foreach ubootenv_add_app_config ubootenv
  32. exit 0