Unable to flash just the kernel and dtb Orin Nano Devkit

Where is a working script to flash just the kernel and dtb.

What I am using shows its flashing someplace but not where the board is booting from.

**********************************************
*                                            *
*  Step 1: Build the flashing environment    *
*                                            *
**********************************************
Create flash environment 0
/home/fred/yocto/jetson_linux_36.4/Linux_for_Tegra/bootloader /home/fred/yocto/jetson_linux_36.4/Linux_for_Tegra
/home/fred/yocto/jetson_linux_36.4/Linux_for_Tegra
Finish creating flash environment 0.
****************************************************
*                                                  *
*  Step 2: Boot the device with flash initrd image *
*                                                  *
****************************************************
/home/fred/yocto/jetson_linux_36.4/Linux_for_Tegra/temp_initrdflash/bootloader0 /home/fred/yocto/jetson_linux_36.4/Linux_for_Tegra
./tegraflash.py --bl uefi_jetson_with_dtb_aligned_blob_w_bin_sigheader.bin.encrypt --bct br_bct_BR.bct --securedev  --bldtb tegra234-p3768-0000+p3767-0005-nv.dtb --applet rcm_2_encrypt.rcm --applet_softfuse rcm_1_encrypt.rcm --instance 1-10 --cmd "rcmboot"  --cfg secureflash.xml --chip 0x23 --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 --mb1_bin mb1_t234_prod_aligned_sigheader.bin.encrypt --psc_bl1_bin psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --mem_bct_cold_boot mem_coldboot_sigheader.bct.encrypt  --bins "psc_fw pscfw_t234_prod_sigheader.bin.encrypt; mts_mce mce_flash_o10_cr_prod_sigheader.bin.encrypt; tsec_fw tsec_t234_sigheader.bin.encrypt; mb2_applet applet_t234_sigheader.bin.encrypt; mb2_bootloader mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt; xusb_fw xusb_t234_prod_sigheader.bin.encrypt; pva_fw nvpva_020_sigheader.fw.encrypt; dce_fw display-t234-dce_sigheader.bin.encrypt; nvdec nvdec_t234_prod_sigheader.fw.encrypt; bpmp_fw bpmp_t234-TE950M-A1_prod_sigheader.bin.encrypt; bpmp_fw_dtb tegra234-bpmp-3767-0003-3509-a02_with_odm_sigheader.dtb.encrypt; rce_fw camera-rtcpu-t234-rce_sigheader.img.encrypt; ape_fw adsp-fw_sigheader.bin.encrypt; spe_fw spe_t234_sigheader.bin.encrypt; tos tos-optee_t234_sigheader.img.encrypt; eks eks_t234_sigheader.img.encrypt; kernel boot0.img; kernel_dtb tegra234-p3768-0000+p3767-0005-nv.dtb"    --bct_backup 
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.0167 ] mb1_t234_prod_aligned_sigheader.bin.encrypt filename is from --mb1_bin
[   0.0167 ] psc_bl1_t234_prod_aligned_sigheader.bin.encrypt filename is from --psc_bl1_bin
[   0.0167 ] rcm boot with presigned binaries
[   0.0170 ] tegrarcm_v2 --instance 1-10 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
[   0.0171 ] BR_CID: 0x80012344705DF6421400000001018100
[   0.0253 ] Sending bct_br
[   0.0325 ] Sending mb1
[   0.0329 ] Sending psc_bl1
[   0.0434 ] Sending bct_mb1
[   0.0500 ] Generating blob for T23x
[   0.0512 ] tegrahost_v2 --chip 0x23 0 --generateblob blob.xml blob.bin
[   0.0514 ] The number of images in blob is 19
[   0.0517 ] blobsize is 100615689
[   0.0518 ] Added binary blob_uefi_jetson_with_dtb_aligned_blob_w_bin_sigheader.bin.encrypt of size 3301504
[   0.0831 ] Added binary blob_pscfw_t234_prod_sigheader.bin.encrypt of size 310768
[   0.0833 ] Added binary blob_mce_flash_o10_cr_prod_sigheader.bin.encrypt of size 187120
[   0.0835 ] Added binary blob_tsec_t234_sigheader.bin.encrypt of size 176128
[   0.0836 ] Added binary blob_applet_t234_sigheader.bin.encrypt of size 279808
[   0.0837 ] Not supported type: mb2_applet
[   0.0838 ] Added binary blob_mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt of size 440944
[   0.0839 ] Added binary blob_xusb_t234_prod_sigheader.bin.encrypt of size 164864
[   0.0840 ] Added binary blob_nvpva_020_sigheader.fw.encrypt of size 2164640
[   0.0845 ] Added binary blob_display-t234-dce_sigheader.bin.encrypt of size 12070656
[   0.0889 ] Added binary blob_nvdec_t234_prod_sigheader.fw.encrypt of size 294912
[   0.0901 ] Added binary blob_bpmp_t234-TE950M-A1_prod_sigheader.bin.encrypt of size 1027008
[   0.0905 ] Added binary blob_tegra234-bpmp-3767-0003-3509-a02_with_odm_sigheader.dtb.encrypt of size 204736
[   0.0906 ] Added binary blob_camera-rtcpu-t234-rce_sigheader.img.encrypt of size 458096
[   0.0907 ] Added binary blob_adsp-fw_sigheader.bin.encrypt of size 415232
[   0.0909 ] Added binary blob_spe_t234_sigheader.bin.encrypt of size 270336
[   0.0910 ] Added binary blob_tos-optee_t234_sigheader.img.encrypt of size 1887312
[   0.0918 ] Added binary blob_eks_t234_sigheader.img.encrypt of size 9232
[   0.0919 ] Added binary blob_boot0.img of size 76701696
[   0.1195 ] Added binary blob_tegra234-p3768-0000+p3767-0005-nv.dtb of size 249593
[   0.1602 ] tegrarcm_v2 --instance 1-10 --chip 0x23 0 --pollbl --download bct_mem mem_rcm_sigheader.bct.encrypt --download blob blob.bin
[   0.1604 ] BL: version 1.4.0.4-t234-54845784-e89ea9bc last_boot_error: 0
[   0.3121 ] Sending bct_mem
[   0.3344 ] Sending blob
[   5.7795 ] RCM-boot started

/home/fred/yocto/jetson_linux_36.4/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 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 ......Waiting for device to expose ssh ...Run command: flash on fc00:1:1:0::2
SSH ready
blockdev: cannot open /dev/mmcblk0boot0: No such file or directory
[ 0]: l4t_flash_from_kernel: Serial Number: 1422724339783
[ 0]: l4t_flash_from_kernel: Starting to flash to external device
Active index file is /mnt/external/flash.idx
Number of lines is 18
max_index=17
writing item=0, 9:0:master_boot_record, 0, 512, mbr_9_0.bin, 512, fixed-<reserved>-0, 694898d1c345bdb31b377790ed7fc0b0db184bf7
writing item=1, 9:0:primary_gpt, 512, 19968, gpt_primary_9_0.bin, 16896, fixed-<reserved>-0, 07ab4e0d833c5ff740c02ea669fd84f690bf3038
writing item=2, 9:0:A_kernel, 20480, 134217728, boot.img, 58177536, fixed-<reserved>-2, 90c6d284b3b26ffb3bc5f3ea3188da8418ba9689
Skip writing A_kernel
writing item=3, 9:0:A_kernel-dtb, 134238208, 786432, kernel_tegra234-p3768-0000+p3767-0005-nv.dtb, 249593, fixed-<reserved>-3, cb0bd420bd258e3b111cf272f313e841da8cd6bb
Writing A_kernel-dtb partition with kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
Get size of partition through connection.
249593 bytes from /mnt/external/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb to /dev/nvme0n1: 1KB block=243 remainder=761
dd if=/mnt/external/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb of=/dev/nvme0n1 bs=1K skip=0  seek=131092 count=243
243+0 records in
243+0 records out
248832 bytes (249 kB, 243 KiB) copied, 0.00742269 s, 33.5 MB/s
dd if=/mnt/external/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb of=/dev/nvme0n1 bs=1 skip=248832  seek=134487040 count=761
761+0 records in
761+0 records out
761 bytes copied, 0.00247104 s, 308 kB/s
Writing A_kernel-dtb partition done
writing item=4, 9:0:A_reserved_on_user, 135024640, 33161216, , , fixed-<reserved>-4, 
[ 0]: l4t_flash_from_kernel: Warning: skip writing A_reserved_on_user partition as no image is specified
writing item=5, 9:0:B_kernel, 168185856, 134217728, boot.img, 58177536, fixed-<reserved>-5, 90c6d284b3b26ffb3bc5f3ea3188da8418ba9689
Skip writing B_kernel
writing item=6, 9:0:B_kernel-dtb, 302403584, 786432, kernel_tegra234-p3768-0000+p3767-0005-nv.dtb, 249593, fixed-<reserved>-6, cb0bd420bd258e3b111cf272f313e841da8cd6bb
Skip writing B_kernel-dtb
writing item=7, 9:0:B_reserved_on_user, 303190016, 33161216, , , fixed-<reserved>-7, 
[ 0]: l4t_flash_from_kernel: Warning: skip writing B_reserved_on_user partition as no image is specified
writing item=8, 9:0:recovery, 336351232, 83886080, recovery.img, 63283200, fixed-<reserved>-8, da88bc55a84d0f3cea19fb8741a7c8ec8b110c3b
Skip writing recovery
writing item=9, 9:0:recovery-dtb, 420237312, 524288, tegra234-p3768-0000+p3767-0005-nv.dtb.rec, 249593, fixed-<reserved>-9, cb0bd420bd258e3b111cf272f313e841da8cd6bb
Skip writing recovery-dtb
writing item=10, 9:0:esp, 420761600, 67108864, esp.img, 67108864, fixed-<reserved>-10, 82e42c2c6574c3b491bde5aa69caff741f122756
Skip writing esp
writing item=11, 9:0:recovery_alt, 487870464, 83886080, , , fixed-<reserved>-11, 
[ 1]: l4t_flash_from_kernel: Warning: skip writing recovery_alt partition as no image is specified
writing item=12, 9:0:recovery-dtb_alt, 571756544, 524288, , , fixed-<reserved>-12, 
[ 1]: l4t_flash_from_kernel: Warning: skip writing recovery-dtb_alt partition as no image is specified
writing item=13, 9:0:esp_alt, 572280832, 67108864, , , fixed-<reserved>-13, 
[ 1]: l4t_flash_from_kernel: Warning: skip writing esp_alt partition as no image is specified
writing item=14, 9:0:UDA, 639401984, 419430400, , , fixed-<reserved>-14, 
Skip writing UDA
writing item=15, 9:0:reserved, 1058832384, 502792192, , , fixed-<reserved>-15, 
[ 1]: l4t_flash_from_kernel: Warning: skip writing reserved partition as no image is specified
writing item=16, 9:0:APP, 1561624576, 59641638912, , , expand-<reserved>-1, 
Skip writing APP
writing item=17, 9:0:secondary_gpt, 61203267072, 16896, gpt_secondary_9_0.bin, 16896, fixed-<reserved>-0, aff71634bcb1d8fbded8101007b46fbb9f576133
[ 1]: l4t_flash_from_kernel: Successfully flash the external device
[ 1]: l4t_flash_from_kernel: Flashing partition A_kernel-dtb success
Flash is successful
Reboot device
Cleaning up...

Script clearly states successful, yet the same kernel is booting.

For rel-36, kernel is read from rootfs (/boot/Image) directly. So updating kernel partition won’t be its first priority to read.

And kernel-dtb is read from UEFI-dtb, so updating kernel-dtb partition won’t make any effect either.

If you want to update it through flash, then put your new dtb and new Image into Linux_for_Tegra/kernel directly to make it work.

If you want a quick partially update, I would suggest directly copy kernel image to system and replace old file.

Also, add FDT field in /boot/extlinux/extlinux.conf and let device tree get read from rootfs (/boot/dtb) too. After that you could copy kernel dtb into system and replace file by that path.

It is and that does not work.

How is the UEFI boot sector updated?

How can we disable the UEFI setup, this is board is turning into a disaster. We are not building desktops for public use, our systems are embedded control systems. That does not and will not need the UEFI.

Only way the flash is usable is a complete image install.

Just to clarify. What I was trying to say is updating a partial partition won’t really upgrade the kernel and dtb… even if you put it in Linux_for_Tegra/kernel. You have to do full flash.

If you don’t want full flash, I already provided the method in previous comment.

And disabling UEFI is not supported here.

Is UEFI going to be the format going forward?

Yes, UEFI is necessary bootloader and lots of features are based on it…
For example, even the OTA upgrade requires UEFI.

I don’t know what kind of bootloader you are expecting to be used if you remove UEFI…

Thank you for responding to this issue, however we don’t need UEFI.

You can do any customization as you want. What I can say here is our support is based on a existing boot flow.
For those we think it won’t work, we can only warn you about that in advance.

We use Yocto and I did build an image before purchasing the board. However we are hitting so many roadblocks with your board it is putting us behind schedule. The image we had built in yocto has not been tested yet because we need a known working platform to guide the yocto build. From what I am seeing so far it does not look promising for a yocto build. Is that going to fail?

Yocto is not directly supported by us. But there are dedicated partners working on it and they are active replying in this forum too. Is it okay that you filed your question about Yocto in a new topic and we let them reply to you directly?

Thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.