Flash to USB on Non-Jetson Device without ORIN NX 16GB Connected

Hi, I am current trying to find out how to flash to USB drive without the need for the USB drive to be connected to ORIN NX itself.

Hi,

I believe this is what you are looking for:
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/FlashingSupport.html#to-set-up-a-flash-drive-manually-for-booting

I have attempted the instructions with

sudo time ./tools/kernel_flash/l4t_initrd_flash.sh -S 60GiB -c tools/kernel_flash/flash_l4t_external.xml --external-device sdb1 --external-only p3509-a02+p3767-0000 external

Error: Return value 4
Command tegraparser_v2 --generategpt --pt flash.xml.bin
Error: /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...
Command exited with non-zero status 1
18.15user 47.05system 5:03.02elapsed 21%CPU (0avgtext+0avgdata 45488maxresident)k
17528847inputs+22855296outputs (80major+287031minor)pagefaults 0swaps

I also attempted to repeat with

sudo BOARDID=3767 BOARDSKU=0000 FAB=TS2 ./tools/kernel_flash/l4t_initrd_flash.sh -S 60GiB  -c tools/kernel_flash/flash_l4t_external.xml --external-device sdb1 --external-only p3509-a02+p3767-0000 external

with the same error

Have you checked the link I pasted?
I think you should be doing like:

sudo <env-var> ./tools/kernel_flash/l4t_initrd_flash.sh [ -S <rootfssize> ] -c tools/kernel_flash/flash_l4t_external.xml --external-device sda1 --direct <sdx> p3509-a02+p3767-0000 external

If there is no Jetson device in force recovery mode connected to the host PC, then you have to manually pass the board information to the flashing script. I’m not sure whether you are using Orin NX 16GB or 8GB, so please check README_initrd_flash.txt for it.

Also, you have to specify the --direct <sdx> parameter, which is how the USB drive is recognized in your host PC.

You should use either one of them:

#    jetson-orin-nano-devkit (NX 16GB)    3767     0000      300
#    jetson-orin-nano-devkit (NX 8GB)     3767     0001      300

Also, please always put the full log here, and don’t crop it yourself.

Hi, may I check 300 is referring to which variable? I am assuming it is the FAB. Also I am using Orin NX 16GB

It comes from Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt.

Appendix:

Environment variables value table:

#
#                                       BOARDID  BOARDSKU  FAB  BOARDREV
#    ----------------------------------+--------+---------+----+---------
#    jetson-agx-xavier-industrial         2888     0008      600  A.0
#    clara-agx-xavier-devkit              3900     0000      001  C.0
#    jetson-xavier-nx-devkit              3668     0000      100  N/A
#    jetson-xavier-nx-devkit-emmc         3668     0001      100  N/A
#    jetson-xavier-nx-devkit-emmc         3668     0003      N/A  N/A
#    jetson-agx-xavier-devkit (16GB)      2888     0001      400  H.0
#    jetson-agx-xavier-devkit (32GB)      2888     0004      400  K.0
#    jetson-agx-orin-devkit               3701     0001      TS1  C.2
#    jetson-agx-orin-devkit               3701     0000      TS4  A.0
#    jetson-agx-xavier-devkit (64GB)      2888     0005      402  B.0
#    holoscan-devkit                      3701     0002      TS1  A.0
#    jetson-agx-orin-devkit               3701     0004      TS4  A.0
#    jetson-agx-orin-devkit (64GB)        3701     0005      500
#    jetson-orin-nano-devkit (NX 16GB)    3767     0000      300
#    jetson-orin-nano-devkit (NX 8GB)     3767     0001      300
#    jetson-orin-nano-devkit (Nano 4GB)   3767     0004      300
#    jetson-orin-nano-devkit (Nano 8GB)   3767     0003      300
#    jetson-orin-nano-devkit (Nano 8GB)   3767     0005      300
#    ----------------------------------+--------+---------+----+---------

Alright, just saw as I could not find the Orin NX until you stated it. May I check if the external USB will be automatically modified? So, no action is required on my side to delete items?

sudo BOARDID=3767 BOARDSKU=0000 FAB=300 ./tools/kernel_flash/l4t_initrd_flash.sh -S 60GiB  -c tools/kernel_flash/flash_l4t_external.xml --external-device sda1 --direct sdb1 --showlogs --external-only p3509-a02+p3767-0000 external
Existing bpffile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/bpmp_t234-TE990M-A1_prod.bin) reused.
copying bpfdtbfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/t186ref/tegra234-bpmp-3767-0000-a02-3509-a02.dtb)... done.
Existing scefile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/camera-rtcpu-sce.img) reused.
Existing camerafw(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/camera-rtcpu-t234-rce.img) reused.
Existing apefile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/adsp-fw.bin) reused.
Existing spefile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/spe_t234.bin) reused.
Existing wb0boot(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/sc7_t234_prod.bin) reused.
Existing tosfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/tos-optee_t234.img) reused.
Existing eksfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/eks_t234.img) reused.
copying dtbfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/kernel/dtb/tegra234-p3767-0000-p3509-a02.dtb)... done.
Copying nv_boot_control.conf to rootfs
	populating kernel to rootfs... done.
	populating initrd to rootfs... done.
	populating kernel_tegra234-p3767-0000-p3509-a02.dtb to rootfs... done.
Making system.img... 
	Setting "FDT /boot/dtb/kernel_tegra234-p3767-0000-p3509-a02.dtb" successfully in the extlinux.conf...done.
	populating rootfs from /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/rootfs ... 	populating /boot/extlinux/extlinux.conf ... done.
	Sync'ing system.img ... done.
	Converting RAW image to Sparse image... done.
system.img built successfully. 
Not signing of kernel-dtb
Existing tbcfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/uefi_jetson.bin) reused.
131072+0 records in
131072+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 2.37781 s, 28.2 MB/s
	Sync'ing esp.img ... done.
copying tbcdtbfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/kernel/dtb/tegra234-p3767-0000-p3509-a02.dtb)... done.
copying cfgfile(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/tools/kernel_flash/flash_l4t_external.xml) to flash.xml... done.
Existing flashapp(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/tegraflash.py) reused.
copying overlay_dtb(/home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/kernel/dtb/L4TConfiguration.dtbo)... done.
./tegraflash.py  --bl uefi_jetson_with_dtb.bin  --odmdata gbe-uphy-config-8,hsstp-lane-map-3,hsio-uphy-config-0  --overlay_dtb L4TConfiguration.dtbo,  --bldtb tegra234-p3767-0000-p3509-a02.dtb --applet mb1_t234_prod.bin --cmd "sign"  --cfg flash.xml --chip 0x23 --concat_cpubl_bldtb --cpubl uefi_jetson.bin --device_config tegra234-mb1-bct-device-p3767-0000.dts --misc_config tegra234-mb1-bct-misc-p3767-0000.dts --pinmux_config tegra234-mb1-bct-pinmux-p3767-hdmi-a03.dtsi --gpioint_config tegra234-mb1-bct-gpioint-p3767-0000.dts --pmic_config tegra234-mb1-bct-pmic-p3767-0000-a02.dts --pmc_config tegra234-mb1-bct-padvoltage-p3767-hdmi-a03.dtsi --deviceprod_config tegra234-mb1-bct-cprod-p3767-0000.dts --prod_config tegra234-mb1-bct-prod-p3767-0000.dts --scr_config tegra234-mb2-bct-scr-p3767-0000.dts --wb0sdram_config tegra234-p3767-0000-wb0sdram-l4t.dts --br_cmd_config tegra234-mb1-bct-reset-p3767-0000.dts --dev_params tegra234-br-bct-p3767-0000-l4t.dts,tegra234-br-bct_b-p3767-0000-l4t.dts --mb2bct_cfg tegra234-mb2-bct-misc-p3767-0000.dts  --bins "psc_fw pscfw_t234_prod.bin; mts_mce mce_flash_o10_cr_prod.bin; mb2_applet applet_t234.bin; mb2_bootloader mb2_t234.bin; xusb_fw xusb_t234_prod.bin; dce_fw display-t234-dce.bin; nvdec nvdec_t234_prod.fw; bpmp_fw bpmp_t234-TE990M-A1_prod.bin; bpmp_fw_dtb tegra234-bpmp-3767-0000-a02-3509-a02.dtb; sce_fw camera-rtcpu-sce.img; rce_fw camera-rtcpu-t234-rce.img; ape_fw adsp-fw.bin; spe_fw spe_t234.bin; tos tos-optee_t234.img; eks eks_t234.img"  --sdram_config tegra234-p3767-0000-sdram-l4t.dts --external_device  --boot_chain A 
saving flash command in /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/flashcmd.txt
saving Windows flash command to /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/flash_win.bat
*** Sign and generate flashing ready partition images... *** 
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0170 ] tegrasign_v3.py --key None --getmode mode.txt
[   0.0171 ] Assuming zero filled SBK key
[   0.0114 ] Parsing partition layout
[   0.0159 ] tegraparser_v2 --pt flash.xml.tmp
[   0.0372 ] /usr/bin/python3 dtbcheck.py -c t234 -o tegra234-bpmp-3767-0000-a02-3509-a02_with_odm.dtb tegra234-bpmp-3767-0000-a02-3509-a02_with_odm_tmp.dtb
[   0.2860 ] Concatenating L4TConfiguration.dtbo to tegra234-p3767-0000-p3509-a02_with_odm.dtb
[   0.2860 ] Concatenating bl dtb to cpubl binary
[   0.2876 ] Kernel DTB used: kernel_tegra234-p3767-0000-p3509-a02.dtb
[   0.2876 ] Parsing partition layout
[   0.2884 ] tegraparser_v2 --pt flash.xml.tmp
[   0.2893 ] Creating list of images to be signed
[   0.2972 ] tegrahost_v2 --chip 0x23 0 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[   0.2990 ] Filling MB1 storage info
[   0.2990 ] Parsing dev params for multi chains
[   0.4020 ] Generating br-bct
[   2.1948 ] Updating dev and MSS params in BR BCT
[   2.1948 ] tegrabct_v2 --dev_param tegra234-br-bct-p3767-0000-l4t_cpp.dtb --sdram tegra234-p3767-0000-sdram-l4t_cpp.dtb --brbct br_bct.cfg --chip 0x23 0
[   2.2594 ] Updating bl info
[   2.2602 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updateblinfo flash.xml.bin
[   2.2673 ] Generating br-bct
[   2.2691 ] Updating dev and MSS params in BR BCT
[   2.2691 ] tegrabct_v2 --dev_param tegra234-br-bct_b-p3767-0000-l4t_cpp.dtb --sdram tegra234-p3767-0000-sdram-l4t_cpp.dtb --brbct br_bct.cfg --chip 0x23 0
[   2.3318 ] Updating bl info
[   2.3325 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updateblinfo flash.xml.bin
[   2.3334 ] Generating signatures
[   2.3397 ] tegrasign_v3.py --key None --list images_list.xml --pubkeyhash pub_key.key --sha sha512
[   2.3398 ] Assuming zero filled SBK key
[   2.3401 ] Warning: pub_key.key is not found
[   2.3340 ] Pre-processing config: tegra234-mb1-bct-reset-p3767-0000.dts
[   2.3404 ] Pre-processing config: tegra234-mb1-bct-device-p3767-0000.dts
[   2.3496 ] Pre-processing config: tegra234-mb1-bct-cprod-p3767-0000.dts
[   2.3603 ] Pre-processing config: tegra234-mb1-bct-gpioint-p3767-0000.dts
[   2.3728 ] Pre-processing config: tegra234-mb1-bct-misc-p3767-0000.dts
[   2.3896 ] Pre-processing config: tegra234-mb1-bct-pinmux-p3767-hdmi-a03.dtsi
[   2.4077 ] Pre-processing config: tegra234-mb1-bct-padvoltage-p3767-hdmi-a03.dtsi
[   2.4124 ] Pre-processing config: tegra234-mb1-bct-pmic-p3767-0000-a02.dts
[   2.4163 ] Pre-processing config: tegra234-mb1-bct-prod-p3767-0000.dts
[   2.4212 ] Pre-processing config: tegra234-mb2-bct-scr-p3767-0000.dts
[   2.7720 ] Pre-processing config: tegra234-p3767-0000-wb0sdram-l4t.dts
[   4.6570 ] Parsing dev params for multi chains
[   4.6571 ] Generating br-bct
[   4.6583 ] Updating dev and MSS params in BR BCT
[   4.6584 ] tegrabct_v2 --dev_param tegra234-br-bct-p3767-0000-l4t_cpp.dtb --sdram tegra234-p3767-0000-sdram-l4t_cpp.dtb --brbct br_bct.cfg --chip 0x23 0
[   4.7234 ] Updating bl info
[   4.7241 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   4.7250 ] Get Signed section of bct
[   4.7257 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --listbct bct_list.xml
[   4.7269 ] Signing BCT
[   4.7332 ] tegrasign_v3.py --key None --list bct_list.xml --pubkeyhash pub_key.key --sha sha512
[   4.7334 ] Assuming zero filled SBK key
[   4.7469 ] Sha saved in br_bct_BR.sha
[   4.7475 ] Warning: pub_key.key is not found
[   4.7414 ] Updating BCT with signature
[   4.7433 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updatesig bct_list_signed.xml
[   4.7449 ] Offset :4608 Len :3584
[   4.7458 ] Generating SHA2 Hash
[   4.7521 ] tegrasign_v3.py --key None --list bct_list.xml --sha sha512
[   4.7524 ] Assuming zero filled SBK key
[   4.7524 ] Assuming zero filled SBK key
[   4.7578 ] Sha saved in br_bct_BR.sha
[   4.7519 ] Updating BCT with SHA2 Hash
[   4.7525 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updatesha bct_list_signed.xml
[   4.7531 ] Offset :4608 Len :3584
[   4.7533 ] Offset :68 Len :8124
[   4.7605 ] Generating br-bct
[   4.7622 ] Updating dev and MSS params in BR BCT
[   4.7623 ] tegrabct_v2 --dev_param tegra234-br-bct_b-p3767-0000-l4t_cpp.dtb --sdram tegra234-p3767-0000-sdram-l4t_cpp.dtb --brbct br_bct.cfg --chip 0x23 0
[   4.8254 ] Updating bl info
[   4.8261 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   4.8269 ] Get Signed section of bct
[   4.8275 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --listbct bct_list.xml
[   4.8282 ] Signing BCT
[   4.8345 ] tegrasign_v3.py --key None --list bct_list.xml --pubkeyhash pub_key.key --sha sha512
[   4.8346 ] Assuming zero filled SBK key
[   4.8366 ] Sha saved in br_bct_BR.sha
[   4.8368 ] Warning: pub_key.key is not found
[   4.8307 ] Updating BCT with signature
[   4.8312 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updatesig bct_list_signed.xml
[   4.8318 ] Offset :4608 Len :3584
[   4.8699 ] Generating SHA2 Hash
[   4.8762 ] tegrasign_v3.py --key None --list bct_list.xml --sha sha512
[   4.8765 ] Assuming zero filled SBK key
[   4.8765 ] Assuming zero filled SBK key
[   4.8819 ] Sha saved in br_bct_BR.sha
[   4.8764 ] Updating BCT with SHA2 Hash
[   4.8780 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x23 0 --updatesha bct_list_signed.xml
[   4.8797 ] Offset :4608 Len :3584
[   4.8802 ] Offset :68 Len :8124
[   4.8849 ] Generating coldboot mb1-bct
[   4.8866 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_cold_boot_bct.cfg --misc tegra234-mb1-bct-misc-p3767-0000_cpp.dtb --wb0sdram tegra234-p3767-0000-wb0sdram-l4t_cpp.dtb --pinmux tegra234-mb1-bct-pinmux-p3767-hdmi-a03_cpp.dtb --pmc tegra234-mb1-bct-padvoltage-p3767-hdmi-a03_cpp.dtb --pmic tegra234-mb1-bct-pmic-p3767-0000-a02_cpp.dtb --brcommand tegra234-mb1-bct-reset-p3767-0000_cpp.dtb --prod tegra234-mb1-bct-prod-p3767-0000_cpp.dtb --gpioint tegra234-mb1-bct-gpioint-p3767-0000_cpp.dtb --device tegra234-mb1-bct-device-p3767-0000_cpp.dtb --deviceprod tegra234-mb1-bct-cprod-p3767-0000_cpp.dtb
[   4.8884 ] MB1-BCT version: 0.9
[   4.8888 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED5/ is not supported
[   4.8896 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED5/ is not supported
[   4.8900 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED5/ is not supported
[   4.8905 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_MCE_COVERAGE/ is not supported
[   4.8910 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_MCE_COVERAGE/ is not supported
[   4.8915 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_MCE_COVERAGE/ is not supported
[   4.8919 ] ERROR: /misc/vmon/vdd_soc/int/ is not supported
[   4.8922 ] ERROR: /misc/vmon/vdd_soc/int/ is not supported
[   4.8925 ] ERROR: /misc/vmon/vdd_cpu/int/ is not supported
[   4.8928 ] ERROR: /misc/vmon/vdd_cpu/int/ is not supported

[   4.8931 ] Parsing config file :tegra234-mb1-bct-pinmux-p3767-hdmi-a03_cpp.dtb 
[   4.8932 ] Added Platform Config 0 data with size :- 2424

[   4.8939 ] Parsing config file :tegra234-mb1-bct-padvoltage-p3767-hdmi-a03_cpp.dtb 
[   4.8942 ] WARNING: unknown node 'g2'
[   4.8942 ] WARNING: unknown node 'g2'
[   4.8942 ] WARNING: unknown node 'g9'
[   4.8942 ] WARNING: unknown node 'g9'
[   4.8942 ] Added Platform Config 2 data with size :- 24
[   4.8942 ] 
[   4.8942 ] Parsing config file :tegra234-mb1-bct-pmic-p3767-0000-a02_cpp.dtb 
[   4.8942 ] Added Platform Config 4 data with size :- 264
[   4.8942 ] 
[   4.8942 ] Parsing config file :tegra234-mb1-bct-reset-p3767-0000_cpp.dtb 
[   4.8942 ] Added Platform Config 3 data with size :- 52
[   4.8942 ] 
[   4.8942 ] Parsing config file :tegra234-mb1-bct-prod-p3767-0000_cpp.dtb 
[   4.8942 ] WARNING: unknown property 'major'
[   4.8942 ] WARNING: unknown property 'minor'
[   4.8942 ] Added Platform Config 5 data with size :- 500
[   4.8942 ] 
[   4.8942 ] Parsing config file :tegra234-mb1-bct-gpioint-p3767-0000_cpp.dtb 
[   4.8942 ] WARNING: unknown property 'major'
[   4.8942 ] WARNING: unknown property 'minor'
[   4.8942 ] Added Platform Config 7 data with size :- 380
[   4.8942 ] 
[   4.8942 ] Parsing config file :tegra234-mb1-bct-device-p3767-0000_cpp.dtb 
[   4.8943 ] Added Platform Config 9 data with size :- 100
[   4.8943 ] 
[   4.8943 ] Parsing config file :tegra234-mb1-bct-cprod-p3767-0000_cpp.dtb 
[   4.8943 ] ModuleCount 0 NumProdNames 0
[   4.8943 ] Added Platform Config 6 data with size :- 16
[   4.8943 ] 
[   4.8943 ] Updating mb1-bct with firmware information
[   4.8949 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_cold_boot_bct_MB1.bct --updatefwinfo flash.xml.bin
[   4.8963 ] tegrahost_v2 --chip 0x23 0 --align mb1_cold_boot_bct_MB1_aligned.bct
[   4.8974 ] tegrahost_v2 --chip 0x23 0 --magicid MBCT --appendsigheader mb1_cold_boot_bct_MB1_aligned.bct zerosbk
[   4.8979 ] adding BCH for mb1_cold_boot_bct_MB1_aligned.bct
[   4.9047 ] tegrasign_v3.py --key None --list mb1_cold_boot_bct_MB1_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512
[   4.9048 ] Assuming zero filled SBK key
[   4.9058 ] Warning: pub_key.key is not found
[   4.9001 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mb1_cold_boot_bct_MB1_aligned_sigheader.bct.encrypt mb1_cold_boot_bct_MB1_aligned_sigheader.bct.hash zerosbk
[   4.9010 ] Generating recovery mb1-bct
[   4.9015 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_bct.cfg --misc tegra234-mb1-bct-misc-p3767-0000_cpp.dtb --wb0sdram tegra234-p3767-0000-wb0sdram-l4t_cpp.dtb --pinmux tegra234-mb1-bct-pinmux-p3767-hdmi-a03_cpp.dtb --pmc tegra234-mb1-bct-padvoltage-p3767-hdmi-a03_cpp.dtb --pmic tegra234-mb1-bct-pmic-p3767-0000-a02_cpp.dtb --brcommand tegra234-mb1-bct-reset-p3767-0000_cpp.dtb --prod tegra234-mb1-bct-prod-p3767-0000_cpp.dtb --gpioint tegra234-mb1-bct-gpioint-p3767-0000_cpp.dtb --device tegra234-mb1-bct-device-p3767-0000_cpp.dtb --deviceprod tegra234-mb1-bct-cprod-p3767-0000_cpp.dtb
[   4.9020 ] MB1-BCT version: 0.9
[   4.9020 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED5/ is not supported
[   4.9022 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED5/ is not supported
[   4.9024 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_UNUSED5/ is not supported
[   4.9025 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_MCE_COVERAGE/ is not supported
[   4.9026 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_MCE_COVERAGE/ is not supported
[   4.9028 ] ERROR: carveout /misc/carveout/aux_info@CARVEOUT_MCE_COVERAGE/ is not supported
[   4.9029 ] ERROR: /misc/vmon/vdd_soc/int/ is not supported
[   4.9030 ] ERROR: /misc/vmon/vdd_soc/int/ is not supported
[   4.9030 ] ERROR: /misc/vmon/vdd_cpu/int/ is not supported
[   4.9031 ] ERROR: /misc/vmon/vdd_cpu/int/ is not supported

[   4.9032 ] Parsing config file :tegra234-mb1-bct-pinmux-p3767-hdmi-a03_cpp.dtb 
[   4.9033 ] Added Platform Config 0 data with size :- 2424

[   4.9041 ] Parsing config file :tegra234-mb1-bct-padvoltage-p3767-hdmi-a03_cpp.dtb 
[   4.9042 ] WARNING: unknown node 'g2'
[   4.9043 ] WARNING: unknown node 'g2'
[   4.9043 ] WARNING: unknown node 'g9'
[   4.9043 ] WARNING: unknown node 'g9'
[   4.9043 ] Added Platform Config 2 data with size :- 24
[   4.9043 ] 
[   4.9043 ] Parsing config file :tegra234-mb1-bct-pmic-p3767-0000-a02_cpp.dtb 
[   4.9043 ] Added Platform Config 4 data with size :- 264
[   4.9043 ] 
[   4.9043 ] Parsing config file :tegra234-mb1-bct-reset-p3767-0000_cpp.dtb 
[   4.9043 ] Added Platform Config 3 data with size :- 52
[   4.9043 ] 
[   4.9043 ] Parsing config file :tegra234-mb1-bct-prod-p3767-0000_cpp.dtb 
[   4.9043 ] WARNING: unknown property 'major'
[   4.9043 ] WARNING: unknown property 'minor'
[   4.9043 ] Added Platform Config 5 data with size :- 500
[   4.9043 ] 
[   4.9043 ] Parsing config file :tegra234-mb1-bct-gpioint-p3767-0000_cpp.dtb 
[   4.9043 ] WARNING: unknown property 'major'
[   4.9043 ] WARNING: unknown property 'minor'
[   4.9043 ] Added Platform Config 7 data with size :- 380
[   4.9043 ] 
[   4.9043 ] Parsing config file :tegra234-mb1-bct-device-p3767-0000_cpp.dtb 
[   4.9043 ] Added Platform Config 9 data with size :- 100
[   4.9043 ] 
[   4.9043 ] Parsing config file :tegra234-mb1-bct-cprod-p3767-0000_cpp.dtb 
[   4.9043 ] ModuleCount 0 NumProdNames 0
[   4.9043 ] Added Platform Config 6 data with size :- 16
[   4.9043 ] 
[   4.9043 ] Updating mb1-bct with firmware information
[   4.9048 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_bct_MB1.bct --recov --updatefwinfo flash.xml.bin
[   4.9100 ] tegrahost_v2 --chip 0x23 0 --align mb1_bct_MB1_aligned.bct
[   4.9111 ] tegrahost_v2 --chip 0x23 0 --magicid MBCT --appendsigheader mb1_bct_MB1_aligned.bct zerosbk
[   4.9116 ] adding BCH for mb1_bct_MB1_aligned.bct
[   4.9193 ] tegrasign_v3.py --key None --list mb1_bct_MB1_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512
[   4.9196 ] Assuming zero filled SBK key
[   4.9227 ] Warning: pub_key.key is not found
[   4.9183 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mb1_bct_MB1_aligned_sigheader.bct.encrypt mb1_bct_MB1_aligned_sigheader.bct.hash zerosbk
[   4.9208 ] Generating coldboot mem-bct
[   4.9214 ] tegrabct_v2 --chip 0x23 0 --sdram tegra234-p3767-0000-sdram-l4t_cpp.dtb --wb0sdram tegra234-p3767-0000-wb0sdram-l4t_cpp.dtb --membct tegra234-p3767-0000-sdram-l4t_cpp_1.bct tegra234-p3767-0000-sdram-l4t_cpp_2.bct tegra234-p3767-0000-sdram-l4t_cpp_3.bct tegra234-p3767-0000-sdram-l4t_cpp_4.bct
[   4.9220 ]  packing sdram params with Wb0 file tegra234-p3767-0000-wb0sdram-l4t_cpp.dtb
[   4.9850 ] Packing sdram param for instance[0]
[   4.9852 ] Packing sdram param for instance[1]
[   4.9853 ] Packing sdram param for instance[2]
[   4.9855 ] Packing sdram param for instance[3]
[   4.9856 ] Packing sdram param for instance[4]
[   4.9857 ] Packing sdram param for instance[5]
[   4.9859 ] Packing sdram param for instance[6]
[   4.9860 ] Packing sdram param for instance[7]
[   4.9862 ] Packing sdram param for instance[8]
[   4.9863 ] Packing sdram param for instance[9]
[   4.9864 ] Packing sdram param for instance[10]
[   4.9866 ] Packing sdram param for instance[11]
[   4.9867 ] Packing sdram param for instance[12]
[   4.9869 ] Packing sdram param for instance[13]
[   4.9870 ] Packing sdram param for instance[14]
[   4.9872 ] Packing sdram param for instance[15]
[   5.0415 ] Getting sector size from pt
[   5.0424 ] tegraparser_v2 --getsectorsize flash.xml.bin sector_info.bin
[   5.0431 ] BlockSize read from layout is 0x200

[   5.0437 ] tegrahost_v2 --chip 0x23 0 --blocksize 512 --magicid MEMB --addsigheader_multi tegra234-p3767-0000-sdram-l4t_cpp_1.bct tegra234-p3767-0000-sdram-l4t_cpp_2.bct tegra234-p3767-0000-sdram-l4t_cpp_3.bct tegra234-p3767-0000-sdram-l4t_cpp_4.bct
[   5.0444 ] Binary 0 length is 58752
[   5.0445 ] Binary 0 align length is 58880
[   5.0453 ] Binary 1 length is 58752
[   5.0454 ] Binary 1 align length is 58880
[   5.0461 ] Binary 2 length is 58752
[   5.0462 ] Binary 2 align length is 58880
[   5.0469 ] Binary 3 length is 58752
[   5.0470 ] Binary 3 align length is 58880
[   5.0476 ] Buffer length is 235520
[   5.0477 ] adding BCH for tegra234-p3767-0000-sdram-l4t_cpp_1.bct
[   5.0480 ] new length is 243712
[   5.0480 ] 
[   5.0488 ] tegrahost_v2 --chip 0x23 0 --align mem_coldboot_aligned.bct
[   5.0499 ] tegrahost_v2 --chip 0x23 0 --magicid MEMB --appendsigheader mem_coldboot_aligned.bct zerosbk
[   5.0505 ] Header already present for mem_coldboot_aligned.bct
[   5.0573 ] tegrasign_v3.py --key None --list mem_coldboot_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512
[   5.0574 ] Assuming zero filled SBK key
[   5.0587 ] Warning: pub_key.key is not found
[   5.0532 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mem_coldboot_aligned_sigheader.bct.encrypt mem_coldboot_aligned_sigheader.bct.hash zerosbk
[   5.0546 ] Generating recovery mem-bct
[   5.0551 ] tegrabct_v2 --chip 0x23 0 --sdram tegra234-p3767-0000-sdram-l4t_cpp.dtb --wb0sdram tegra234-p3767-0000-wb0sdram-l4t_cpp.dtb --membct tegra234-p3767-0000-sdram-l4t_cpp_1.bct tegra234-p3767-0000-sdram-l4t_cpp_2.bct tegra234-p3767-0000-sdram-l4t_cpp_3.bct tegra234-p3767-0000-sdram-l4t_cpp_4.bct
[   5.0556 ]  packing sdram params with Wb0 file tegra234-p3767-0000-wb0sdram-l4t_cpp.dtb
[   5.1125 ] Packing sdram param for instance[0]
[   5.1126 ] Packing sdram param for instance[1]
[   5.1127 ] Packing sdram param for instance[2]
[   5.1129 ] Packing sdram param for instance[3]
[   5.1130 ] Packing sdram param for instance[4]
[   5.1132 ] Packing sdram param for instance[5]
[   5.1133 ] Packing sdram param for instance[6]
[   5.1135 ] Packing sdram param for instance[7]
[   5.1136 ] Packing sdram param for instance[8]
[   5.1137 ] Packing sdram param for instance[9]
[   5.1139 ] Packing sdram param for instance[10]
[   5.1140 ] Packing sdram param for instance[11]
[   5.1142 ] Packing sdram param for instance[12]
[   5.1143 ] Packing sdram param for instance[13]
[   5.1145 ] Packing sdram param for instance[14]
[   5.1146 ] Packing sdram param for instance[15]
[   5.1700 ] Reading ramcode from backup chip_info.bin file
[   5.1708 ] RAMCODE Read from Device: 0

[   5.1708 ] Using ramcode 0
[   5.1708 ] Disabled BPMP dtb trim, using default dtb
[   5.1708 ] 
[   5.1725 ] tegrahost_v2 --chip 0x23 0 --align mem_rcm_aligned.bct
[   5.1738 ] tegrahost_v2 --chip 0x23 0 --magicid MEM0 --appendsigheader mem_rcm_aligned.bct zerosbk
[   5.1744 ] adding BCH for mem_rcm_aligned.bct
[   5.1826 ] tegrasign_v3.py --key None --list mem_rcm_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512
[   5.1827 ] Assuming zero filled SBK key
[   5.1839 ] Warning: pub_key.key is not found
[   5.1783 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mem_rcm_aligned_sigheader.bct.encrypt mem_rcm_aligned_sigheader.bct.hash zerosbk
[   5.1793 ] Copying signatures
[   5.1798 ] tegrahost_v2 --chip 0x23 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   5.1809 ] tegraparser_v2 --generategpt --pt flash.xml.bin
[   5.1814 ] End sector for APP, expected at: 119537630, actual: 0
Error: Return value 4
Command tegraparser_v2 --generategpt --pt flash.xml.bin
Error: /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /home/ubu/Downloads/defaultbsp/sources_orin/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...

Hi,

I just tested on my side, and it turns out that you need to manually modify the num_sectors variable in Linux_for_Tegra/tools/kernel_flash/flash_l4t_external.xml. You may get the sector size of the storage device with sudo fdisk -l.

Also, you don’t need to format the USB drive, just make sure none of the partitions on it is mounted on the host PC. If it gets mounted automatically by Ubuntu, unmount it before proceeding.

Hi I managed to flashed it with the following options:

sudo BOARDID=3767 BOARDSKU=0000 FAB=300 ./tools/kernel_flash/l4t_initrd_flash.sh -S 60GiB  -c tools/kernel_flash/flash_l4t_external.xml --external-device sda1 --direct sdb1 --showlogs --external-only p3509-a02+p3767-0000 external

Log:
flash_direct_0_20230825-131338.log (12.1 KB)

However, when I insert the USB Drive into the Orin NX to boot, it remains blank after showing this image:

Did you set the boot order in UEFI?

No, but default is to the USB first anyways. I also attempted to select it at Boot Manager Menu
Also do I need to put it in recovery mode?

Hi,

I think your USB drive is not flashed completely, and have you checked it’s content after flashing?
Looks like you got all the partitions but the APP partitions done.

Normally, you should see log like this:

Formatting APP partition /dev/sdd1 ...
mke2fs 1.44.1 (24-Mar-2018)
Creating filesystem with 14417920 4k blocks and 3604480 inodes
Filesystem UUID: 07f5e1e7-a7d7-4985-9149-827f640c7d2b
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done   

Formatting APP parition done
Formatting APP partition /dev/sdd1 ...
tar --xattrs -xpf /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/external/system.img  --checkpoint=10000 --warning=no-timestamp --numeric-owner  -C  /tmp/ci-XrXwppL4S1
tar: Read checkpoint 10000
tar: Read checkpoint 20000
tar: Read checkpoint 30000
tar: Read checkpoint 40000
tar: Read checkpoint 50000
tar: Read checkpoint 60000
tar: Read checkpoint 70000
tar: Read checkpoint 80000
tar: Read checkpoint 90000
tar: Read checkpoint 100000
...
writing item=16, 9:0:secondary_gpt, 250047610368, 16896, gpt_secondary_9_0.bin, 16896, fixed-<reserved>-0, 5eaa62c9c26d6ab9b5b4f630ccb4d76692c770b8
[ 1000]: l4t_flash_from_kernel: Successfully flash the external device
[ 1000]: l4t_flash_from_kernel: Flashing success
Success
Cleaning up...
Log is saved to Linux_for_Tegra/initrdlog/flash_direct_0_20230825-121611.log

Can you please try again with methods I mentioned here?

The -S option is not needed.

Or maybe try formatting the USB drive to form a single partition, as the issue looks related not all space being used.

When I try to mount and read:

I tried with your method the initially already. I have already modify num_sectors to what fdisk -l stated on sdb1, and executing apply binaries before flashing.

Also I want to specify APP size. If so, what should I do other than -S?

Regarding “Or maybe try formatting the USB drive to form a single partition, as the issue looks related not all space being used.” does it mean I use sdb instead of sdb1 as the external device for --direct? May you please clarify.

You should use the sector size of the whole disk, but not a single partition.

Oh, Yes.
I didn’t notice that you used sdb1 instead of sdb, and please try again with sdb.

Hi, I attempted with (SDC is because host read it differently):

sudo BOARDID=3767 BOARDSKU=0000 FAB=300 ./tools/kernel_flash/l4t_initrd_flash.sh -c tools/kernel_flash/flash_l4t_external.xml --external-device sda1 --direct sdc --showlogs --external-only p3509-a02+p3767-0000 external

Error still persist as previously. Also, unable to mount to read due to same reason stated previously.

Log:
flash_direct_0_20230825-143433.log (9.4 KB)

Do you see stuff like this in the flashing log?

Copying APP image into  /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/external/system.img.raw
tar: Write checkpoint 10000
tar: Write checkpoint 20000
tar: Write checkpoint 30000
tar: Write checkpoint 40000
tar: Write checkpoint 50000
tar: Write checkpoint 60000
tar: Write checkpoint 70000
tar: Write checkpoint 80000
tar: Write checkpoint 90000
tar: Write checkpoint 100000

Can you check if system.img is created properly under Linux_for_Tegra/tools/kernel_flash/images/external/?

Observations on latest try:
No Copying APP image into /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/external/system.img.raw or such
No tar: Write checkpoint 10000 or such.