ar71xx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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/ar71xx.sh
  8. . /lib/uboot-envtools.sh
  9. . /lib/functions.sh
  10. board=$(ar71xx_board_name)
  11. case "$board" in
  12. alfa-ap120c | \
  13. all0258n | \
  14. ap90q | \
  15. cap324 | \
  16. cap4200ag | \
  17. carambola2 | \
  18. cpe830 | \
  19. cpe870 | \
  20. cr3000 | \
  21. cr5000 | \
  22. eap300v2 | \
  23. gl-ar300m | \
  24. hornet-ub | \
  25. hornet-ub-x2 | \
  26. jwap230 | \
  27. mr1750 | \
  28. mr1750v2 | \
  29. mr600 | \
  30. mr600v2 | \
  31. mr900 | \
  32. mr900v2 | \
  33. nbg6716 | \
  34. om5p-an | \
  35. om5p-ac | \
  36. om5p-acv2 | \
  37. om5p | \
  38. tube2h | \
  39. wndr3700)
  40. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
  41. ;;
  42. alfa-ap96 | \
  43. all0315n | \
  44. om2p | \
  45. om2pv2 | \
  46. om2p-hs | \
  47. om2p-hsv2 | \
  48. om2p-hsv3 | \
  49. om2p-lc)
  50. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
  51. ;;
  52. dr531)
  53. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
  54. ;;
  55. dap-2695-a1 | \
  56. wzr-hp-ag300h)
  57. ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
  58. ;;
  59. qihoo-c301)
  60. ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
  61. ;;
  62. esac
  63. config_load ubootenv
  64. config_foreach ubootenv_add_app_config ubootenv
  65. exit 0