platform.sh 490 B

12345678910111213141516171819202122232425262728293031
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. . /lib/oxnas.sh
  5. RAMFS_COPY_DATA=/lib/oxnas.sh
  6. REQUIRE_IMAGE_METADATA=1
  7. platform_check_image() {
  8. local board=$(oxnas_board_name)
  9. [ "$ARGC" -gt 1 ] && return 1
  10. nand_do_platform_check $board $1
  11. return $?
  12. }
  13. platform_pre_upgrade() {
  14. nand_do_upgrade $1
  15. }
  16. disable_watchdog() {
  17. killall watchdog
  18. ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
  19. echo 'Could not disable watchdog'
  20. return 1
  21. }
  22. }
  23. append sysupgrade_pre_upgrade disable_watchdog