flash.sh update kernel failed

ubuntu@ubuntu:~/work/Linux_for_Tegra$ sudo ./flash.sh -k LNX jetson-tk1 mmcblk1p1 > flash_kernel.log

*** GPT Parameters ***
Device Sector Size ------- 512
device size -------------- 15766388736
bootpart size ------------ 8388608
userpart size ------------ 15758000128
Erase Block Size --------- 2097152
FS Buffer size ----------- 4096
Partition Config file ---- flash.cfg
Visible partition flag — GP1
Primary GPT output ------- PPT->ppt.img
Secondary GPT output ----- GPT->gpt.img
Target device name ------- none

*** PARTITION LAYOUT(20 partitions) ***
[ BCT] BH 0 16383 8.0MiB
[ PPT] UH 0 4095 2.0MiB ppt.img
[ PT] UH 4096 8191 2.0MiB
[ EBT] UH 8192 16383 4.0MiB u-boot.bin
[ LNX] UH 16384 49151 16.0MiB
[ SOS] UH 49152 61439 6.0MiB
[ NVC] UH 61440 65535 2.0MiB
[ MPB] UH 65536 77823 6.0MiB
[ MBP] UH 77824 90111 6.0MiB
[ GP1] UH 90112 94207 2.0MiB
[ APP] UV 94208 29454335 14336.0MiB
[ DTB] UV 29454336 29462527 4.0MiB tegra124-jetson_tk1-pm375-000-c00-00.dtb
[ EFI] UV 29462528 29593599 64.0MiB
[ USP] UV 29593600 29601791 4.0MiB
[ TP1] UV 29601792 29609983 4.0MiB
[ TP2] UV 29609984 29618175 4.0MiB
[ TP3] UV 29618176 29626367 4.0MiB
[ WB0] UV 29626368 29630463 2.0MiB
[ UDA] UV 29630464 30773247 558.0MiB
[ GPT] UH 30773248 30777343 2.0MiB gpt.img

copying bctfile(/home/ubuntu/work/Linux_for_Tegra/bootloader/ardbeg/BCT/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.cfg)… done.
copying bootloader(/home/ubuntu/work/Linux_for_Tegra/bootloader/ardbeg/u-boot.bin)… done.
populating kernel to rootfs… done.
populating jetson-tk1_extlinux.conf.sdcard to rootfs… done.
done.
copying dtbfile(/home/ubuntu/work/Linux_for_Tegra/kernel/dtb/tegra124-jetson_tk1-pm375-000-c00-00.dtb)… done.
copying cfgfile(/home/ubuntu/work/Linux_for_Tegra/bootloader/ardbeg/cfg/gnu_linux_fastboot_emmc_full.cfg) to flash.cfg… done.
creating gpt(ppt.img)…
copying flasher(/home/ubuntu/work/Linux_for_Tegra/bootloader/ardbeg/fastboot.bin)… done.
Existing flashapp(/home/ubuntu/work/Linux_for_Tegra/bootloader/nvflash) reused.
*** Updating 6:LNX with boot.img ***
./nvflash --download 6 boot.img --bl fastboot.bin --go
Nvflash 4.13.0000 started
BR_CID: 0x34001001740de0c90000000014fc8480
rcm version 0X400001
System Information:
chip name: unknown
chip id: 0x40 major: 1 minor: 1
chip sku: 0x0
chip uid: 0x00000001740de0c90000000014fc8480
macrovision: disabled
hdcp: disabled
jtag: disabled
sbk burned: false
board id: 0
warranty fuse: 0
dk burned: false
boot device: emmc
operating mode: 3
device config strap: 0
device config fuse: 0
sdram config strap: 0

RCM communication completed
downloading bootloader – load address: 0x83d88000 entry point: 0x83d88000
sending file: fastboot.bin

  • 594363/594363 bytes sent
    fastboot.bin sent successfully
    waiting for bootloader to initialize
    bootloader downloaded successfully
    file not found: boot.img
    failed executing command 2147483647 NvError 0x4
    partition download failed
    Failed to flash ardbeg.

Are you trying to flash your Jetson TK1? Try typing sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1. Also the version youre using may be old. I used the R19.2 version but that turned out to be really old. So I used R21.4 but after flashing the CPU was in hardlock mode causing it to loop in kernel mode and it wont respond to any interrupts and it wont let any other processes run. Long story short I’m also having the same problem.

oh wait I’m sorry…youre using this version mmcblk1p1? I’m using mmcblk0p1 so maybe your flashing steps or versions are different.

I’m not sure which version of L4T, most recent and quite good is R21.4. If using u-boot (default in R21.x) no -k option should be used; this option applies using fastboot. Try instead for eMMC flash, including logging:

sudo flash.sh -S 14580MiB jetson-tk1 mmcblk0p1 2>&1 | tee flash_kernel.log

Or, try this for SD card flash:

sudo flash.sh -S 14580MiB jetson-tk1 mmcblk1p1 2>&1 | tee flash_kernel.log

Note that I’d try eMMC first, with no SD card.

In terms of SD card, you are better off just copying and updating a sample rootfs to an SD card and then editing u-boot config to point at this as an alternate install, rather than putting the boot loader itself on SD card (the latter flash command pushes the boot loader and boot loader config onto SD card…the former flash command will boot SD card just fine as an alternate boot leaving boot loader and its config on eMMC…eMMC boot loader will work with no SD card, boot loader on SD card will render Jetson useless without the SD card).

L4T is R21.4,flash into eMMC.
sudo ./apply_binaries.sh
sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1
in the flash.sh

Examples:

./flash.sh mmcblk0p1 - boot from eMMC

./flash.sh mmcblk1p1 - boot from SDCARD

./flash.sh sda1 - boot from USB device

./flash.sh -N :/nfsroot eth0 - boot from NFS

./flash.sh -k LNX mmcblk1p1 - update kernel

./flash.sh -k EBT mmcblk1p1 - update BCT

I’d update the kernel into eMMC,but failed.
sudo ./flash.sh -k LNX jetson-tk1 mmcblk1p1
file not found: boot.img

Kernel does not update into eMMC unless the boot loader is fastboot. For u-boot, zImage goes to /boot, along with .dtb files. For u-boot, this is a simple file copy operation, optionally leaving the original install and simply adding an alternate boot entry to extlinux.conf.

Also, be sure your apply_binaries.sh is run from the rootfs directory.

Thank you every much.
If I want to update kernel,I just copy new zImage to the eMMC/boot/ right ?

Assuming it uses u-boot, correct. The R21.x series uses u-boot. The original R19.2 used fastboot.

Note that if you slightly rename your zImage, and place it in /boot, you can copy the /boot/extlinux/extlinux.conf entry for the default and simply choose to boot this other entry via serial console during startup. Or you could make this alternate test entry the default and still have the default to fall back on.

Thank you!