We’ve been trying to bring up Orin running on a custom carrier board. We’re having various issues with PCI Express, but that’s a whole separate topic. During this process, I’ve repeatedly rebuilt the kernel, dtbs, and modules, and reflashed my Orin, following these instructions
That works fine – but looking through the kernel sources in Linux_for_Tegra has left me a bit confused. The Linux kernel is in source/public/kernel/kernel-5.10. Some important dts files are in source/public/hardware/nvidia. But there’s a whole subdirectory of drivers and such in source/public/kernel/nvidia/ that seems to be unused in the kernel build.
For example, there’s source/public/kernel/nvidia/drivers/pci/host/pcie-tegra-dw.c and source/public/kernel/nvidia/drivers/pci/dwc/pcie-tegra.c as well as some other code related to PCI express on tegra. As far as I can tell, these files aren’t used at all when you run nvbuild.sh.
What is the role of the sources in that directory? How do they relate to the “regular” kernel sources in kernel-5.10?
Trivia: Some content will be built using relative directory paths with “.” meaning current directory, and “..” meaning parent directory. If you see “out of tree” content configured from within the kernel source, then the result would mean seeing enough “../../../something” that it actually descends out of the kernel “$TOP”, and into one of those other subdirectories. Not all configured code would do this, but in some configurations you’ll see that relative path descend below the actual kernel source, and then reascend into the nvidia or bootloader directory. Similar if you build bootloader code where it might look at headers in the kernel source.
Thanks – but what about drivers that are in both places?
Specifically, right now, I’m trying to force a PCIE RP configuration to be gen 1 at startup. I found docs on nvidia,max-speed and nvidia,init-speed, but it looks like only the code in source/public/kernel/nvidia/drivers/pci/dwc/pcie-tegra.c uses those, and that code isn’t being built.
The driver code that seems to be running (source/public/kernel/kernel-5.10/drivers/pci/controller/dwc/pcie-tegra194.c doesn’t read that setting from the dtb.