2
0

ar71xx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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/uboot-envtools.sh
  8. . /lib/functions.sh
  9. board=$(board_name)
  10. case "$board" in
  11. a40|\
  12. a60|\
  13. alfa-ap120c|\
  14. all0258n|\
  15. ap121f|\
  16. ap90q|\
  17. ap91-5g|\
  18. arduino-yun|\
  19. cap324|\
  20. cap4200ag|\
  21. carambola2|\
  22. cpe830|\
  23. cpe870|\
  24. cr3000|\
  25. cr5000|\
  26. dw33d|\
  27. e1700ac-v2|\
  28. e600g-v2|\
  29. e600gac-v2|\
  30. eap300v2|\
  31. ens202ext|\
  32. gl-ar300m|\
  33. gl-ar750|\
  34. hornet-ub|\
  35. hornet-ub-x2|\
  36. jwap230|\
  37. koala|\
  38. mr1750|\
  39. mr1750v2|\
  40. mr600|\
  41. mr600v2|\
  42. mr900|\
  43. mr900v2|\
  44. n5q|\
  45. nbg6716|\
  46. om5p|\
  47. om5p-ac|\
  48. om5p-acv2|\
  49. om5p-an|\
  50. r36a|\
  51. rme-eg200|\
  52. sr3200|\
  53. t830|\
  54. tube2h|\
  55. wam250|\
  56. wndr3700|\
  57. xd3200)
  58. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
  59. ;;
  60. alfa-ap96|\
  61. all0315n|\
  62. om2p|\
  63. om2p-hs|\
  64. om2p-hsv2|\
  65. om2p-hsv3|\
  66. om2p-hsv4|\
  67. om2p-lc|\
  68. om2pv2|\
  69. om2pv4)
  70. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
  71. ;;
  72. dap-2695-a1|\
  73. wzr-hp-ag300h)
  74. ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
  75. ;;
  76. dr342|\
  77. dr531)
  78. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
  79. ;;
  80. rambutan)
  81. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  82. ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
  83. ;;
  84. qihoo-c301)
  85. ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
  86. ;;
  87. wi2a-ac200i)
  88. ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000"
  89. ;;
  90. esac
  91. config_load ubootenv
  92. config_foreach ubootenv_add_app_config ubootenv
  93. exit 0