Hi!
I am currently trying to build a secure environment to flash Jetson Xavier NX modules that I could give to an external manufacturer that assembles our system. We have a custom carrier board with the production NX modules and a 128 GB NVMe attached.
I need the root file system mounted on the NVMe during booting (because the eMMC storage of the module is not enough) and I also want it to be encrypted. So if someone removes the NVMe from the board once the system is flashed, the information inside it is not accessible. I am using L4T 32.7.1 and I am not considering changing at the moment.
This post helps me with the commands that allow me to generate an encrypted image for the NVMe. It also generates a massflash environment that can be shared. However, when I tried to flash a different board than the one I used to generate the images with the first two commands, the flashing process looks like it finishes without problem but then the board never boots.
My steps are:
-
Connect Board 1 to the Host PC
-
Put board 1 in Recovery Mode and run the following command to generate the image for internal memory:
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash jetson-xavier-nx-devkit-qspi internal
- Put board 1 in Recovery Mode again and run the following command to generate the encrypted image for NVMe:
sudo ROOTFS_ENC=1 ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --external-device nvme0n1p1 -S 118GiB -c ./tools/kernel_flash/flash_l4t_nvme_rootfs_enc128.xml --external-only --massflash 1 --append jetson-xavier-nx-devkit-emmc external
The file flash_l4t_nvme_rootfs_enc128.xml
is a modified version of flash_l4t_nvme_rootfs_enc.xml
provided as example in Linux_for_Tegra/
folder, where I changed the num_sectors to 249980518.
- Put board 1 in Recovery Mode again and flash it:
sudo ./mfi_jetson-xavier-nx-devkit-emmc/tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 --showlogs
After the process ends, the board boots and I can login without problem. Then, I connect board 2, put it in Recovery Mode and run the same command to flash it. The process looks like it ends without problem, however the board 2 never boots. If I use the Serial port to see the logs I see that it stops in the following line:
[ 4.929281] SMP: stopping secondary CPUs
[ 4.929409] Kernel Offset: disabled
[ 4.929680] Memory Limit: none
[ 4.929935] trusty-log panic notifier - trusty version Built: 08:57:16 Feb 19 2022 [ 4.938010] Rebooting in 5 seconds..
The full log from the serial port is here:
serial_log.txt (38.3 KB)
Any help on this would be appreciated!