mvebu 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2014-2016 OpenWrt.org
  4. # Copyright (C) 2016 LEDE-Project.org
  5. #
  6. [ -e /etc/config/ubootenv ] && exit 0
  7. touch /etc/config/ubootenv
  8. . /lib/uboot-envtools.sh
  9. . /lib/functions.sh
  10. board=$(board_name)
  11. case "$board" in
  12. cznic,turris-omnia)
  13. ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
  14. ;;
  15. glinet,gl-mv1000)
  16. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1"
  17. ;;
  18. globalscale,espressobin|\
  19. globalscale,espressobin-emmc|\
  20. globalscale,espressobin-v7|\
  21. globalscale,espressobin-v7-emmc|\
  22. marvell,armada8040-mcbin-doubleshot|\
  23. marvell,armada8040-mcbin-singleshot)
  24. ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
  25. ;;
  26. linksys,wrt1200ac|\
  27. linksys,wrt1900ac-v2|\
  28. linksys,wrt1900acs)
  29. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
  30. ;;
  31. linksys,wrt1900ac-v1)
  32. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
  33. ;;
  34. linksys,wrt3200acm|\
  35. linksys,wrt32x)
  36. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  37. ;;
  38. methode,udpu)
  39. ubootenv_add_uci_config "/dev/mtd0" "0x180000" "0x10000" "0x10000"
  40. ;;
  41. esac
  42. config_load ubootenv
  43. config_foreach ubootenv_add_app_config ubootenv
  44. exit 0