ar71xx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. ap90q|\
  16. arduino-yun|\
  17. cap324|\
  18. cap4200ag|\
  19. carambola2|\
  20. cpe830|\
  21. cpe870|\
  22. cr3000|\
  23. cr5000|\
  24. eap300v2|\
  25. ens202ext|\
  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. rambutan)
  67. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  68. ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000"
  69. ;;
  70. qihoo-c301)
  71. ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
  72. ;;
  73. esac
  74. config_load ubootenv
  75. config_foreach ubootenv_add_app_config ubootenv
  76. exit 0