platform.sh 450 B

1234567891011121314151617181920212223242526
  1. REQUIRE_IMAGE_METADATA=1
  2. RAMFS_COPY_BIN=/usr/sbin/nandwrite
  3. CI_KERNPART=none
  4. platform_check_image() {
  5. [ -e /dev/ubi0 ] || {
  6. ubiattach -m 1
  7. sleep 1
  8. }
  9. return 0;
  10. }
  11. platform_pre_upgrade() {
  12. nand_do_upgrade "$1"
  13. }
  14. platform_nand_pre_upgrade() {
  15. local board_name="$(cat /tmp/sysinfo/board_name)"
  16. mtd erase kernel
  17. tar xf "$1" sysupgrade-$board_name/kernel -O | nandwrite -o /dev/mtd0 -
  18. }
  19. platform_do_upgrade() {
  20. default_do_upgrade "$ARGV"
  21. }