Issue with flashing an NVMe ssd with initrd

Having some issues flashing my Jetson AGX Xavier with a newly installed NVMe SSD, a Kingston A2000 250Gb. Following steps have been performed, all on host computer:

[...]
[   2.3909 ] Generating signatures
[   2.3947 ] tegrasign_v3.py --key None --list images_list.xml --pubkeyhash pub_key.key
[   2.3948 ] Assuming zero filled SBK key
[   2.6262 ] Copying signatures
[   2.6284 ] tegrahost_v2 --chip 0x19 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   3.8790 ] 
[   3.8814 ] tegraparser_v2 --generategpt --pt flash.xml.bin
[   3.8827 ] End sector for APP, expected at: 488315181, actual: 513802279
[   3.8829 ] 
Error: Return value 4
Command tegraparser_v2 --generategpt --pt flash.xml.bin
Error: /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader//flash.idx is not found
Error: failed to relocate images to /home/per/Downloads/nvidia/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...

What am I doing wrong? It looks like APP partition is a problem. Did I misinterpret the sector size? Or the number of sectors? The difference between the expected and actual is not a multiple of 512, so it looks very confusing to me. Happy to receive help here, thanks.

With sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_nvme_hugo.xml -S 200GiB --showlogs jetson-xavier nvme0n1p1 I got past that line, but the same error persists.

[...]
[   4.4586 ] tegrasign_v3.py --key None --list tegra194-p2888-0001-p2822-0000_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[   4.4588 ] Assuming zero filled SBK key
[   4.4679 ] tegrahost_v2 --chip 0x19 0 --updatesigheader tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt tegra194-p2888-0001-p2822-0000_sigheader.dtb.hash zerosbk
[   4.4766 ] 
[   4.4792 ] tegrahost_v2 --chip 0x19 --align nvtboot_recovery_cpu_t194.bin
[   4.4807 ] 
[   4.4835 ] tegrahost_v2 --chip 0x19 0 --magicid CPBL --ratchet_blob ratchet_blob.bin --appendsigheader nvtboot_recovery_cpu_t194.bin zerosbk
[   4.4854 ] adding BCH for nvtboot_recovery_cpu_t194.bin
[   4.4983 ] 
[   4.5010 ] tegrasign_v3.py --key None --list nvtboot_recovery_cpu_t194_sigheader.bin_list.xml --pubkeyhash pub_key.key
[   4.5012 ] Assuming zero filled SBK key
[   4.5126 ] tegrahost_v2 --chip 0x19 0 --updatesigheader nvtboot_recovery_cpu_t194_sigheader.bin.encrypt nvtboot_recovery_cpu_t194_sigheader.bin.hash zerosbk
[   4.5179 ] 
[   4.5180 ] Copying signed file in /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/signed
[   4.6169 ] tegraparser_v2 --pt flash.xml.bin --generateflashindex /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/signed/flash.xml.tmp flash.idx
[   5.1539 ] 
Error: /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader//flash.idx is not found
Error: failed to relocate images to /home/per/Downloads/nvidia/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...
$

edit 2:
May have found a bug. Since bootloader/omdsign.func exists, the flash script attempts to source it and run some function called get_image_folder(), which doesn’t exist, and so it returns nothing. This creates the double slash in the error above. It’s looking for a file called flash.idx, which is located at bootloader/signed/flash.idx. Making sure that the flash script could find this file, it proceeded further, but could not complete. Final step found below.

Finish generating flash package.
/home/per/Downloads/nvidia/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --skipuid --usb-instance 1-2 --device-instance 0 --flash-only --external-device nvme0n1p1 -c "./tools/kernel_flash/flash_l4t_nvme_hugo.xml" -S 200GiB jetson-agx-xavier-devkit nvme0n1p1
**********************************************
*                                            *
*  Step 1: Build the flashing environment    *
*                                            *
**********************************************
Create flash environment 0
~/Downloads/nvidia/Linux_for_Tegra/bootloader ~/Downloads/nvidia/Linux_for_Tegra
~/Downloads/nvidia/Linux_for_Tegra
Finish creating flash environment 0.
****************************************************
*                                                  *
*  Step 2: Boot the device with flash initrd image *
*                                                  *
****************************************************
~/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0 ~/Downloads/nvidia/Linux_for_Tegra
./tegraflash.py --bl nvtboot_recovery_cpu_t194.bin --sdram_config tegra194-mb1-bct-memcfg-p2888.cfg,tegra194-memcfg-sw-override.cfg  --odmdata 0x9190000 --applet mb1_t194_prod.bin --cmd "rcmboot" --soft_fuses tegra194-mb1-soft-fuses-l4t.cfg  --cfg flash.xml --chip 0x19 --uphy_config tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg --minratchet_config tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg --device_config tegra19x-mb1-bct-device-sdmmc.cfg --misc_cold_boot_config tegra194-mb1-bct-misc-l4t.cfg --misc_config tegra194-mb1-bct-misc-flash.cfg --pinmux_config tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg --gpioint_config tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg --pmic_config tegra194-mb1-bct-pmic-p2888-0001-a01-p2822-0000.cfg --pmc_config tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg --prod_config tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg --scr_config tegra194-mb1-bct-scr-cbb-mini.cfg --scr_cold_boot_config tegra194-mb1-bct-scr-cbb-mini.cfg --br_cmd_config tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg --dev_params tegra194-br-bct-sdmmc.cfg  --bin "mb2_bootloader nvtboot_recovery_t194.bin; mts_preboot preboot_c10_prod_cr.bin; mts_mce mce_c10_prod_cr.bin; mts_proper mts_c10_prod_cr.bin; bpmp_fw bpmp_t194.bin; bpmp_fw_dtb tegra194-a02-bpmp-p2888-a01.dtb; spe_fw spe_t194.bin; tlk tos-trusty_t194.img; eks eks.img; kernel boot0.img; kernel_dtb tegra194-p2888-0001-p2822-0000.dtb; bootloader_dtb tegra194-p2888-0001-p2822-0000.dtb"    --instance 1-2 --skipuid
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.0064 ] tegrasign_v3.py --getmode mode.txt --key None
[   0.0066 ] Assuming zero filled SBK key
[   0.0031 ] Generating RCM messages
[   0.0054 ] tegrahost_v2 --chip 0x19 0 --magicid MB1B --appendsigheader mb1_t194_prod.bin zerosbk
[   0.0064 ] Header already present for mb1_t194_prod.bin
[   0.0097 ] 
[   0.0158 ] tegrasign_v3.py --getmode mode.txt --key None
[   0.0158 ] Assuming zero filled SBK key
[   0.0194 ] tegrasign_v3.py --file mb1_t194_prod_sigheader.bin --key None --length 1136 --offset 2960 --pubkeyhash pub_key.key
[   0.0195 ] Assuming zero filled SBK key
[   0.0234 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mb1_t194_prod_sigheader.bin mb1_t194_prod_sigheader.hash zerosbk
[   0.0289 ] 
[   0.0307 ] tegrabct_v2 --chip 0x19 0 --sfuse tegra194-mb1-soft-fuses-l4t.cfg sfuse.bin
[   0.0329 ] 
[   0.0370 ] tegrabct_v2 --chip 0x19 0 --ratchet_blob ratchet_blob.bin --minratchet tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg
[   0.0389 ] FwIndex: 1, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 2, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 3, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 4, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 5, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 6, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 7, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 11, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 12, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 13, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 14, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 15, MinRatchetLevel: 0
[   0.0396 ] FwIndex: 16, MinRatchetLevel: 0
[   0.0397 ] FwIndex: 17, MinRatchetLevel: 0
[   0.0397 ] FwIndex: 18, MinRatchetLevel: 0
[   0.0397 ] FwIndex: 19, MinRatchetLevel: 0
[   0.0397 ] FwIndex: 30, MinRatchetLevel: 0
[   0.0397 ] FwIndex: 31, MinRatchetLevel: 0
[   0.0397 ] FwIndex: 32, MinRatchetLevel: 0
[   0.0397 ] 
[   0.0427 ] tegrarcm_v2 --instance 1-2 --listrcm rcm_list.xml --chip 0x19 0 --sfuses sfuse.bin --download rcm mb1_t194_prod_sigheader.bin 0 0
[   0.0435 ] RCM 0 is saved as rcm_0.rcm
[   0.0488 ] RCM 1 is saved as rcm_1.rcm
[   0.0488 ] RCM 2 is saved as rcm_2.rcm
[   0.0488 ] List of rcm files are saved in rcm_list.xml
[   0.0488 ] 
[   0.0488 ] Signing RCM messages
[   0.0547 ] tegrasign_v3.py --getmontgomeryvalues montgomery.bin --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0548 ] Assuming zero filled SBK key
[   0.0619 ] Copying signature to RCM mesages
[   0.0638 ] tegrarcm_v2 --instance 1-2 --chip 0x19 0 --updatesig rcm_list_signed.xml
[   0.0653 ] 
[   0.0654 ] Generating br-bct
[   0.0675 ] Performing cfg overlay
[   0.0675 ] ['tegra194-mb1-bct-memcfg-p2888.cfg', 'tegra194-memcfg-sw-override.cfg']
[   0.0677 ] sw_memcfg_overlay.pl -c tegra194-mb1-bct-memcfg-p2888.cfg -s tegra194-memcfg-sw-override.cfg -o /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41.cfg
[   0.1002 ] 
[   0.1003 ] Updating dev and MSS params in BR BCT
[   0.1004 ] tegrabct_v2 --dev_param tegra194-br-bct-sdmmc.cfg --sdram /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41.cfg --brbct br_bct.cfg --sfuse tegra194-mb1-soft-fuses-l4t.cfg --chip 0x19 0
[   0.1369 ] 
[   0.1370 ] Updating Odmdata
[   0.1392 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x19 0 --updatefields Odmdata =0x9190000
[   0.1407 ] 
[   0.1407 ] Get Signed section of bct
[   0.1431 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x19 0 --listbct bct_list.xml
[   0.1461 ] 
[   0.1497 ] tegrasign_v3.py --key None --list bct_list.xml --pubkeyhash pub_key.key --getmontgomeryvalues montgomery.bin
[   0.1505 ] Assuming zero filled SBK key
[   0.1819 ] 
[   0.1819 ] Updating BCT with signature
[   0.1842 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x19 0 --updatesig bct_list_signed.xml
[   0.1857 ] 
[   0.1858 ] Generating coldboot mb1-bct
[   0.1886 ] tegrabct_v2 --chip 0x19 0 --mb1bct mb1_cold_boot_bct.cfg --sdram /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41.cfg --misc tegra194-mb1-bct-misc-l4t.cfg --scr tegra194-mb1-bct-scr-cbb-mini.cfg --pinmux tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg --pmc tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg --pmic tegra194-mb1-bct-pmic-p2888-0001-a01-p2822-0000.cfg --brcommand tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg --prod tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg --gpioint tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg --uphy tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg --device tegra19x-mb1-bct-device-sdmmc.cfg
[   0.1898 ] MB1-BCT version: 0x1

[   0.1901 ] Parsing config file :tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg 
[   0.1903 ] Added Platform Config 0 data with size :- 3008

[   0.1912 ] Parsing config file :tegra194-mb1-bct-scr-cbb-mini.cfg 
[   0.1913 ] File read failed
[   0.1935 ] File read failed
[   0.1992 ] Added Platform Config 1 data with size :- 19640

[   0.1994 ] Parsing config file :tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg 
[   0.1996 ] Added Platform Config 2 data with size :- 24

[   0.1997 ] Parsing config file :tegra194-mb1-bct-pmic-p2888-0001-a01-p2822-0000.cfg 
[   0.1999 ] File read failed
[   0.1999 ] File read failed
[   0.2000 ] Added Platform Config 4 data with size :- 380

[   0.2001 ] Parsing config file :tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg 
[   0.2002 ] Added Platform Config 3 data with size :- 92

[   0.2003 ] Parsing config file :tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg 
[   0.2005 ] Added Platform Config 5 data with size :- 68
[   0.2005 ] 
[   0.2005 ] Parsing config file :tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg 
[   0.2005 ] Added Platform Config 7 data with size :- 392
[   0.2005 ] 
[   0.2005 ] Parsing config file :tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg 
[   0.2005 ] Added Platform Config 8 data with size :- 12
[   0.2005 ] 
[   0.2005 ] Parsing config file :tegra19x-mb1-bct-device-sdmmc.cfg 
[   0.2005 ] Added Platform Config 9 data with size :- 32
[   0.2005 ] 
[   0.2006 ] Updating mb1-bct with ratchet information
[   0.2030 ] tegrabct_v2 --chip 0x19 --mb1bct mb1_cold_boot_bct_MB1.bct --minratchet tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg
[   0.2041 ] MB1-BCT version: 0x1
[   0.2042 ] FwIndex: 1, MinRatchetLevel: 0
[   0.2044 ] FwIndex: 2, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 3, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 4, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 5, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 6, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 7, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 11, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 12, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 13, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 14, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 15, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 16, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 17, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 18, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 19, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 30, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 31, MinRatchetLevel: 0
[   0.2046 ] FwIndex: 32, MinRatchetLevel: 0
[   0.2046 ] 
[   0.2069 ] tegrahost_v2 --chip 0x19 --align mb1_cold_boot_bct_MB1.bct
[   0.2086 ] 
[   0.2114 ] tegrahost_v2 --chip 0x19 0 --magicid MBCT --ratchet_blob ratchet_blob.bin --appendsigheader mb1_cold_boot_bct_MB1.bct zerosbk
[   0.2130 ] adding BCH for mb1_cold_boot_bct_MB1.bct
[   0.2138 ] 
[   0.2198 ] tegrasign_v3.py --key None --list mb1_cold_boot_bct_MB1_sigheader.bct_list.xml --pubkeyhash pub_key.key
[   0.2199 ] Assuming zero filled SBK key
[   0.2212 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mb1_cold_boot_bct_MB1_sigheader.bct.encrypt mb1_cold_boot_bct_MB1_sigheader.bct.hash zerosbk
[   0.2230 ] 
[   0.2231 ] Generating recovery mb1-bct
[   0.2261 ] tegrabct_v2 --chip 0x19 0 --mb1bct mb1_bct.cfg --sdram /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41.cfg --misc tegra194-mb1-bct-misc-flash.cfg --scr tegra194-mb1-bct-scr-cbb-mini.cfg --pinmux tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg --pmc tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg --pmic tegra194-mb1-bct-pmic-p2888-0001-a01-p2822-0000.cfg --brcommand tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg --prod tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg --gpioint tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg --uphy tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg --device tegra19x-mb1-bct-device-sdmmc.cfg
[   0.2273 ] MB1-BCT version: 0x1

[   0.2281 ] Parsing config file :tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg 
[   0.2287 ] Added Platform Config 0 data with size :- 3008

[   0.2319 ] Parsing config file :tegra194-mb1-bct-scr-cbb-mini.cfg 
[   0.2322 ] File read failed
[   0.2365 ] File read failed
[   0.2414 ] Added Platform Config 1 data with size :- 19640

[   0.2415 ] Parsing config file :tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg 
[   0.2417 ] Added Platform Config 2 data with size :- 24

[   0.2418 ] Parsing config file :tegra194-mb1-bct-pmic-p2888-0001-a01-p2822-0000.cfg 
[   0.2419 ] File read failed
[   0.2420 ] File read failed
[   0.2420 ] Added Platform Config 4 data with size :- 380

[   0.2421 ] Parsing config file :tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg 
[   0.2422 ] Added Platform Config 3 data with size :- 92
[   0.2422 ] 
[   0.2422 ] Parsing config file :tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg 
[   0.2422 ] Added Platform Config 5 data with size :- 68
[   0.2422 ] 
[   0.2422 ] Parsing config file :tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg 
[   0.2422 ] Added Platform Config 7 data with size :- 392
[   0.2422 ] 
[   0.2422 ] Parsing config file :tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg 
[   0.2422 ] Added Platform Config 8 data with size :- 12
[   0.2422 ] 
[   0.2422 ] Parsing config file :tegra19x-mb1-bct-device-sdmmc.cfg 
[   0.2422 ] Added Platform Config 9 data with size :- 32
[   0.2422 ] 
[   0.2423 ] Updating mb1-bct with ratchet information
[   0.2442 ] tegrabct_v2 --chip 0x19 --mb1bct mb1_bct_MB1.bct --minratchet tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg
[   0.2452 ] MB1-BCT version: 0x1
[   0.2454 ] FwIndex: 1, MinRatchetLevel: 0
[   0.2455 ] FwIndex: 2, MinRatchetLevel: 0
[   0.2456 ] FwIndex: 3, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 4, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 5, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 6, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 7, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 11, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 12, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 13, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 14, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 15, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 16, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 17, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 18, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 19, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 30, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 31, MinRatchetLevel: 0
[   0.2457 ] FwIndex: 32, MinRatchetLevel: 0
[   0.2457 ] 
[   0.2477 ] tegrahost_v2 --chip 0x19 --align mb1_bct_MB1.bct
[   0.2488 ] 
[   0.2508 ] tegrahost_v2 --chip 0x19 0 --magicid MBCT --ratchet_blob ratchet_blob.bin --appendsigheader mb1_bct_MB1.bct zerosbk
[   0.2525 ] adding BCH for mb1_bct_MB1.bct
[   0.2534 ] 
[   0.2594 ] tegrasign_v3.py --key None --list mb1_bct_MB1_sigheader.bct_list.xml --pubkeyhash pub_key.key
[   0.2594 ] Assuming zero filled SBK key
[   0.2603 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mb1_bct_MB1_sigheader.bct.encrypt mb1_bct_MB1_sigheader.bct.hash zerosbk
[   0.2616 ] 
[   0.2617 ] Generating coldboot mem-bct
[   0.2636 ] tegrabct_v2 --chip 0x19 0 --sdram /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41.cfg --membct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_1.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_2.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_3.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_4.bct
[   0.2643 ] Packing sdram param for instance[0]
[   0.3067 ] Packing sdram param for instance[1]
[   0.3069 ] Packing sdram param for instance[2]
[   0.3070 ] Packing sdram param for instance[3]
[   0.3071 ] Packing sdram param for instance[4]
[   0.3072 ] Packing sdram param for instance[5]
[   0.3072 ] Packing sdram param for instance[6]
[   0.3072 ] Packing sdram param for instance[7]
[   0.3072 ] Packing sdram param for instance[8]
[   0.3072 ] Packing sdram param for instance[9]
[   0.3072 ] Packing sdram param for instance[10]
[   0.3072 ] Packing sdram param for instance[11]
[   0.3072 ] Packing sdram param for instance[12]
[   0.3072 ] Packing sdram param for instance[13]
[   0.3072 ] Packing sdram param for instance[14]
[   0.3072 ] Packing sdram param for instance[15]
[   0.3072 ] 
[   0.3095 ] tegrahost_v2 --chip 0x19 0 --blocksize 512 --magicid MEMB --addsigheader_multi /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_1.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_2.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_3.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_4.bct
[   0.3106 ] adding BCH for /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_1.bct
[   0.3159 ] 
[   0.3189 ] tegrahost_v2 --chip 0x19 --align mem_coldboot.bct
[   0.3200 ] 
[   0.3224 ] tegrahost_v2 --chip 0x19 0 --magicid MEMB --ratchet_blob ratchet_blob.bin --appendsigheader mem_coldboot.bct zerosbk
[   0.3231 ] Header already present for mem_coldboot.bct
[   0.3238 ] 
[   0.3301 ] tegrasign_v3.py --key None --list mem_coldboot_sigheader.bct_list.xml --pubkeyhash pub_key.key
[   0.3302 ] Assuming zero filled SBK key
[   0.3340 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mem_coldboot_sigheader.bct.encrypt mem_coldboot_sigheader.bct.hash zerosbk
[   0.3353 ] 
[   0.3354 ] Generating recovery mem-bct
[   0.3379 ] tegrabct_v2 --chip 0x19 0 --sdram /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41.cfg --membct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_1.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_2.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_3.bct /home/per/Downloads/nvidia/Linux_for_Tegra/temp_initrdflash/bootloader0/7964/tmph96qjdq41_4.bct
[   0.3392 ] Packing sdram param for instance[0]
[   0.3836 ] Packing sdram param for instance[1]
[   0.3837 ] Packing sdram param for instance[2]
[   0.3838 ] Packing sdram param for instance[3]
[   0.3839 ] Packing sdram param for instance[4]
[   0.3840 ] Packing sdram param for instance[5]
[   0.3841 ] Packing sdram param for instance[6]
[   0.3841 ] Packing sdram param for instance[7]
[   0.3841 ] Packing sdram param for instance[8]
[   0.3841 ] Packing sdram param for instance[9]
[   0.3841 ] Packing sdram param for instance[10]
[   0.3841 ] Packing sdram param for instance[11]
[   0.3841 ] Packing sdram param for instance[12]
[   0.3841 ] Packing sdram param for instance[13]
[   0.3842 ] Packing sdram param for instance[14]
[   0.3842 ] Packing sdram param for instance[15]
[   0.3842 ] 
[   0.3843 ] Using default ramcode: 0
[   0.3869 ] tegrahost_v2 --chip 0x19 --align mem_rcm.bct
[   0.3885 ] 
[   0.3921 ] tegrahost_v2 --chip 0x19 0 --magicid MEMB --ratchet_blob ratchet_blob.bin --appendsigheader mem_rcm.bct zerosbk
[   0.3940 ] adding BCH for mem_rcm.bct
[   0.3965 ] 
[   0.4032 ] tegrasign_v3.py --key None --list mem_rcm_sigheader.bct_list.xml --pubkeyhash pub_key.key
[   0.4033 ] Assuming zero filled SBK key
[   0.4073 ] tegrahost_v2 --chip 0x19 0 --updatesigheader mem_rcm_sigheader.bct.encrypt mem_rcm_sigheader.bct.hash zerosbk
[   0.4096 ] 
[   0.4096 ] Boot Rom communication
[   0.4132 ] tegrarcm_v2 --instance 1-2 --chip 0x19 0 --rcm rcm_list_signed.xml --skipuid
[   0.4139 ] Boot Rom communication failed
[   5.5363 ] 
Error: Return value 3
Command tegrarcm_v2 --instance 1-2 --chip 0x19 0 --rcm rcm_list_signed.xml --skipuid
Cleaning up...

What now?

Can you try to put the board in recovery mode and try again?

For the -S you should put a value that is about 10GB fewer than the total SSD size. The error you encounter is because the -S is too big. The value you choose for -S partition should accomodate the APP partition and other partitions on the SSD also. Also -S params use gibibyte, so 245 gib is around 264 gigabyte

For the get_image_dir bug, I am guessing that your secure boot package is not from 32.6.1
Please download secure boot package from 32.6.1 from Jetson Linux | NVIDIA Developer

You can download 32.6.1 secureboot from here.
https://developer.nvidia.com/embedded/l4t/r32_release_v6.1/t186/secureboot_r32.6.1_aarch64.tbz2

Thanks for the links. I removed the existing Linux_for_Tegra folder and extracted new, fresh copies to install the new version of secureboot.

Let me make sure I am not doing something crazy here: All I’m really trying to do is use the NVMe SSD as the main rootfs on the Jetson as we need more space. I am not looking to apply any fuses at this moment. Am I doing the right thing here?

Anyway, new week, new weird errors. Much earlier than before. Input command ison top line, output right below.

$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_nvme_hugo.xml -S 400GiB --showlogs jetson-agx-xavier-devkit nvme0n1p1
/home/per/Downloads/nvidia/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_nvme_hugo.xml -S 400GiB --showlogs jetson-agx-xavier-devkit nvme0n1p1
************************************
*                                  *
*  Step 1: Generate flash packages *
*                                  *
************************************
Create folder to store images to flash
Generate images to be flashed
BOOTDEV=nvme0n1p1 /home/per/Downloads/nvidia/Linux_for_Tegra/flash.sh --no-flash --sign --external-device -c "./tools/kernel_flash/flash_l4t_nvme_hugo.xml" -S "400GiB"  jetson-agx-xavier-devkit nvme0n1p1

###############################################################################
# L4T BSP Information:
# R32 , REVISION: 6.1
###############################################################################
copying soft_fuses(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)... done.
./tegraflash.py --chip 0x19 --applet "/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod.bin" --skipuid --soft_fuses tegra194-mb1-soft-fuses-l4t.cfg --bins "mb2_applet nvtboot_applet_t194.bin" --cmd "dump eeprom boardinfo cvm.bin;reboot recovery" 
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.0027 ] Generating RCM messages
[   0.0049 ] tegrahost_v2 --chip 0x19 0 --magicid MB1B --appendsigheader /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod.bin zerosbk
[   0.0058 ] Header already present for /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod.bin
[   0.0097 ] 
[   0.0124 ] tegrasign_v3.py --getmode mode.txt --key None
[   0.0126 ] Assuming zero filled SBK key
[   0.0171 ] tegrasign_v3.py --file /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin --key None --length 1136 --offset 2960 --pubkeyhash pub_key.key
[   0.0173 ] Assuming zero filled SBK key
[   0.0239 ] tegrahost_v2 --chip 0x19 0 --updatesigheader /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.hash zerosbk
[   0.0304 ] 
[   0.0342 ] tegrabct_v2 --chip 0x19 0 --sfuse tegra194-mb1-soft-fuses-l4t.cfg.pdf sfuse.bin
[   0.0351 ] 
[   0.0379 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x19 0 --sfuses sfuse.bin --download rcm /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin 0 0
[   0.0393 ] RCM 0 is saved as rcm_0.rcm
[   0.0455 ] RCM 1 is saved as rcm_1.rcm
[   0.0456 ] RCM 2 is saved as rcm_2.rcm
[   0.0457 ] List of rcm files are saved in rcm_list.xml
[   0.0457 ] 
[   0.0457 ] Signing RCM messages
[   0.0480 ] tegrasign_v3.py --getmontgomeryvalues montgomery.bin --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0481 ] Assuming zero filled SBK key
[   0.0554 ] Copying signature to RCM mesages
[   0.0575 ] tegrarcm_v2 --chip 0x19 0 --updatesig rcm_list_signed.xml
[   0.0588 ] 
[   0.0589 ] Boot Rom communication
[   0.0607 ] tegrarcm_v2 --chip 0x19 0 --rcm rcm_list_signed.xml --skipuid
[   0.0622 ] RCM version 0X190001
[   0.0642 ] Boot Rom communication completed
[   1.0800 ] 
[   2.0863 ] tegrarcm_v2 --isapplet
[   2.0884 ] Applet version 01.00.0000
[   2.1071 ] 
[   2.1106 ] tegrarcm_v2 --ismb2
[   2.1547 ] 
[   2.1584 ] tegrahost_v2 --chip 0x19 --align nvtboot_applet_t194.bin
[   2.1607 ] 
[   2.1642 ] tegrahost_v2 --chip 0x19 0 --magicid PLDT --appendsigheader nvtboot_applet_t194.bin zerosbk
[   2.1665 ] adding BCH for nvtboot_applet_t194.bin
[   2.1731 ] 
[   2.1781 ] tegrasign_v3.py --key None --list nvtboot_applet_t194_sigheader.bin_list.xml --pubkeyhash pub_key.key
[   2.1782 ] Assuming zero filled SBK key
[   2.1858 ] tegrahost_v2 --chip 0x19 0 --updatesigheader nvtboot_applet_t194_sigheader.bin.encrypt nvtboot_applet_t194_sigheader.bin.hash zerosbk
[   2.1881 ] 
[   2.1910 ] tegrarcm_v2 --download mb2 nvtboot_applet_t194_sigheader.bin.encrypt
[   2.1925 ] Applet version 01.00.0000
[   2.2112 ] Sending mb2
[   2.2113 ] [................................................] 100%
[   2.2266 ] 
[   2.2303 ] tegrarcm_v2 --boot recovery
[   2.2325 ] Applet version 01.00.0000
[   2.2579 ] 
[   3.2632 ] tegrarcm_v2 --isapplet
[   3.2828 ] 
[   3.2866 ] tegrarcm_v2 --ismb2
[   3.2885 ] MB2 Applet version 01.00.0000
[   3.3232 ] 
[   3.3267 ] tegrarcm_v2 --ismb2
[   3.3288 ] MB2 Applet version 01.00.0000
[   3.3628 ] 
[   3.3666 ] Retrieving board information
[   3.3704 ] tegrarcm_v2 --oem platformdetails chip chip_info.bin
[   3.3724 ] MB2 Applet version 01.00.0000
[   3.3929 ] Saved platform info in chip_info.bin
[   3.3973 ] Chip minor revision: 2
[   3.3975 ] Bootrom revision: 0xf
[   3.3976 ] Ram code: 0x2
[   3.3976 ] Chip sku: 0xd0
[   3.3976 ] Chip Sample: non es
[   3.3976 ] 
[   3.3981 ] Retrieving EEPROM data
[   3.3981 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/cvm.bin
[   3.4001 ] MB2 Applet version 01.00.0000
[   3.4216 ] Saved platform info in /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/cvm.bin
[   3.4563 ] 
[   3.4564 ] Rebooting to recovery mode
[   3.4587 ] tegrarcm_v2 --ismb2
[   3.4606 ] MB2 Applet version 01.00.0000
[   3.4785 ] 
[   3.4786 ] Rebooting to recovery mode
[   3.4807 ] tegrarcm_v2 --reboot recovery
[   3.4820 ] MB2 Applet version 01.00.0000
[   3.5213 ] 
Board ID(2888) version(400) sku(0004) revision(L.0)
Copy /home/per/Downloads/nvidia/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb to /home/per/Downloads/nvidia/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb.rec
copying bctfile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-memcfg-p2888.cfg)... done.
copying bctfile1(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-memcfg-sw-override.cfg)... done.
copying uphy_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg)... done.
copying minratchet_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg)... done.
copying device_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-bct-device-sdmmc.cfg)... done.
copying misc_cold_boot_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-l4t.cfg)... done.
copying misc_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-flash.cfg)... done.
copying pinmux_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg)... done.
copying gpioint_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg)... done.
copying pmic_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-pmic-p2888-0001-a04-E-0-p2822-0000.cfg)... done.
copying pmc_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg)... done.
copying prod_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg)... done.
copying scr_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-scr-cbb-mini.cfg)... done.
copying scr_cold_boot_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-scr-cbb-mini.cfg)... done.
copying bootrom_config(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg)... done.
copying dev_params(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-br-bct-sdmmc.cfg)... done.
Existing bootloader(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/nvtboot_cpu_t194.bin) reused.
copying initrd(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
Making Boot image... done.
/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x19 --key  --minratchet_config tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg --cmd sign boot.img kernel
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.0005 ] Generating signature
[   0.0032 ] tegrasign_v3.py --getmode mode.txt --key 
[   0.0033 ] Assuming zero filled SBK key : not reading 
[   0.0033 ] Generating ratchet blob
[   0.0064 ] tegrabct_v2 --chip 0x19 0 --ratchet_blob ratchet_blob.bin --minratchet tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg
[   0.0076 ] FwIndex: 1, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 2, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 3, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 4, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 5, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 6, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 7, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 11, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 12, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 13, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 14, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 15, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 16, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 17, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 18, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 19, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 30, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 31, MinRatchetLevel: 0
[   0.0079 ] FwIndex: 32, MinRatchetLevel: 0
[   0.0079 ] 
[   0.0080 ] header_magic: 414e4452
[   0.0105 ] tegrahost_v2 --chip 0x19 --align 1_boot.img
[   0.0120 ] 
[   0.0155 ] tegrahost_v2 --chip 0x19 0 --magicid KRNL --ratchet_blob ratchet_blob.bin --appendsigheader 1_boot.img zerosbk
[   0.0175 ] adding BCH for 1_boot.img
[   0.6948 ] 
[   0.6986 ] tegrasign_v3.py --key  --list 1_boot_sigheader.img_list.xml --pubkeyhash pub_key.key
[   0.6987 ] Assuming zero filled SBK key : not reading 
[   0.7674 ] tegrahost_v2 --chip 0x19 0 --updatesigheader 1_boot_sigheader.img.encrypt 1_boot_sigheader.img.hash zerosbk
[   1.1404 ] 
[   1.1656 ] Signed file: /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
l4t_sign_image.sh: Generate header for boot_sigheader.img.encrypt
l4t_sign_image.sh: chip 0x19: add 0x27cb800 to offset  0x8 in sig file
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for boot_sigheader.img.encrypt
l4t_sign_image.sh: the signed file is /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
done.
Making recovery ramdisk for recovery image...
Re-generating recovery ramdisk for recovery image...
~/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp ~/Downloads/nvidia/Linux_for_Tegra/bootloader ~/Downloads/nvidia/Linux_for_Tegra
30412 blocks
_BASE_KERNEL_VERSION=4.9.253-tegra
cp: cannot stat '/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/etc/wpa_supplicant.conf': No such file or directory
warning: cp -f /home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/etc/wpa_supplicant.conf /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp//etc/wpa_supplicant.conf
cp: cannot stat '/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/firmware/brcm/fw_bcmdhd.bin': No such file or directory
warning: cp -f /home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/firmware/brcm/fw_bcmdhd.bin /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/firmware/brcm/fw_bcmdhd.bin
cp: cannot stat '/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/firmware/brcm/nvram.txt': No such file or directory
warning: cp -f /home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/firmware/brcm/nvram.txt /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/firmware/brcm/nvram.txt
cp: cannot stat '/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/modules/4.9.253-tegra/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko': No such file or directory
warning: cp -f /home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/modules/4.9.253-tegra/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/4.9.253-tegra/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko
cp: cannot stat '/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/modules/4.9.253-tegra/kernel/net/wireless/lib80211.ko': No such file or directory
warning: cp -f /home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/modules/4.9.253-tegra/kernel/net/wireless/lib80211.ko /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/4.9.253-tegra/kernel/net/wireless/lib80211.ko
cp: cannot stat '/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/modules/4.9.253-tegra/kernel/net/wireless/cfg80211.ko': No such file or directory
warning: cp -f /home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/lib/modules/4.9.253-tegra/kernel/net/wireless/cfg80211.ko /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/4.9.253-tegra/kernel/net/wireless/cfg80211.ko
~/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp/lib ~/Downloads/nvidia/Linux_for_Tegra/bootloader/ramdisk_tmp ~/Downloads/nvidia/Linux_for_Tegra/bootloader ~/Downloads/nvidia/Linux_for_Tegra
60104 blocks
Making Recovery image...
copying recdtbfile(/home/per/Downloads/nvidia/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb.rec)... done.
20+0 records in
20+0 records out
20 bytes copied, 0,000218011 s, 91,7 kB/s
Existing sosfile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod.bin) reused.
Existing tegraboot(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/nvtboot_t194.bin) reused.
Existing cpu_bootloader(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/nvtboot_cpu_t194.bin) reused.
Existing mb2blfile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/nvtboot_recovery_t194.bin) reused.
Existing mtspreboot(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/preboot_c10_prod_cr.bin) reused.
Existing mcepreboot(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mce_c10_prod_cr.bin) reused.
Existing mtsproper(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mts_c10_prod_cr.bin) reused.
Existing mb1file(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/mb1_t194_prod.bin) reused.
Existing bpffile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/bpmp_t194.bin) reused.
copying bpfdtbfile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/tegra194-a02-bpmp-p2888-a04.dtb)... done.
Existing scefile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/camera-rtcpu-sce.img) reused.
Existing camerafw(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/camera-rtcpu-rce.img) reused.
Existing spefile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/spe_t194.bin) reused.
Existing wb0boot(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/warmboot_t194_prod.bin) reused.
Existing tosfile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/tos-trusty_t194.img) reused.
Existing eksfile(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/eks.img) reused.
copying soft_fuses(/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)... done.
copying dtbfile(/home/per/Downloads/nvidia/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb)... done.
Copying nv_boot_control.conf to rootfs
/home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x19 --key  --minratchet_config tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg --cmd sign kernel_tegra194-p2888-0001-p2822-0000.dtb kernel_dtb
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.0004 ] Generating signature
[   0.0032 ] tegrasign_v3.py --getmode mode.txt --key 
[   0.0033 ] Assuming zero filled SBK key : not reading 
[   0.0033 ] Generating ratchet blob
[   0.0053 ] tegrabct_v2 --chip 0x19 0 --ratchet_blob ratchet_blob.bin --minratchet tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg
[   0.0069 ] FwIndex: 1, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 2, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 3, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 4, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 5, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 6, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 7, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 11, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 12, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 13, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 14, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 15, MinRatchetLevel: 0
[   0.0075 ] FwIndex: 16, MinRatchetLevel: 0
[   0.0076 ] FwIndex: 17, MinRatchetLevel: 0
[   0.0076 ] FwIndex: 18, MinRatchetLevel: 0
[   0.0076 ] FwIndex: 19, MinRatchetLevel: 0
[   0.0076 ] FwIndex: 30, MinRatchetLevel: 0
[   0.0076 ] FwIndex: 31, MinRatchetLevel: 0
[   0.0076 ] FwIndex: 32, MinRatchetLevel: 0
[   0.0076 ] 
[   0.0078 ] header_magic: d00dfeed
[   0.0099 ] tegrahost_v2 --chip 0x19 --align 1_kernel_tegra194-p2888-0001-p2822-0000.dtb
[   0.0118 ] 
[   0.0139 ] tegrahost_v2 --chip 0x19 0 --magicid KDTB --ratchet_blob ratchet_blob.bin --appendsigheader 1_kernel_tegra194-p2888-0001-p2822-0000.dtb zerosbk
[   0.0148 ] adding BCH for 1_kernel_tegra194-p2888-0001-p2822-0000.dtb
[   0.0261 ] 
[   0.0298 ] tegrasign_v3.py --key  --list 1_kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[   0.0299 ] Assuming zero filled SBK key : not reading 
[   0.0403 ] tegrahost_v2 --chip 0x19 0 --updatesigheader 1_kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt 1_kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.hash zerosbk
[   0.0468 ] 
[   0.0478 ] Signed file: /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
l4t_sign_image.sh: Generate header for kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
l4t_sign_image.sh: chip 0x19: add 0x45651 to offset  0x8 in sig file
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
l4t_sign_image.sh: the signed file is /home/per/Downloads/nvidia/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
done.
	populating kernel to rootfs... done.
	populating initrd to rootfs... done.
	populating kernel_tegra194-p2888-0001-p2822-0000.dtb to rootfs... done.
Making system.img... 
/home/per/Downloads/nvidia/Linux_for_Tegra/rootfs/boot/extlinux/extlinux.conf is not found, exiting...
Error: Failed to generate images for external device
Cleaning up...

Not sure what to do next. Like I said, not interested in applying fuses here - do I need to use initrd in order to boot from NVMe?

Did you prepare the rootfs by yourself? Did you run apply_binaries.sh after you copy the rootfs?

There is no need to use initrd flash to just boot from NVMe. But this is the only tool that can “flash” the NVMe. Other methods require you to move the files to NVMe manually.

Forgot apply_binaries.sh. Thank you.

Okay, but no security measures need to be enabled, right? I don’t want to brick my unit by activating something I don’t know how to work with.

No, no security settings needed.

1 Like

Aaand we’re back. Now back to previous errors. Communication error, it seems. Log didn’t fit in this post, see per@dev_per:~/Downloads/nvidia/Linux_for_Tegra$ sudo ./tools/kernel_flash/l4t_in - Pastebin.com.

Rebooting into recovery and replugging did the job. However, the Jetson seems unable to mount the external disk. Plugging in an HDMI to the Jetson, it stops after

Root device found: nvme0n1p1
Found dev node: /dev/nvme0n1p1
/mnt: wrong fs type, bad option, bad superblock on /dev/nvme0n1p1, missing codepage or helper program, or other error
ERROR: nvme0n1p1 mount fail...
bash-4.4#

Yikes. Any ideas?

Retrying by creating image with --no-flash, then rebooting and replugging the Jetson, then running the same script with --flash-only seems to have done the trick. Thanks for the help.