Where are the WORKING instructions to build Kernel, dtbs, overlays

Following the instructions that are in building the kernel, it does not work. I have to set CROSS_COMPILE and some other stuff to get a build.
Now go to build dtbs it points to my build box for src and obj trees

fred@eng-ai1:~/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source$ sudo make dtbs
================================================================================
make nvidia-dtbs ...
================================================================================
TEGRA_TOP=/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source \
srctree=/lib/modules/6.8.0-49-generic/build \
objtree=/lib/modules/6.8.0-49-generic/build \
oottree=/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree \
HOSTCC=gcc \
make -f /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/scripts/Makefile.build \
	obj=/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts \
	dtbs
make[1]: Entering directory '/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source'
# DTC     /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dtb
  mkdir -p /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/ ; gcc -E -Wp,-MMD,/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.pre.tmp -nostdinc -I/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/tegra/nv-public -I/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/include/kernel -I/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/include/nvidia-oot -I/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/include/platforms -I/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public -I/lib/modules/6.8.0-49-generic/build/scripts/dtc/include-prefixes  -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -undef -D__DTS__ -x assembler-with-cpp -o /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.dts.tmp /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts/../..//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dts ; /lib/modules/6.8.0-49-generic/build/scripts/dtc/dtc -o /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dtb -b 0 -i/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts/../..//hardware/nvidia/t23x/nv-public/staging/ -i/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/tegra/nv-public -i/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/include/kernel -i/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/include/nvidia-oot -i/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/include/platforms -i/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public -i/lib/modules/6.8.0-49-generic/build/scripts/dtc/include-prefixes -Wno-interrupt_provider -Wno-unit_address_vs_reg -Wno-unit_address_format -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-simple_bus_reg -Wno-unique_unit_address   -@ -@ -@ -@ -Wno-interrupt_provider -Wno-unit_address_vs_reg -Wno-unit_address_format -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-simple_bus_reg -Wno-unique_unit_address   -d /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.dtc.tmp /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.dts.tmp ; cat /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.pre.tmp /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d.dtc.tmp > /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/.tegra234-p3737-0000+p3701-0004.dtb.d
/bin/sh: 1: /lib/modules/6.8.0-49-generic/build/scripts/dtc/dtc: not found
make[1]: *** [/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts/Makefile:118: /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts//hardware/nvidia/t23x/nv-public/staging/tegra234-p3737-0000+p3701-0004.dtb] Error 127
make[1]: Leaving directory '/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source'
make: *** [Makefile:173: nvidia-dtbs] Error 2

I have to repoint those 2 and explicitly define path to DTC.

What is up with all of this?

Also, why are the instructions that explicitly state how to actually create a meaningful overlay omitted. Is this intentional, the trivial example using dtc only works when you don’t need to include files (needs cpp), hence 100% USELESS when using the pinmux spreadsheet.

I have placed the 2 files in the exact locations as stated in the instructions. make dtbs, So where are they, don’t see them…

After repointing:

egra/source/kernel-devicetree/generic-dts/dtbs/ ; \
fi
if [ -d /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts/hardware/ ] ; then \
	rm -rf /home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source/kernel-devicetree/generic-dts/hardware/ ; \
fi
make[1]: Leaving directory '/home/fred/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source'
================================================================================
DTBs compiled successfully.
================================================================================
fred@eng-ai1:~/yocto/nvidia-overlay-tree-orin-nano/Linux_for_Tegra/source$ 

I placed the pinmux files in the exact location as stated in the instructions, nothing.

Can any one point me to the instructions that work, this is getting a little old. I am fumbling around in multiple sections of the manual to find this and that and it is not working and key parts are intentionally missing.

Hi foxsquirrel1,

What’s the Jetpack version in use?
Are you using the yocto project instead of L4T?

Which instruction you are referring?

pinmux configuration(dtsi) is loaded and configured in MB1. (i.e. it is not relating to kernel dtb)

Please let us know about your use case.

Jetpack 6.1

Not building a yocto image, I am doing this on our yocto build box that can handle the load and is very clean. My workstation was breaking and would not handle sdkmanger so I had to change to one that was cleaner.

This was installed using sdkmanager, all options selected.
Only place I found the paths that are mentioned is in the kernel source that had to be downloaded. Don’t see any of this on the board.

What is MB1 and where is it located. This is all that was installed on the board using your sdkmanager.

fred@ubuntu:/$ ls
bin   dev  home  lost+found  mnt  proc        root  sbin  srv  tmp  var
boot  etc  lib   media       opt  README.txt  run   snap  sys  usr
fred@ubuntu:/$ 

Are you using the devkit or custom board for Orin Nano?

These 3 dtsi files should be generated from pinmux spreadsheet and put on BSP package on your host(<Linux_for_Tegra>/) rather than on the board.
They will be used during flash, you can also check the full flash log for them.

This is an early boot stage, you can refer to Jetson AGX Orin, Orin NX and Orin Nano Boot Flow for details.

a duplicated thread as Where do those device tree files actually go that are from pinmux - #31 by foxsquirrel1

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.