OrinNX r36.4.4 root partition size

Hello, I have a OrinNX 16GB . I want to set root parititon, which is first partition as 80G,

I’ve set APPSIZE to 80G from:

→ Linux_for_Tegra/bootloader/generic/cfg/flash_t234_qspi_nvme.xml

→ Linux_for_Tegra/tool/kernel_flash/flash_l4t_nvme.xml

→ Linux_for_Tegra/tool/kernel_flash/flash_l4t_t234_nvme.xml

Flashing commands I’ve tried:

→

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
-S 80GiB \
-c tools/kernel_flash/flash_l4t_t234_nvme.xml \
-p “-c bootloader/generic/cfg/flash_t234_qspi.xml” \
–showlogs --network usb0 jetson-orin-nano-devkit-super internal

→

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
-c tools/kernel_flash/flash_l4t_t234_nvme.xml -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” \
–showlogs --network usb0 jetson-orin-nano-devkit-super internal

But I get errors while flashing:

[ 3.7058 ] tegrahost_v2 --chip 0x23 0 --align mem_rcm_1_aligned.bct[ 3.7064 ] tegrahost_v2 --chip 0x23 0 --magicid MEM1 --ratchet_blob ratchet_blob.bin --appendsigheader mem_rcm_1_aligned.bct zerosbk[ 3.7067 ] adding BCH for mem_rcm_1_aligned.bct[ 3.7098 ] tegrasign_v3.py --key None --list mem_rcm_1_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512[ 3.7100 ] Assuming zero filled SBK key[ 3.7117 ] Warning: pub_key.key is not found[ 3.7119 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mem_rcm_1_aligned_sigheader.bct.encrypt mem_rcm_1_aligned_sigheader.bct.hash zerosbk[ 3.7133 ] Disabled BPMP dtb trim, using default dtb[ 3.7133 ] [ 3.7143 ] tegrahost_v2 --chip 0x23 0 --align mem_rcm_2_aligned.bct[ 3.7156 ] tegrahost_v2 --chip 0x23 0 --magicid MEM2 --ratchet_blob ratchet_blob.bin --appendsigheader mem_rcm_2_aligned.bct zerosbk[ 3.7162 ] adding BCH for mem_rcm_2_aligned.bct[ 3.7201 ] tegrasign_v3.py --key None --list mem_rcm_2_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512[ 3.7204 ] Assuming zero filled SBK key[ 3.7227 ] Warning: pub_key.key is not found[ 3.7229 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mem_rcm_2_aligned_sigheader.bct.encrypt mem_rcm_2_aligned_sigheader.bct.hash zerosbk[ 3.7251 ] Disabled BPMP dtb trim, using default dtb[ 3.7251 ] [ 3.7267 ] tegrahost_v2 --chip 0x23 0 --align mem_rcm_3_aligned.bct[ 3.7284 ] tegrahost_v2 --chip 0x23 0 --magicid MEM3 --ratchet_blob ratchet_blob.bin --appendsigheader mem_rcm_3_aligned.bct zerosbk[ 3.7292 ] adding BCH for mem_rcm_3_aligned.bct[ 3.7336 ] tegrasign_v3.py --key None --list mem_rcm_3_aligned_sigheader.bct_list.xml --pubkeyhash pub_key.key --sha sha512[ 3.7338 ] Assuming zero filled SBK key[ 3.7362 ] Warning: pub_key.key is not found[ 3.7365 ] tegrahost_v2 --chip 0x23 0 --updatesigheader mem_rcm_3_aligned_sigheader.bct.encrypt mem_rcm_3_aligned_sigheader.bct.hash zerosbk[ 3.7384 ] Copying signatures[ 3.7392 ] tegrahost_v2 --chip 0x23 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml[ 3.7411 ] tegraparser_v2 --generategpt --pt flash.xml.bin[ 3.7419 ] End sector for APP, expected at: 119537630, actual: 0Error: Return value 4Command tegraparser_v2 --generategpt --pt flash.xml.bincp: cannot stat ‘signed/*’: No such file or directorycp: cannot stat ‘signed/flash.xml.tmp’: No such file or directoryUsing bpmp-dtb concatenated with odmdata in blob for t23x./tegraflash.py --bl uefi_jetson_minimal_with_dtb_sigheader.bin.encrypt --bct br_bct_BR.bct --bldtb tegra234-p3768-0000+p3767-0000-nv-super.dtb --applet rcm_2_encrypt.rcm --applet_softfuse rcm_1_encrypt.rcm --cmd “secureflash;reboot” --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_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-TE980M-A1_prod_sigheader.bin.encrypt; bpmp_fw_dtb tegra234-bpmp-3767-0000-3768-super_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” saving flash command in flashcmd.txt

*** no-flash flag enabled. Exiting now… ***

User can run above saved command in factory environment without providing pkc and sbk keys to flash a device

Before these APPSIZE changes, I was able to flash successfully but root partition has full size of the NVME. (In my case root was: 950G, NVME size: 1TB)

How can I solve this issue?

*** Please note that this reply is generated by LLM automatically ***

The issue you’re facing is due to the incorrect configuration of the APPSIZE variable in the flash_l4t_t234_nvme.xml file. When you set APPSIZE to 80G, the flashing process is expecting the root partition to be 80G in size, but the actual size of the NVME is 1TB, which is causing the error.

To solve this issue, you need to update the APPSIZE variable to match the actual size of the NVME. Since you want the root partition to be 80G, you can set APPSIZE to 80G, but you also need to update the num_sectors variable in the flash_l4t_t234_nvme.xml file to match the total number of sectors on the NVME.

Here’s an example of how to calculate the num_sectors variable:

  • NVME size: 1TB = 1024GB
  • Sector size: 512 bytes ( typical sector size for NVME devices)
  • Total number of sectors: 1024GB / 512 bytes/sector = 2000409264 sectors

Update the num_sectors variable in the flash_l4t_t234_nvme.xml file to 2000409264.

Additionally, you need to update the flash_l4t_t234_nvme.xml file to include the correct partition layout for the NVME device. You can use the tegraparserv2 tool to generate the partition layout file.

Here’s an example of how to generate the partition layout file:

  • Run the following command: tegraparserv2 generategpt pt flash_l4t_t234_nvme.xml
  • This will generate a flash_l4t_t234_nvme.xml file with the correct partition layout for the NVME device.

Once you’ve updated the flash_l4t_t234_nvme.xml file, you can try flashing the device again using the following command:

  • sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -u <pkc_keyfile> [-v <sbk_keyfile>] --uefi-keys uefi_keys/uefi_keys.conf -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit external

This should fix the issue and allow you to flash the device with the correct root partition size.

In comparison to the previous flashing commands you tried, the main difference is that you need to update the num_sectors variable and the partition layout file to match the actual size and configuration of the NVME device. Additionally, you need to use the tegraparserv2 tool to generate the partition layout file.

It’s also worth noting that you can use the --flash-only option with the l4t_initrd_flash.sh script to flash only the root partition, without flashing the entire device. This can be useful for testing and debugging purposes.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi,

Please try below commands

$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml -S 80GiB --showlogs --network usb0 jetson-orin-nano-devkit external

Thanks