ramips 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. #
  2. # Copyright (C) 2011-2012 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,ac1200rm|\
  11. alfa-network,awusfree1|\
  12. alfa-network,quad-e4g|\
  13. alfa-network,r36m-e4g|\
  14. alfa-network,tube-e4g|\
  15. engenius,epg600|\
  16. engenius,esr600h|\
  17. hongdian,h8922-v30|\
  18. linksys,re7000|\
  19. meig,slt866|\
  20. qding,qc202|\
  21. sitecom,wlr-4100-v1-002|\
  22. zyxel,keenetic-lite-iii-a)
  23. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
  24. ;;
  25. alfa-network,ax1800rm|\
  26. allnet,all0256n-4m|\
  27. allnet,all0256n-8m|\
  28. allnet,all5002|\
  29. asiarf,ap7621-004-v3|\
  30. plasmacloud,pax1800-lite|\
  31. yuncore,ax820)
  32. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
  33. ;;
  34. ampedwireless,ally-00x19k|\
  35. ampedwireless,ally-r1900k)
  36. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
  37. ;;
  38. arcadyan,we420223-99|\
  39. dlink,dir-806a-b1)
  40. ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
  41. ;;
  42. asus,rt-ax53u|\
  43. asus,rt-ax54|\
  44. asus,4g-ax56|\
  45. belkin,rt1800|\
  46. elecom,wrc-x1800gs|\
  47. h3c,tx1800-plus|\
  48. h3c,tx1801-plus|\
  49. h3c,tx1806|\
  50. iptime,ax2002m|\
  51. iptime,ax2004m|\
  52. jcg,q20|\
  53. linksys,e7350|\
  54. netgear,eax12|\
  55. netgear,wax202|\
  56. netis,n6|\
  57. zyxel,wsm20)
  58. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  59. ;;
  60. beeline,smartbox-flash|\
  61. iptime,t5004|\
  62. linksys,ea6350-v4|\
  63. linksys,ea7300-v1|\
  64. linksys,ea7300-v2|\
  65. linksys,ea7500-v2|\
  66. linksys,ea8100-v1|\
  67. linksys,ea8100-v2|\
  68. mts,wg430223|\
  69. ubnt,edgerouter-x|\
  70. ubnt,edgerouter-x-sfp)
  71. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
  72. ;;
  73. beeline,smartbox-giga|\
  74. beeline,smartbox-turbo|\
  75. beeline,smartbox-turbo-plus|\
  76. etisalat,s3|\
  77. rostelecom,rt-fe-1a|\
  78. rostelecom,rt-sf-1)
  79. ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
  80. ;;
  81. beeline,smartbox-pro|\
  82. tplink,ec330-g5u-v1|\
  83. wifire,s1500-nbn)
  84. ubootenv_add_mtd "u-boot-env" "0x0" "0x1000" "0x20000"
  85. ;;
  86. bolt,arion|\
  87. xiaomi,mi-router-cr6606|\
  88. xiaomi,mi-router-cr6608|\
  89. xiaomi,mi-router-cr6609)
  90. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
  91. ;;
  92. buffalo,wsr-1166dhp|\
  93. buffalo,wsr-600dhp|\
  94. kroks,kndrt31r16|\
  95. kroks,kndrt31r19|\
  96. mediatek,linkit-smart-7688|\
  97. samknows,whitebox-v8|\
  98. xiaomi,mi-router-4c|\
  99. xiaomi,miwifi-3a|\
  100. xiaomi,miwifi-nano|\
  101. zbtlink,zbt-wg2626|\
  102. zte,mf283plus)
  103. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
  104. ;;
  105. dna,valokuitu-plus-ex400|\
  106. genexis,pulse-ex400)
  107. ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
  108. ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
  109. ;;
  110. haier,har-20s2u1|\
  111. sim,simax1800t|\
  112. sim,simax1800u)
  113. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  114. ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
  115. ;;
  116. hootoo,ht-tm05|\
  117. ravpower,rp-wd03)
  118. ubootenv_add_mtd "u-boot-env" "0x4000" "0x1000" "0x1000"
  119. ;;
  120. netgear,wax214v2)
  121. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  122. ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000"
  123. ;;
  124. snr,snr-cpe-me1|\
  125. snr,snr-cpe-me2-sfp|\
  126. snr,cpe-w4n-mt)
  127. ubootenv_add_mtd "uboot-env" "0x0" "0x1000" "0x1000"
  128. ;;
  129. xiaomi,mi-router-3-pro|\
  130. xiaomi,mi-router-3g|\
  131. xiaomi,mi-router-4|\
  132. xiaomi,mi-router-ac2100|\
  133. xiaomi,redmi-router-ac2100)
  134. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
  135. ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
  136. ;;
  137. xiaomi,mi-router-3g-v2|\
  138. xiaomi,mi-router-4a-gigabit|\
  139. xiaomi,miwifi-3c)
  140. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
  141. ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
  142. ;;
  143. xiaomi,miwifi-mini)
  144. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
  145. ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
  146. ;;
  147. zyxel,lte3301-plus)
  148. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
  149. ;;
  150. zyxel,lte5398-m904|\
  151. zyxel,lte7490-m904|\
  152. zyxel,nr7101)
  153. ubootenv_add_mtd "Config" "0x0" "0x1000" "0x80000"
  154. ;;
  155. esac
  156. config_load ubootenv
  157. config_foreach ubootenv_add_app_config
  158. exit 0