I can flash my custom Orin NX board if I use the sdkmanager in GUI mode. My board is recognized as ‘Jetson Orin NX modules’ either with a Jetson Orin NX 8GB or Jetson Orin NX 16GB, depending on the SOC I plug on it. I can flash it perfectly with ‘Jetpack 5.1.2’ and ‘NVMe’ as ‘Storage Device’.
Now we plan to produce many of those boards, and using a GUI to flash them will become tiresome and error-prone.
What is the command-line equivalent (using flash.sh e.g.) to flash that board ?
I have found how to specify the board specific PINMUX_CONFIG, PMC_CONFIG and DTB_FILE, but how can I specify the kernel that must be run after the installation ?
Yes, I want to run a self-compiled kernel tailored for the board, with additional drivers. This kernel is tested and runs perfectly if installed instead of the default kernel afterwards, but I would like to install it at the flashing time.
Will Linux_for_Tegra/boot/Image be run during the flashing process ? If yes, are there any driver or config options that must be provided by that kernel ?
Is Linux_for_Tegra/boot/Image used in the flashing process or merely copied into the NVMe and run only after the final reboot ?
If it is merely copied into the NVMe and run only after the final reboot, ignore my next question :)
If it is run during the flashing process, e.g. to provide initrd or usb gadget support, then which menuconfig option should I take care to preserve while configuring my linux kernel before compilation, to avoid breaking the flashing process ?
PS: actually there is no Linux_for_Tegra/boot/Image. In Linux_for_Tegra there are only rootfs/boot/Image and kernel/Image. If you meant rootfs/boot/Image, please ignore my question.
I copied my kernel Image to kernel/Image but the flashing process did not terminate successfully. Here are its last words :
cp: cannot stat '/home/phdm/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/rootfs/lib/modules/5.10.120-00303-g49d2b8514377-dirty/kernel/drivers/mtd': No such file or directory
Cleaning up...
the hash in the name is intentional, the dirty is not. I always compile the linux kernel for embedded computers like here with all the needed drivers builtin, so that I have only one file to copy, backup etc .
I found the failing command in tools/kernel_flash/l4t_initrd_flash_internal.sh.
OK, so if you make sure every drivers are built-in, then you can safely remove that code from the script.
But you’d like to be careful that the same thing will no longer work if you move to JetPack 6, as we pull a lot of NVIDIA’s custom device drivers out of the kernel source tree, and make them external modules.
Looking only at the flashing process, it would be useful to be able to install a different kernel for runtime than the one used for the flashing process itself.