<oldgalileo>
Howdy! I'm a bit confused on the boot process and on where and when U-Boot gets the DTB
<oldgalileo>
I'm working right now with the Nano P3448-0002. Taking a look at the partition layout, here's the flow as I understand it thus far:
<oldgalileo>
U-Boot loads the U-Boot DTB from the RP1 partition. U-Boot then loads the Linux Kernel and passes it the kernel DTB from the DXB partition (?)
<oldgalileo>
It's specifically the last part I'm unclear of.
<oldgalileo>
Per the `bootm` section, I'm still unclear on /where/ the kernel DTB addresss is.
<oldgalileo>
The thing that's confusing me is that the DTB is written on the rootfs. I can't figure out why it would be BOTH in /boot/ AND in the DXB partition
<cyndis>
I don't remember the details but I think it depends on how extlinux.conf is written and also it can use the partition as backup if the one in /boot is missing
<cyndis>
although I haven't used the nano; only TX2 recently
<cyndis>
the kernel dtb address is probably in u-boot environment variables
<cyndis>
or maybe u-boot autogenerates it if using extlinux.conf flow
<oldgalileo>
cyndis: I feel like I'm taking crazy pills. So U-Boot has a sysboot command which can understand filesystems. U-Boot executes sysboot to load extlinux, which then points U-Boot to the kernel image and the init ramdisk
<oldgalileo>
You can optionally tell extlinux.conf to load a specific DTB with the FDT directive. That's all fine and good.
<oldgalileo>
The part that _confounds_ me and explodes my brain, is what is the point of TegrabootCPU doing EMC training on the kernel dtb if it's never used?
<oldgalileo>
TegrabootCPU definitely isn't filesystem aware, so it must be doing that training on the DXB partition where the kernel dtb data is stored.
<oldgalileo>
I do not understand where in the boot process that kernel dtb information is ever actually used?
<oldgalileo>
Like, does TegrabootCPU do some weird pass over a completely unused DTB?
<cyndis>
u-boot does load the training data and patch the specified dtb with it, but I'm not sure of the exact mechanism (there are actually several..)
<oldgalileo>
Ahhhhh cool. Okay, so the training data is passed down from TegrabootCPU through the boot chain into U-Boot rather than updating the DTB directly?
<cyndis>
yeah, it might be passed as an in-memory DTB that u-boot then copies data from, though
<oldgalileo>
cyndnis: Here's the thing that's fucking me up: there's a kernel_xxx.dtb file in the rootfs. Where is that getting written?
<cyndis>
well, there might be systems where that in-memory DTB is used directly. there have been many revisions of this so it depends on chip and bootchain version
<oldgalileo>
*from
<oldgalileo>
Sure.
<cyndis>
the flash script places it there
<cyndis>
or something in the flash flow anyway
<oldgalileo>
Okay, so that file should have no bearing on the actual boot process then, right?
<oldgalileo>
Like, it should be loading the DTB from the DXB partition regardless of `/boot/dtb/kernel_xxx.dtb`
<cyndis>
if it's not referenced in the extlinux.conf then I don't think so. on many systems extlinux.conf does reference it by default but I guess not on nano then
<oldgalileo>
Yeah, cool. I think this was actually changed in an L4T release in late 2019.
<cyndis>
yeah, having the kernel dtb be separate from the "bootloader dtb" is very useful from running upstream kernels so things have been moving in this direction
<cyndis>
s/from/when/
<oldgalileo>
Okay crazy. So are there reserved spots in the DTB that the TegrabootCPU goes and updates?
<oldgalileo>
I'm binwalking through the partition DTB vs. the FS DTB to try to figure out wtf Tegraboot did.
<oldgalileo>
Maybe this is actually done by the flashing script though.
oldgalileo has quit [Ping timeout: 246 seconds]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #tegra
torez has joined #tegra
gouchi has joined #tegra
marvin24 has quit [Ping timeout: 250 seconds]
marvin24 has joined #tegra
gouchi has quit [Remote host closed the connection]
gouchi has joined #tegra
torez has quit [Quit: torez]
gouchi has quit [Remote host closed the connection]
marvin24 has quit [Ping timeout: 250 seconds]
marvin24 has joined #tegra
crabbedhaloablut has quit [Ping timeout: 244 seconds]