First I’ll mention some of the device tree loading options.
On an eMMC model, there is a device tree partition. That gets a signed copy of the dtb
file. There is also the “FDT
” key/value entry in “extlinux.conf
”. That extlinux.conf
entry takes precedence in most cases, so adding something there determines which device tree loads, and you can make multiple boot entries. The exception is that on an eMMC model the security fuses can be burned, and if they are, then only the signed partition is accepted (burned security keys will cause the FDT
entry to be ignored).
Note that I said “signed” partition for the case when loading via partition. If a .dtb
file were directly placed in that partition without signing, then it would be rejected. The file named in the FDT
entry does not have that limitation.
Any time someone installs a new kernel or a new device tree I usually suggest they test first with an alternate boot entry (which is accessible via a key to interrupt boot at the proper time during boot over the serial console). One would be offered a chance to pick the boot entry, otherwise it would use the default entry.
An example boot entry is something like this (although this is from a TX2):
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
Note that in that example there is no FDT
entry, and so it uses the signed partition. Here’s an edited file which always uses the file; I’ll name the stock/unmodified dtb
file “original.dtb
” (use your imagination, its whatever is currently used), and I’ll name the other “original-modified.dtb
” (which I use that convention because I like to name the modified file after the original file of origin, but it’s just a modification of name to let you know what it is):
LABEL primary
MENU LABEL primary kernel
FDT /boot/dtb/original.dtb
LINUX /boot/Image
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
LABEL modified
MENU LABEL modified device tree
FDT /boot/dtb/original-modified.dtb
LINUX /boot/Image
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
If you interrupt boot too early (it is a rather narrow moment when you can interrupt; the first interrupt is to the boot console, the second is to select kernel), then you can continue with the command:
boot
If you interrupt during that short time when you can select kernel, and if you have multiple kernel entries (as in the example), then you will see a numbered choice of kernels. The “MENU LABEL
” will be visible next to the numeric list. For the example above, it might look like:
1. primary kernel
2. modified device tree
You’d hit the backspace to get rid of the key you typed to drop into the kernel select stage, and then hit the “2
” key to pick the modified device tree.
You can verify which device tree via serial console log since it shows this in stages prior to Linux ever loading. You can also look for content which is in one dtb but not the other via examining “/proc/device-tree
” (this is the kernel showing what it thinks the device tree was at load time).