Clone kernel and dtb from an already configured Jetson Xavier

Hi,

I have flashed an Xavier NX using nvidia’s sdkmanager and modified the kernel and device trees since I am using a custom board (not exactly the same as the devkit). The kernel and device tree modifications were done via an externally provided script which has to be executed inside the Xavier NX.

My goal is: avoid running the script at each time I need to setup a new XavierNX by including everything in the flashing process.

My question is: how can I clone both the kernel and the device tree for future flashing?

I know already that the cloning command has the following structure:

sudo ./flash.sh -r -k <partition_id> -G <clone> <board> <rootdev>

If I want to flash the rootfs (APP partition) then:

  • <partition_id>=APP
  • <clone>=backup.img
  • <board>=jetson-xavier-nx-devkit-emmc
  • <rootdev>=mmcblk0p1

However, I am still not able to find any documentation on how to clone the kernerl and device tree and I am missing some information:

For cloning the kernel

  • <partition_id>=kernel (not sure)
  • <clone>=???.???
  • <board>=jetson-xavier-nx-devkit-emmc
  • <rootdev>=???

For cloning the device tree

  • <partition_id>=kernel-dtb (not sure)
  • <clone>=???.???
  • <board>=jetson-xavier-nx-devkit-emmc
  • <rootdev>=???

Could anyone please point me in the right direction?

Thanks in advance!

Just to simplify things, consider that by default the kernel is in the rootfs (APP) partition as file “/boot/Image”. A device tree can also be there…refer to what is in “/boot/extlinux/extlinux.conf” and see what the entries are (the FDT entry is for file based device tree).

You only use the partition version if the rootfs content is missing or if you use secure boot, or have some special boot requirement. Partitions are signed versions of the same thing and can be secured, but short of a burned fuse, this isn’t needed.

Typically, the boot will look at what extlinux.conf specifies. Missing that, it looks at partitions. If the fuse is burned, then extlinux.conf is ignored for kernel and device tree, and only signed partition content is allowed.

You may not want to use partitions, especially if developing. A file copy to “/boot” and an edit of extlinux.conf is far simpler.

Thank you for the fast reply! I’ll try what you suggested :)