platform.sh 589 B

12345678910111213141516171819202122232425262728293031
  1. PART_NAME=firmware
  2. CI_BLKSZ=65536
  3. platform_check_image() {
  4. local magic="$(get_magic_long "$1")"
  5. [ "$#" -gt 1 ] && return 1
  6. [ "$magic" != "27051956" ] && {
  7. echo "Invalid image type."
  8. return 1
  9. }
  10. return 0
  11. }
  12. platform_do_upgrade() {
  13. default_do_upgrade "$ARGV"
  14. }
  15. disable_watchdog() {
  16. v "killing watchdog"
  17. killall watchdog
  18. ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
  19. echo 'Could not disable watchdog'
  20. return 1
  21. }
  22. }
  23. # CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
  24. #append sysupgrade_pre_upgrade disable_watchdog