mvebu 934 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. globalscale,espressobin|\
  16. globalscale,espressobin-emmc|\
  17. globalscale,espressobin-v7|\
  18. globalscale,espressobin-v7-emmc|\
  19. marvell,armada8040-mcbin)
  20. ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
  21. ;;
  22. linksys,caiman|\
  23. linksys,cobra|\
  24. linksys,shelby)
  25. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
  26. ;;
  27. linksys,mamba)
  28. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
  29. ;;
  30. linksys,rango|\
  31. linksys,venom)
  32. ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
  33. ;;
  34. esac
  35. config_load ubootenv
  36. config_foreach ubootenv_add_app_config ubootenv
  37. exit 0