platform.sh 644 B

12345678910111213141516171819202122232425262728293031323334353637
  1. . /lib/functions/lantiq.sh
  2. PART_NAME=firmware
  3. platform_check_image() {
  4. [ "$#" -gt 1 ] && return 1
  5. local board=$(lantiq_board_name)
  6. case "$board" in
  7. BTHOMEHUBV2B|BTHOMEHUBV3A|P2812HNUF* )
  8. nand_do_platform_check $board $1
  9. return $?;
  10. ;;
  11. esac
  12. case "$(get_magic_word "$1")" in
  13. # uImage
  14. 2705) return 0;;
  15. # tplink
  16. 0200) return 0;;
  17. *)
  18. echo "Invalid image type"
  19. return 1
  20. ;;
  21. esac
  22. }
  23. # use default for platform_do_upgrade()
  24. disable_watchdog() {
  25. killall watchdog
  26. ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
  27. echo 'Could not disable watchdog'
  28. return 1
  29. }
  30. }
  31. append sysupgrade_pre_upgrade disable_watchdog