imx_cortexa9 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # Copyright (C) 2013-2014 OpenWrt.org
  3. #
  4. [ -e /etc/config/ubootenv ] && exit 0
  5. touch /etc/config/ubootenv
  6. . /lib/imx.sh
  7. . /lib/uboot-envtools.sh
  8. . /lib/functions.sh
  9. board=$(board_name)
  10. case "$board" in
  11. gw,imx6dl-gw51xx|\
  12. gw,imx6dl-gw52xx|\
  13. gw,imx6dl-gw53xx|\
  14. gw,imx6dl-gw54xx|\
  15. gw,imx6dl-gw551x|\
  16. gw,imx6dl-gw552x|\
  17. gw,imx6dl-gw553x|\
  18. gw,imx6dl-gw5904|\
  19. gw,imx6dl-gw5907|\
  20. gw,imx6dl-gw5910|\
  21. gw,imx6dl-gw5912|\
  22. gw,imx6dl-gw5913|\
  23. gw,imx6q-gw51xx|\
  24. gw,imx6q-gw52xx|\
  25. gw,imx6q-gw53xx|\
  26. gw,imx6q-gw5400-a|\
  27. gw,imx6q-gw54xx|\
  28. gw,imx6q-gw551x|\
  29. gw,imx6q-gw552x|\
  30. gw,imx6q-gw553x|\
  31. gw,imx6q-gw5904|\
  32. gw,imx6q-gw5907|\
  33. gw,imx6q-gw5910|\
  34. gw,imx6q-gw5912|\
  35. gw,imx6q-gw5913)
  36. if [ -c /dev/mtd1 ]; then
  37. # board boots from NAND
  38. ubootenv_add_uci_config /dev/mtd1 0x0 0x20000 0x40000
  39. ubootenv_add_uci_config /dev/mtd1 0x80000 0x20000 0x40000
  40. else
  41. # board boots from microSD
  42. ubootenv_add_uci_config /dev/mmcblk0 0xb1400 0x20000
  43. ubootenv_add_uci_config /dev/mmcblk0 0xd1400 0x20000
  44. fi
  45. ;;
  46. toradex,apalis_imx6q-eval|\
  47. toradex,apalis_imx6q-ixora|\
  48. toradex,apalis_imx6q-ixora-v1.1)
  49. ubootenv_add_uci_config $(bootdev_from_uuid)boot0 -0x2200 0x2000 0x200 10
  50. ;;
  51. wand,imx6dl-wandboard)
  52. ubootenv_add_uci_config "/dev/mmcblk0" "0x60000" "0x2000" "0x2000"
  53. ;;
  54. esac
  55. config_load ubootenv
  56. config_foreach ubootenv_add_app_config ubootenv
  57. exit 0