Orin Nano and tc358743 capture issue

Hello Jerry,

To re-flash I use Orin Nano and tc358743 capture issue - #10 by anomad ( full creation process linked in this comment - Orin Nano and tc358743 capture issue - #12 by anomad )

When will the next public release be available to try?

hello anomad,

is this a fused device? for instance, is it has secure boot enabled with PKC+SBK.
if yes… it might be the same issue with Topic 266849.

sorry, I don’t have rough ETA at the moment.

Hello Jerry,

I’m not sure – is the Xavier NX DevKit a fused device? I didn’t set up any kind of encryption or code signing.

I see in your link locations like ‘uefi_keys/keys’ when I haven’t used before in OS generation/compilation.

Do I have to enable secure boot to use the patch you provided ?

hello anomad,

it seems partition update did not support with p3509+p3767.
please try update the rce-fw and perform a full-flash.
steps as following…
(1) update the binary file under… $OUT/Linux_for_Tegra/bootloader/camera-rtcpu-t234-rce.img
(2) $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" -p --showlogs --network usb0 jetson-orin-nx-devkit-16gb internal
(3) $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml --external-only --append --network usb0 jetson-orin-nano-devkit external
(4) Flash images into the both storage devices:
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --network usb0 --flash-only

Hello Jerry,

I received an error on step 2:

parallels@orindev:~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" -p --showlogs --network usb0 jetson-orin-nx-devkit-16gb internal
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p -c bootloader/t186ref/cfg/flash_t234_qspi.xml -p --showlogs --network usb0 jetson-orin-nx-devkit-16gb internal
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh: line 47: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/jetson-orin-nx-devkit-16gb.conf: No such file or directory
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash.func: line 215: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/jetson-orin-nx-devkit-16gb.conf: No such file or directory
************************************
*                                  *
*  Step 1: Generate flash packages *
*                                  *
************************************
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_create_images_for_kernel_flash.sh: line 366: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/jetson-orin-nx-devkit-16gb.conf: No such file or directory
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_create_images_for_kernel_flash.sh: line 558: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/jetson-orin-nx-devkit-16gb.conf: No such file or directory
Create folder to store images to flash
Generate image for internal storage devices
Generate images to be flashed
ADDITIONAL_DTB_OVERLAY=""  /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/flash.sh --no-flash --sign  -c bootloader/t186ref/cfg/flash_t234_qspi.xml --showlogs jetson-orin-nx-devkit-16gb internal

Error: Invalid target board - jetson-orin-nx-devkit-16gb.

In searching for a solution, I found this link : Jetson Orin NX - #4 by Ursula which had the same error. It appears they were missing that files as well.

I did not see ‘jetson-orin-nx-dvkit-16gb’ in ~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra

Was that .conf file supposed to be released with 5.1.2 ?

Where can I get a copy of that file ?

please update the board name for using p3509-a02+p3767-0000 as it’s Orin SOM on Xavier NX Carrier.

Hello Jerry,

Didn’t we try this on 11.07.23 ? - Orin Nano and tc358743 capture issue - #9 by JerryChang

we’ve tested this locally. it indeeds an issue with p3509+p3767 doesn’t support partition update.
however, we could update rce-fw correctly by full flash the target.

Hello Jerry,

I changed the name of the conf file used and got:

Error: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/signed/flash.idx is not found

Where can I find the process to sign/secure and create ‘flash.idx’ (and all the other necessary files) ?

I see flash.idx in my JetPack_5.1.1 directory, but can not find my notes on how I created it.

it’s created by initrd flash script file.
how you flash your target in the beginning? you may only perform the same the re-flash your device.

Hello Jerry,

The command I had used to flash the Orin was

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3509-a02+p3767-0000 internal

Upon close inspection, I see the command in step (2) had an extra “-p” in the parameters (before --showlogs). Could that be the source of the errors I was getting ?

That successfully reflashed my Orin. Is there a way to confirm I have the patch? I will apply my updates and files and report back in a day or two.

Hello Jerry,

Recently flashed Orin back to the non-working state is was in before. I ran the command you suggested above (adding ROOTFS_ENC=1 and the ekb.key to the flash command) - and it failed looking for -i.conf ??

parallels@orindev:~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra$ sudo ROOTFS_ENC=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml --external-only --append --network usb0 jetson-orin-nano-devkit external -i ./ekb.key

/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --showlogs --no-flash --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml --external-only --append --network usb0 jetson-orin-nano-devkit external -i ./ekb.key

/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh: line 47: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/-i.conf: No such file or directory

/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash.func: line 215: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/-i.conf: No such file or directory
************************************
*                                  *
*  Step 1: Generate flash packages *
*                                  *
************************************
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_create_images_for_kernel_flash.sh: line 366: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/-i.conf: No such file or directory
/home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/l4t_create_images_for_kernel_flash.sh: line 558: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/-i.conf: No such file or directory
Create folder to store images to flash
Generate image for external storage devices
Generate images to be flashed
BOOTDEV=nvme0n1p1 ADDITIONAL_DTB_OVERLAY=""  /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/flash.sh --no-flash --sign --external-device -c "./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml" -i "./ekb.key"  -i nvme0n1p1

Error: Invalid target board - -i.

Usage: sudo ./flash.sh [options] <target_board> <rootdev>
  Where,
	target board: Valid target board name.
	rootdev: Proper root device.
    options:
        -c <cfgfile> ---------- Flash partition table config file.

  [...]

        --uda-dir-------------- Directory to store user data that will be encrypted in UDA partition.

Error: /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /home/parallels/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up...

Why is it parsing -i as a target board ?

the last column is always determine as board configuration,
please moving this options forward, you may see-also below command-line as an example for disk encryption.
$ sudo ROOTFS_ENC=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 -i ./ekb.key -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml --external-only --append --network usb0 jetson-orin-nano-devkit external

Hello Jerry,

I fixed the command to be :

sudo ROOTFS_ENC=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --no-flash --external-device nvme0n1p1 -i ./ekb.key -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml --external-only --append --network usb0 jetson-orin-nano-devkit external

And it appeared to run fine (after installing cryptsetup)

At the completion it says to run the command with “–flash-only” so I ran :

sudo ROOTFS_ENC=1 ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs --flash-only --external-device nvme0n1p1 -i ./ekb.key -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml --external-only --append --network usb0 jetson-orin-nano-devkit external

And received this error : (full command line and console logs available if needed)

Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for device to expose ssh ......RTNETLINK answers: File exists
RTNETLINK answers: File exists
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: Starting to create gpt for external device
Active index file is /mnt/external/flash.idx
Number of lines is 19
max_index=18
writing item=1, 9:0:primary_gpt, 512, 19968, gpt_primary_9_0.bin, 16896, fixed-<reserved>-0, 23bdee126c2bfefb07468c55fee1daa9f8e544b2
Error: Could not stat device /dev/nvme0n1 - No such file or directory.
Flash failure
Cleaning up...

Where is it getting /dev/nvme0n1 from ?

hello anomad,

it’s your external storage.

Hello Jerry,

I see my mistake - I picked “nvme0n1p1” up from a previous example. Will try running w/correct --external-device.

Hello Jerry,

Attempted flash and now the unit only reboots w/a kernel panic.

hello anomad,

it looks you did not update EKS image correctly.
there shows an error to unlock the encrypted partition.
for example, [ 15.583687] ERROR: fail to unlock the encrypted dev /dev/mmcblk1p2.

please refer to this topic for the steps.