platform.sh 892 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. . /lib/ipq806x.sh
  2. PART_NAME=firmware
  3. REQUIRE_IMAGE_METADATA=1
  4. platform_check_image() {
  5. return 0;
  6. }
  7. platform_pre_upgrade() {
  8. local board=$(ipq806x_board_name)
  9. case "$board" in
  10. ap148 |\
  11. d7800 |\
  12. nbg6817 |\
  13. r7500 |\
  14. r7500v2 |\
  15. r7800)
  16. nand_do_upgrade "$1"
  17. ;;
  18. ea8500)
  19. linksys_preupgrade "$1"
  20. ;;
  21. esac
  22. }
  23. platform_do_upgrade() {
  24. local board=$(ipq806x_board_name)
  25. case "$board" in
  26. c2600)
  27. PART_NAME="os-image:rootfs"
  28. MTD_CONFIG_ARGS="-s 0x200000"
  29. default_do_upgrade "$ARGV"
  30. ;;
  31. ea8500)
  32. platform_do_upgrade_linksys "$ARGV"
  33. ;;
  34. vr2600v)
  35. PART_NAME="kernel:rootfs"
  36. MTD_CONFIG_ARGS="-s 0x200000"
  37. default_do_upgrade "$ARGV"
  38. ;;
  39. esac
  40. }
  41. platform_nand_pre_upgrade() {
  42. local board=$(ipq806x_board_name)
  43. case "$board" in
  44. nbg6817)
  45. zyxel_do_upgrade "$1"
  46. ;;
  47. esac
  48. }
  49. blink_led() {
  50. . /etc/diag.sh; set_state upgrade
  51. }
  52. append sysupgrade_pre_upgrade blink_led