ath79 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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,airrouter|\
  65. ubnt,bullet-m-ar7240|\
  66. ubnt,bullet-m-ar7241|\
  67. ubnt,nanobridge-m|\
  68. ubnt,nanostation-loco-m|\
  69. ubnt,nanostation-m|\
  70. ubnt,picostation-m|\
  71. ubnt,powerbridge-m|\
  72. ubnt,rocket-m|\
  73. watchguard,ap100|\
  74. watchguard,ap200|\
  75. watchguard,ap300|\
  76. yuncore,a770|\
  77. yuncore,a782|\
  78. yuncore,a930|\
  79. yuncore,xd3200|\
  80. yuncore,xd4200|\
  81. ziking,cpe46b|\
  82. zyxel,nbg6616)
  83. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
  84. ;;
  85. buffalo,wzr-hp-ag300h)
  86. ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
  87. ;;
  88. buffalo,wzr-hp-g300nh-rb|\
  89. buffalo,wzr-hp-g300nh-s|\
  90. linksys,ea4500-v3)
  91. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  92. ;;
  93. domywifi,dw33d)
  94. ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
  95. ;;
  96. dongwon,dw02-412h-64m|\
  97. dongwon,dw02-412h-128m|\
  98. glinet,gl-ar300m-lite|\
  99. glinet,gl-ar300m-nand|\
  100. glinet,gl-ar300m-nor|\
  101. glinet,gl-ar300m16)
  102. idx="$(find_mtd_index u-boot-env)"
  103. [ -n "$idx" ] && \
  104. ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
  105. ;;
  106. glinet,gl-ar150)
  107. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
  108. ;;
  109. netgear,wndr3700|\
  110. netgear,wndr3700-v2|\
  111. netgear,wndrmac-v1)
  112. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
  113. ;;
  114. netgear,pgzng1|\
  115. netgear,wndr3700-v4|\
  116. netgear,wndr4300|\
  117. netgear,wndr4300tn|\
  118. netgear,wndr4300sw)
  119. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
  120. ;;
  121. openmesh,om2p-v1|\
  122. openmesh,om2p-v2|\
  123. openmesh,om2p-v4|\
  124. openmesh,om2p-hs-v1|\
  125. openmesh,om2p-hs-v2|\
  126. openmesh,om2p-hs-v3|\
  127. openmesh,om2p-hs-v4|\
  128. openmesh,om2p-lc|\
  129. plasmacloud,pa300|\
  130. plasmacloud,pa300e)
  131. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
  132. ;;
  133. qihoo,c301)
  134. ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
  135. ;;
  136. ruckus,zf7321|\
  137. ruckus,zf7372)
  138. ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
  139. ;;
  140. sophos,ap15|\
  141. sophos,ap55|\
  142. sophos,ap55c|\
  143. sophos,ap100|\
  144. sophos,ap100c)
  145. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
  146. ;;
  147. wallys,dr531)
  148. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
  149. ;;
  150. zte,mf286|\
  151. zte,mf286a|\
  152. zte,mf286r)
  153. ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x10000"
  154. ;;
  155. esac
  156. config_load ubootenv
  157. config_foreach ubootenv_add_app_config ubootenv
  158. exit 0