After update my own kernel, the board can't boot

Hi,I use L4T 35.4.1 on my Xavier NX board. I get the kernel src from Nvidia. After compile the src and generate the Image file on the NX board, I replace the Image file in /boot directory. When I reboot the board, I can only see UEFI screen. The system can’t boot! I try to use UEFI shell to change the Image file back to old, but the shell always say: “the destination file failed to open with create”. My question is:
1)how to update Image file rightly?
2)how can I use UEFI shell to cp or del file on disk?
Thank you!

Hi,

It’s always better to back up the kernel image before directly replacing it.
You can make another entry in /boot/extlinux/extlinux.conf, and rename the original kernel image to something like Image.backup, and you will be asked which set of kernel config you want to boot from during booting.

I don’t know why your new kernel fails to boot, but it you want to restore it, I think initrd is the right way of doing it instead of UEFI shell.
Copy the stock kernel image to a USB drive, and let the device boot into initrd with the following command:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd <board-name> <rootdev>

, then you can mount both file systems on your board (maybe eMMC/SD card) and USB drive, and replace the kernel image.

Thank you for ur replay! FYI, I need boot board into initrd mode, but where I can type the command ur mentioned? Now I only look UEFI screen!

Put the device in force recovery mode and run the command on your host PC.

I know, I must use a host PC to config board boot into initrd mode. I will try, thank u!

FYI, most commands are found from this location:
~/nvidia/nvidia_sdk/JetPack...version.../Linux_for_Tegra/

sudo ./l4t_initrd_flash.sh --initrd jetson-xavier-nx-devkit-emmc mmcblk0p1

Hi,I get error message like below:

/home/ubuntu/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --initrd jetson-xavier-nx-devkit-emmc mmcblk0p1


  •                                    *
    
  • Step 1: Generate rcm boot commandline *
  •                                    *
    

ROOTFS_AB= ROOTFS_ENC= /home/ubuntu/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/flash.sh --no-flash --rcm-boot jetson-xavier-nx-devkit-emmc mmcblk0p1
Error: Invalid target board - jetson-xavier-nx-devkit-emmc.
But I can run “flash.sh --no-flash --rcm-boot jetson-xavier-nx-devkit-emmc mmcblk0p1” rightly directly use ./flash command

Run the command under Linux_for_Tegra/.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd <board-name> <rootdev>

Not

sudo ./l4t_initrd_flash.sh --initrd <board-name> <rootdev>

Thank u! It’s works fine! I will feedback my test!

root@fe80::1%enp0s20f0u10u3: Permission denied (password).
I input my passwd of board and host PC,but can’t enter the system! I’m sure I input the right password!

Put the full log, please.

**********************************************
*                                            *
*  Step 1: Build the flashing environment    *
*                                            *
**********************************************
Create flash environment 0
~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/bootloader ~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra
~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra
Finish creating flash environment 0.
****************************************************
*                                                  *
*  Step 2: Boot the device with flash initrd image *
*                                                  *
****************************************************
~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/temp_initrdflash/bootloader0 ~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra
./tegraflash.py --bl nvtboot_recovery_cpu_t194_sigheader.bin.encrypt --bct br_bct_BR.bct --securedev  --bldtb tegra194-p3668-0001-p3509-0000.dtb --applet rcm_2_encrypt.rcm --applet_softfuse rcm_1_encrypt.rcm --cmd "rcmboot"  --cfg secureflash.xml --chip 0x19 --mb1_bct mb1_bct_MB1_sigheader.bct.encrypt --mem_bct mem_rcm_sigheader.bct.encrypt --mb1_cold_boot_bct mb1_cold_boot_bct_MB1_sigheader.bct.encrypt --mem_bct_cold_boot mem_coldboot_sigheader.bct.encrypt  --bins "mb2_bootloader nvtboot_recovery_t194_sigheader.bin.encrypt; mts_preboot preboot_c10_prod_cr_sigheader.bin.encrypt; mts_mce mce_c10_prod_cr_sigheader.bin.encrypt; mts_proper mts_c10_prod_cr_sigheader.bin.encrypt; bpmp_fw bpmp-2_t194_sigheader.bin.encrypt; bpmp_fw_dtb tegra194-a02-bpmp-p3668-a00_lz4_sigheader.dtb.encrypt; spe_fw spe_t194_sigheader.bin.encrypt; tos tos-optee_t194_sigheader.img.encrypt; eks eks_t194_sigheader.img.encrypt; kernel boot0.img; kernel_dtb kernel_tegra194-p3668-0001-p3509-0000.dtb; bootloader_dtb tegra194-p3668-0001-p3509-0000_sigheader.dtb.encrypt"    --secondary_gpt_backup  --bct_backup  --instance 3-10.3
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 

 Entering RCM boot

[   0.0000 ] rcm boot with presigned binaries
[   0.0000 ] Boot Rom communication
[   0.0017 ] tegrarcm_v2 --instance 3-10.3 --chip 0x19 0 --rcm rcm_1_encrypt.rcm --rcm rcm_2_encrypt.rcm
[   0.0023 ] BR_CID: 0x880219116428a0012000000015020240
[   0.0069 ] Boot Rom communication completed
[   2.0393 ] tegrarcm_v2 --instance 3-10.3 --isapplet
[   2.0411 ] Applet version 01.00.0000
[   2.0546 ] Sending BCTs
[   2.0565 ] tegrarcm_v2 --instance 3-10.3 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem mem_rcm_sigheader.bct.encrypt
[   2.0573 ] Applet version 01.00.0000
[   2.0742 ] Sending bct_bootrom
[   2.0743 ] [................................................] 100%
[   2.0758 ] Sending bct_mb1
[   2.0807 ] [................................................] 100%
[   2.0849 ] Sending bct_mem
[   2.1339 ] [................................................] 100%
[   2.1719 ] Generating blob
[   2.3951 ] Disable RCE in rcm kernel-dtb.
[   2.4297 ] tegrahost_v2 --chip 0x19 --generateblob blob.xml blob.bin
[   2.4303 ] number of images in blob are 13
[   2.4305 ] blobsize is 54881455
[   2.4305 ] Added binary blob_nvtboot_recovery_cpu_t194_sigheader.bin.encrypt of size 232976
[   2.4424 ] Added binary blob_nvtboot_recovery_t194_sigheader.bin.encrypt of size 206016
[   2.4426 ] Added binary blob_preboot_c10_prod_cr_sigheader.bin.encrypt of size 24016
[   2.4427 ] Added binary blob_mce_c10_prod_cr_sigheader.bin.encrypt of size 145184
[   2.4429 ] Added binary blob_mts_c10_prod_cr_sigheader.bin.encrypt of size 3430416
[   2.4436 ] Added binary blob_bpmp-2_t194_sigheader.bin.encrypt of size 1007392
[   2.4442 ] Added binary blob_tegra194-a02-bpmp-p3668-a00_lz4_sigheader.dtb.encrypt of size 36176
[   2.4445 ] Added binary blob_spe_t194_sigheader.bin.encrypt of size 95232
[   2.4446 ] Added binary blob_tos-optee_t194_sigheader.img.encrypt of size 977664
[   2.4447 ] Added binary blob_eks_t194_sigheader.img.encrypt of size 5136
[   2.4449 ] Added binary blob_boot0.img of size 48054272
[   2.4610 ] Added binary blob_kernel_tegra194-p3668-0001-p3509-0000.dtb of size 326727
[   2.4660 ] Added binary blob_tegra194-p3668-0001-p3509-0000_sigheader.dtb.encrypt of size 340032
[   2.4851 ] Sending bootloader and pre-requisite binaries
[   2.4860 ] tegrarcm_v2 --instance 3-10.3 --download blob blob.bin
[   2.4865 ] Applet version 01.00.0000
[   2.4975 ] Sending blob
[   2.4975 ] [                                                ] 001%
[   2.4975 ] [.                                               ] 003%
[   2.4975 ] [..                                              ] 005%
[   2.4975 ] [...                                             ] 007%
[   2.4975 ] [....                                            ] 009%
[   2.4975 ] [.....                                           ] 011%
[   2.4975 ] [......                                          ] 013%
[   2.4975 ] [.......                                         ] 015%
[   2.4975 ] [........                                        ] 017%
[   2.4975 ] [.........                                       ] 019%
[   2.4975 ] [..........                                      ] 021%
[   2.4975 ] [...........                                     ] 022%
[   2.4975 ] [............                                    ] 024%
[   2.4975 ] [.............                                   ] 026%
[   2.4975 ] [..............                                  ] 028%
[   2.4975 ] [...............                                 ] 030%
[   2.4975 ] [................                                ] 032%
[   2.4975 ] [.................                               ] 034%
[   2.4975 ] [..................                              ] 036%
[   2.4975 ] [...................                             ] 038%
[   2.4975 ] [....................                            ] 040%
[   2.4975 ] [.....................                           ] 042%
[   2.4975 ] [.....................                           ] 043%
[   2.4975 ] [......................                          ] 045%
[   2.4975 ] [.......................                         ] 047%
[   2.4975 ] [........................                        ] 049%
[   2.4975 ] [.........................                       ] 051%
[   2.4975 ] [..........................                      ] 053%
[   2.4975 ] [...........................                     ] 055%
[   2.4975 ] [............................                    ] 057%
[   2.4975 ] [.............................                   ] 059%
[   2.4975 ] [..............................                  ] 061%
[   2.4975 ] [...............................                 ] 063%
[   2.4975 ] [................................                ] 064%
[   2.4975 ] [.................................               ] 066%
[   2.4975 ] [..................................              ] 068%
[   2.4975 ] [...................................             ] 070%
[   2.4975 ] [....................................            ] 072%
[   2.4975 ] [.....................................           ] 074%
[   2.4975 ] [......................................          ] 076%
[   2.4975 ] [.......................................         ] 078%
[   2.4975 ] [........................................        ] 080%
[   2.4975 ] [.........................................       ] 082%
[   2.4975 ] [..........................................      ] 084%
[   2.4975 ] [..........................................      ] 085%
[   2.4975 ] [...........................................     ] 087%
[   2.4975 ] [............................................    ] 089%
[   2.4975 ] [.............................................   ] 091%
[   2.4975 ] [..............................................  ] 093%
[   2.4975 ] [............................................... ] 095%
[   2.4975 ] [................................................] 097%
[   2.4975 ] [................................................] 099%
[   2.4975 ] [................................................] 100%
[  11.5711 ] tegrarcm_v2 --instance 3-10.3 --boot rcm
[  11.5716 ] Applet version 01.00.0000
[  11.5948 ] RCM-boot started

~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra
***************************************
*                                     *
*  Step 3: Start the flashing process *
*                                     *
***************************************
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for device to expose ssh ......RTNETLINK answers: File exists
RTNETLINK answers: File exists
...RTNETLINK answers: File exists
RTNETLINK answers: File exists
Device has booted into initrd. You can ssh to the target by the command:
$ ssh root@fe80::1%enp0s20f0u10u3
Cleaning up...

I mean log on the device…

The device output nothing on screen!

Some basic Googling gives you:

I know. but now I don’t have the UART to USB device, I will try tomorrow.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Is this still an issue to support? Any result can be shared?