Use Custom Rootfs for Nvme SSD for mass flashing

Hi,

I’m trying to use a custom Rootfs for AGX Orin, the idea is I want to have a base image, where I have all the packages and customizations I need and mass flash this image to all the other Orins I have.

So far, I tried the backup/restore and seems to be working ok but that’s not scalable since only have one Orin which can be restored at time :

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-agx-orin-devkit

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -r jetson-agx-orin-devkit

I’m also able to run


sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" \
./tools/kernel_flash/l4t_initrd_flash.sh \
--external-device nvme0n1p1 -c \
./tools/kernel_flash/flash_l4t_external.xml \
--showlogs  jetson-agx-orin-devkit nvme0n1p1

But that’s for single device again.

When I tried :

sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" \
./tools/kernel_flash/l4t_initrd_flash.sh --no-flash \
--use-backup-image \
--external-device nvme0n1p1 \
 -c ./tools/kernel_flash/flash_l4t_external.xml \ 
--network usb0 \
--massflash 5 \
--showlogs  jetson-agx-orin-devkit nvme0n1p1

I’m getting

JetPack_5.1.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/tools/kernel_flash/images/internal/flash.cfg': No such file or directory
Cleaning up...

From my understanding you can’t use the backup image from l4t_backup_restore.sh and use it in l4t_initrd_flash.sh. So what’s the way of setting up a base Orin with all the customization, get the image and mass flash it? All the guides use mmcblk0p1 and there’s no proper way where this is explained for nvme and yet seems like one of the most basic things someone would want to do after he is ready to ship multiple Jetsons.

Hi,

This feature is currently not officially supported.
Massflash only supports backup image from eMMC, but not any other external storage devices like NVMe or USB.
We are working on some patches to integrate it.

For now, please refer to this patch as a workaround:

Thanks @DaveYYY the patch seems to be working. I’m gonna share the commands I’ve run just for the reference so maybe someone else will benefit from them :

After applying the patch, flashing single device with nvme

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-agx-orin-devkit

sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --use-backup-image --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml  --showlogs  jetson-agx-orin-devkit nvme0n1p1

sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml  --showlogs  jetson-agx-orin-devkit nvme0n1p1

Also commands for massflash :

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-agx-orin-devkit

sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --massflash 5 --network usb0 --no-flash --use-backup-image --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml  --showlogs  jetson-agx-orin-devkit nvme0n1p1

sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --massflash 5 --network usb0 --flash-only --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml  --showlogs  jetson-agx-orin-devkit nvme0n1p1

Thanks. Regards.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.