2
0

ar71xx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2011-2014 OpenWrt.org
  4. #
  5. [ -e /etc/config/ubootenv ] && exit 0
  6. touch /etc/config/ubootenv
  7. . /lib/ar71xx.sh
  8. . /lib/uboot-envtools.sh
  9. . /lib/functions.sh
  10. board=$(ar71xx_board_name)
  11. case "$board" in
  12. a40|\
  13. a60|\
  14. alfa-ap120c|\
  15. all0258n|\
  16. ap121f|\
  17. ap90q|\
  18. cap324|\
  19. cap4200ag|\
  20. carambola2|\
  21. cpe830|\
  22. cpe870|\
  23. cr3000|\
  24. cr5000|\
  25. eap300v2|\
  26. gl-ar300m|\
  27. hornet-ub|\
  28. hornet-ub-x2|\
  29. jwap230|\
  30. mr1750|\
  31. mr1750v2|\
  32. mr600|\
  33. mr600v2|\
  34. mr900|\
  35. mr900v2|\
  36. nbg6716|\
  37. om5p|\
  38. om5p-ac|\
  39. om5p-acv2|\
  40. om5p-an|\
  41. sr3200|\
  42. tube2h|\
  43. wndr3700|\
  44. xd3200)
  45. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
  46. ;;
  47. alfa-ap96|\
  48. all0315n|\
  49. om2p|\
  50. om2p-hs|\
  51. om2p-hsv2|\
  52. om2p-hsv3|\
  53. om2p-hsv4|\
  54. om2p-lc|\
  55. om2pv2|\
  56. om2pv4)
  57. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
  58. ;;
  59. dap-2695-a1|\
  60. wzr-hp-ag300h)
  61. ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
  62. ;;
  63. dr531)
  64. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
  65. ;;
  66. qihoo-c301)
  67. ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
  68. ;;
  69. esac
  70. config_load ubootenv
  71. config_foreach ubootenv_add_app_config ubootenv
  72. exit 0