platform.sh 896 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # Copyright (C) 2014-2016 OpenWrt.org
  3. # Copyright (C) 2016 LEDE-Project.org
  4. #
  5. . /lib/mvebu.sh
  6. RAMFS_COPY_DATA=/lib/mvebu.sh
  7. REQUIRE_IMAGE_METADATA=1
  8. platform_check_image() {
  9. return 0
  10. }
  11. platform_do_upgrade() {
  12. local board=$(mvebu_board_name)
  13. case "$board" in
  14. armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
  15. platform_do_upgrade_linksys "$ARGV"
  16. ;;
  17. armada-388-clearfog)
  18. platform_do_upgrade_clearfog "$ARGV"
  19. ;;
  20. *)
  21. default_do_upgrade "$ARGV"
  22. ;;
  23. esac
  24. }
  25. platform_copy_config() {
  26. local board=$(mvebu_board_name)
  27. case "$board" in
  28. armada-388-clearfog)
  29. platform_copy_config_clearfog "$ARGV"
  30. ;;
  31. esac
  32. }
  33. disable_watchdog() {
  34. killall watchdog
  35. ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
  36. echo 'Could not disable watchdog'
  37. return 1
  38. }
  39. }
  40. append sysupgrade_pre_upgrade disable_watchdog