ath79 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. #
  2. # Copyright (C) 2011-2014 OpenWrt.org
  3. #
  4. [ -e /etc/config/ubootenv ] && exit 0
  5. touch /etc/config/ubootenv
  6. . /lib/uboot-envtools.sh
  7. . /lib/functions.sh
  8. board=$(board_name)
  9. case "$board" in
  10. alfa-network,ap121f|\
  11. alfa-network,ap121fe|\
  12. alfa-network,n2q|\
  13. alfa-network,n5q|\
  14. alfa-network,pi-wifi4|\
  15. alfa-network,r36a|\
  16. alfa-network,tube-2hq|\
  17. allnet,all-wap02860ac|\
  18. araknis,an-300-ap-i-n|\
  19. araknis,an-500-ap-i-ac|\
  20. araknis,an-700-ap-i-ac|\
  21. arduino,yun|\
  22. buffalo,bhr-4grv2|\
  23. devolo,magic-2-wifi|\
  24. engenius,eap1200h|\
  25. engenius,eap300-v2|\
  26. engenius,eap350-v1|\
  27. engenius,eap600|\
  28. engenius,ecb1200|\
  29. engenius,ecb1750|\
  30. engenius,ecb350-v1|\
  31. engenius,ecb600|\
  32. engenius,enh202-v1|\
  33. engenius,ens202ext-v1|\
  34. engenius,enstationac-v1|\
  35. etactica,eg200|\
  36. glinet,gl-ar750s-nor|\
  37. glinet,gl-ar750s-nor-nand|\
  38. librerouter,librerouter-v1|\
  39. netgear,ex6400|\
  40. netgear,ex7300|\
  41. netgear,ex7300-v2|\
  42. netgear,wndr4300-v2|\
  43. netgear,wndr4500-v3|\
  44. netgear,wnr1000-v2|\
  45. netgear,wnr2000-v3|\
  46. netgear,wnr2200-8m|\
  47. netgear,wnr2200-16m|\
  48. netgear,wnr612-v2|\
  49. ocedo,koala|\
  50. ocedo,raccoon|\
  51. openmesh,a40|\
  52. openmesh,a60|\
  53. openmesh,mr600-v1|\
  54. openmesh,mr600-v2|\
  55. openmesh,mr900-v1|\
  56. openmesh,mr900-v2|\
  57. openmesh,mr1750-v1|\
  58. openmesh,mr1750-v2|\
  59. openmesh,om5p|\
  60. openmesh,om5p-an|\
  61. openmesh,om5p-ac-v1|\
  62. openmesh,om5p-ac-v2|\
  63. samsung,wam250|\
  64. ubnt,nanostation-m|\
  65. yuncore,a770|\
  66. yuncore,a782|\
  67. yuncore,a930|\
  68. yuncore,xd3200|\
  69. yuncore,xd4200|\
  70. ziking,cpe46b|\
  71. zyxel,nbg6616)
  72. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
  73. ;;
  74. buffalo,wzr-hp-ag300h)
  75. ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
  76. ;;
  77. buffalo,wzr-hp-g300nh-rb|\
  78. buffalo,wzr-hp-g300nh-s)
  79. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  80. ;;
  81. domywifi,dw33d)
  82. ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
  83. ;;
  84. dongwon,dw02-412h-64m|\
  85. dongwon,dw02-412h-128m|\
  86. glinet,gl-ar300m-lite|\
  87. glinet,gl-ar300m-nand|\
  88. glinet,gl-ar300m-nor|\
  89. glinet,gl-ar300m16)
  90. idx="$(find_mtd_index u-boot-env)"
  91. [ -n "$idx" ] && \
  92. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
  93. ;;
  94. glinet,gl-ar150)
  95. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
  96. ;;
  97. netgear,wndr3700|\
  98. netgear,wndr3700-v2|\
  99. netgear,wndrmac-v1)
  100. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
  101. ;;
  102. netgear,pgzng1|\
  103. netgear,wndr3700-v4|\
  104. netgear,wndr4300|\
  105. netgear,wndr4300tn|\
  106. netgear,wndr4300sw)
  107. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
  108. ;;
  109. openmesh,om2p-v1|\
  110. openmesh,om2p-v2|\
  111. openmesh,om2p-v4|\
  112. openmesh,om2p-hs-v1|\
  113. openmesh,om2p-hs-v2|\
  114. openmesh,om2p-hs-v3|\
  115. openmesh,om2p-hs-v4|\
  116. openmesh,om2p-lc|\
  117. plasmacloud,pa300|\
  118. plasmacloud,pa300e)
  119. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
  120. ;;
  121. qihoo,c301)
  122. ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
  123. ;;
  124. ruckus,zf7321|\
  125. ruckus,zf7372)
  126. ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
  127. ;;
  128. sophos,ap15|\
  129. sophos,ap55|\
  130. sophos,ap55c|\
  131. sophos,ap100|\
  132. sophos,ap100c)
  133. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
  134. ;;
  135. wallys,dr531)
  136. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
  137. ;;
  138. zte,mf286|\
  139. zte,mf286a|\
  140. zte,mf286r)
  141. ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x10000"
  142. ;;
  143. esac
  144. config_load ubootenv
  145. config_foreach ubootenv_add_app_config ubootenv
  146. exit 0