I currently have two sets of boards (nano and nx), and I expect to load the correct device tree file when the system starts. Now I want to know how to choose which device tree to load when I start from L4T launcher? I hope to be able to select the device tree during the l4tlauncher startup phase, so that it can be used universally on multiple types of boards. Looking forward to your reply!
You’re probably working with L4T R32.x (see “head -n 1 /etc/nv_tegra_release”) since this is an older Nano (newer Nano, e.g., Xavier or Orin…soon Thor, will work with newer releases). You’re also likely working with dev kits since you have an SD card (and no eMMC). If you have serial console, then you can interrupt boot and select from a list of boot options. You’d just need the right options added into the “/boot/extlinux/extlinux.conf” file. I don’t know if you can increase the time you have to interrupt boot on serial console (meaning I don’t know if the option works to say change it to 10 seconds), but that might make it easier.
If you look in extlinux.conf, then you have a default or primary entry. This is what normally starts if you don’t interrupt boot. If you have only one entry, then there would be no reason to interrupt boot anyway. You can duplicate the default entry, change its labels/designations, and then edit slightly (without other edits selecting each entry would not change anything). The “FDT” key/value pair in that file is the normal mechanism to pick device tree. Thus, if you name the path to a different device tree, but all else is the same, then you get that entry.
Some caveats: On an eMMC model, if secure boot fuses have been burned, then only the entry from a signed binary partition can do this and the extlinux.conf is mostly ignored. If your current boot uses a partition for device tree (not usual, and not available for non-eMMC), then the FDT entry itself is not used. You can think of the FDT name of a path to a device tree in extlinux.conf as the highest priority option, and the signed partition as the next lower option, while secure boot options completely remove most of the extlinux.conf options.
It depends on the model. If you have an eMMC model of Jetson, then there are a lot of small partitions other than the rootfs. Within those are a binary kernel and binary device tree (they also are signed; the default sign is NULL). There is something similar going into QSPI of an SD card model (only dev kits will have SD card model of module). In theory there would be a binary kernel and device tree in the QSPI which would be called, but I don’t know of anyone who has actually tested that. Maybe an FDT entry is required and a kernel listed in extlinux.conf? Unless someone knows for certain I hesitate to say it, but probably there is a device tree loaded from QSPI (which would be added during flash). This file would not be manually picked, it is just a case of priorities. For eMMC the FDT and LINUX lines of the extlinux.conf have highest priority if security fuses have not been burned; failing those loading the load switches over to the signed partitions. “Probably” it does this on SD card models with QSPI, but maybe not.
Usually one would get a full serial console boot log to find out that answer (make sure you remove any “quiet” key word from “extlinux.conf”).