Make dtbs and cp nvidia-oot/../../generic-dts/dtbs

TL;DR - COPY the generic-dts/dtbs FAILS
Thre are no dtbs in the folder to copy over.
$ cp nvidia-oot/device-tree/platform/generic-dts/dtbs/*
/Linux_for_Tegra/kernel/dtb/

STEPS taken to build kernel from source. No modifcations to kernel, on devkit.

I have been carefully following the Kernel customization
DevGuideKernelbuild

In the Jetpack 6.2 R36.3 GA L4T 36.4.3
I have successfully pulled down and manually installed all the code.

Going through all the steps:
I hvae git
I have bc and all the other programs needed
I have the toolchain installed
I downloaded the sources from nvidias jetpack page
I extracted the tbz2 files from public_sources.tbz2
My install path is /disk1/cpurwin/nvidia-jetson/
$ cd /Linux_for_Tegra/source
$ tar xf kernel_src.tbz2
$ tar xf kernel_oot_modules_src.tbz2
$ tar xf nvidia_kernel_display_driver_source.tbz2

I am not doing a real-time kernel

Followed the Building the Jetson Linux Kernel steps

my export(s):
export | grep KER
declare -x KERNEL_HEADERS=“/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel/kernel-jammy-src”
export | grep CROSS
declare -x CROSS_COMPILE=“/disk1/l4t-gcc/aarch64–glibc–stable-2022.08-1//bin/aarch64-buildroot-linux-gnu-”
export | grep MOD_
declare -x INSTALL_MOD_PATH=“/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/rootfs/”

I have success with :
make -C kernel
sudo -E make install -C kernel
cp kernel/kernel-jammy-src/arch/arm64/boot/Image
/Linux_for_Tegra/kernel/Image (successfully copied)

Building oot modules*
start in ../source No issue

make modules

==========================
Display driver compiled successfully.
.========================

sudo -E make modules_install

Looks like it may have finished correctly, not entirely clear
I do get:

make[1]: Entering directory ‘/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel/kernel-jammy-src’
INSTALL /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/rootfs//lib/modules/5.15.148-tegra/updates/nvhwpm.ko
SIGN /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/rootfs//lib/modules/5.15.148-tegra/updates/nvhwpm.ko
DEPMOD /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/rootfs//lib/modules/5.15.148-tegra
Warning: modules_install: missing ‘System.map’ file. Skipping depmod.

update initramfs completes fine

make dtbs completes fine

fi
if [ -d /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel-devicetree/generic-dts/hardware/ ] ; then \*
	rm -rf /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel-devicetree/generic-dts/hardware/ ; \*
*fi*
*make[1]: Leaving directory '/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source'*
*================================================================================*
*DTBs compiled successfully.*
*================================================================================*

COPY the generic-dts/dtbs FAILS
Thre are no dtbs in the folder to copy over.

folder contents

cpurwin@yxi00045259:/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/nvidia-oot/device-tree/platform/generic-dts$ ls
Makefile

Where are all the dtbs that /i would expect to copy over???
I can still flash since the

I saw this note:

If KERNEL_HEADERS points to a source directory rather than an exported headers directory, you will need to run make ARCH=arm64 defconfig scripts or equivalent in order to build dtc.

I went down into

Linux_for_Tegra/source/kernel/kernel-jammy-src$ make ARCH=arm64 defconfig scripts

and ran the make command.
After that re-ran the make dtbs. No change in the generics-dts/dtbs folder.

I know the build “works” since with original dtbs from nvidia, I can take all the build image files, and flash the orin agx and it will boot.
However need to know what I am missing in getting the oot dtbs to generate.

Thank you.

Hi charles.purwin,

It seems the dtb is not built successfully.
Could you share the log when you run make dtbs on your host?

It seems you downloaded the source through compressed file.
Could you try using the script to download the source instead?

$ cd <Linux_for_Tegra>/source
$ ./source_sync.sh -k -t jetson_36.4.3

Just re-ran make dtbs in source folder here is the output.
did not issue clean, mrproper or anything else.

Off to try the source_sync.sh script now.

dtbs_build.txt (444.1 KB)

Okay, pulled down dtc-src. However git:// was timing out so had to change the script to http://

if [ $DALL -eq 1 -o "x${DNLOAD}" == "xy" ]; then
                 DownloadAndSync "$WHAT" "${LDK_DIR}/${WHAT}" "**http:**//${REPO}" "${TAG}" "${OPT}"

also added three echos to see the values of the variables.

     else
                echo "Downloading default $WHAT source..."

                echo "git clone command"
                echo $REPO_URL
                echo $LDK_SOURCE_DIR

                git clone "$REPO_URL" -n ${LDK_SOURCE_DIR} 2>&1 >/dev/null

output shows files cloned down.

cpurwin@yxi00045259:/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source$ ./source_sync.sh  -k -t jetson_36.4.3 
Directory for kernel/kernel-jammy-src, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel/kernel-jammy-src, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for nvgpu, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/nvgpu, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for nvidia-oot, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/nvidia-oot, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for hwpm, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/hwpm, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for nvethernetrm, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/nvethernetrm, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for kernel-devicetree, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel-devicetree, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for hardware/nvidia/t23x/nv-public, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for hardware/nvidia/tegra/nv-public, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/hardware/nvidia/tegra/nv-public, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Directory for nvdisplay, /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/nvdisplay, already exists!
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
But the directory is not a git repository -- clean it up first


Downloading default dtc-src/1.4.5 source...
git clone command
http://nv-tegra.nvidia.com/3rdparty/dtc-src/1.4.5.git
/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/dtc-src/1.4.5
Cloning into '/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/dtc-src/1.4.5'...
warning: redirecting to https://nv-tegra.nvidia.com/3rdparty/dtc-src/1.4.5.git/
remote: Counting objects: 410, done
remote: Finding sources: 100% (410/410)
remote: Total 410 (delta 32), reused 409 (delta 32)
Receiving objects: 100% (410/410), 544.65 KiB | 57.00 KiB/s, done.
Resolving deltas: 100% (32/32), done.
The default dtc-src/1.4.5 source is downloaded in: /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/dtc-src/1.4.5
Syncing up with tag jetson_36.4.3...
Switched to a new branch 'mybranch_2025-04-10-1744290847'
/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/dtc-src/1.4.5 source sync'ed to tag jetson_36.4.3 successfully!

re-ran make dtbs
diff -s says the files are identical

Also see that there is a dtc-1.4.5.tbz2 in the source directory, however the instructions did not say to untar it. FYI.

dtbs_build.txt (444.1 KB)

dtbs_dtc-src-cloned.zip (11.9 KB)

Sorry had to zip up the file, forum thought it was a duplicate file. However it is the output after pulling down dtc-src and re-runing make dtbs

Additional testing/work.

git has been a problem here at work. could not get kernel-src or nvgpu to clone down.
While it was working and breaking, I took the files from
https://developer.nvidia.com/embedded/jetson-linux-r3643
and followed

then stepped into

and walked through everything with a fresh install path.
All items were compiling and passing. When i got to make dtbs
ended up with errors which dont seem to make sense. Please see attached file(s).

make_dtbs.txt (338.0 KB)
make_dtbs_errors.txt (114.1 KB)

Your logs look good to me that there should be dtb files under /disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs/.

Why did you get different results?
Do you modify something in device tree so that it results in the error case?

Do you build dtb on an Ubuntu host PC?

Build is on ubuntu 20.04 PC.

NO modifications made, goal is to set up the R36.4.3 Linux_for_Tegra sub folders as-is from Nvidia, extract all the required .tbz2 files
(BTW dtc-1.4.5.tbz2 is required, but not listed in the kernel modification of the guide)

NO changes made to any files.

follow the directions and do all the makes, set up all the exports etc.

End result is steps work until make dtbs.
No dtbs are made and placed into the

/disk1/cpurwin/nvidia-jetson/Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs/

folder. The scripts don’t even make a dtbs folder, there is just Makefile in generic-dts.

If you use the source_sync.sh to clone the source, I think you don’t need to do anything additionally.
I’ve verified it working on my host with the steps listed in document.

Linux_for_Tegra/source/kernel-devicetree](mybranch_2025-03-18-1742266653) $ ls
generic-dts  legacy-dts  OWNERS  scripts

Could you help to elaborate on why you got these 2 different results?

Sometimes we can’t use source_sync.sh and go to remote sites. So wouldn’t be able to get the files from git repo. However we can download the tbz2 files.

The instructions are missing the “tar xf dtc-14.2.tbz2” file, as it is needed, but isn’t listed as getting untar’ed. That does occur when you git the files down as the script pulls down the dtc-src.

I was pushing the make dtbs output to two files 2> from stderr (make_dtbs_errors.txt) and one the stdout output (make_dtbs.txt)

Linux_for_Tegra/source/kernel-devicetree](mybranch_2025-03-18-1742266653) $ ls
generic-dts  legacy-dts  OWNERS  scripts

Your quote shows Linux_for_Tegra/source/kernel-devicetree, not Linux_for_Tegra/source/nvidia-oot/device-tree/platform/generic-dts/

The issue that I am still seeing is in the instructions, after make dtbs, it says to do this cp:

$ cp nvidia-oot/device-tree/platform/generic-dts/dtbs/*
/Linux_for_Tegra/kernel/dtb/*

However in nvidia-oot that folder dtbs, doesn’t exist.
Looking over the Makefiles and the outputs of:

make modules
make dtbs

nvidia-oot doesnt seem to get a dtbs folder. The Makefile calls nvidia-oot, but it doesn’t make dtbs. make dtbs does make dtbs, but the Makefile puts them into

Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs/

A diff of the two folders shows a majority of the dtb’s are generated and in the folder, but there are some that aren’t created.
diff_folders.txt (1.5 KB)

I have a ubuntu 20.04 at home, and followed directions starting at quick start, since to build you need the release package, and

  1. Download the latest Jetson Linux release package and sample file system for your Jetson developer kit from Jetson Linux Archive | NVIDIA Developer
  2. Enter the following commands to untar the files and assemble the rootfs:

$ tar xf ${L4T_RELEASE_PACKAGE}
$ sudo tar xpf ${SAMPLE_FS_PACKAGE} -C Linux_for_Tegra/rootfs/
$ cd Linux_for_Tegra/
$ sudo ./tools/l4t_flash_prerequisites.sh
$ sudo ./apply_binaries.sh

Then went to Kernel Customization and used git to get all the files and follow each step exactly as written.
NO customization, just trying to make sure all the files build, and all the step work.
Nothing failed, however, again NO files in nvidia-oot/device-tree/platform/generic-dts/dtbs/

ubuntu20_04:/home/ubuntu/nvidia/Linux_for_Tegra/source/nvidia-oot/device-tree/platform/generic-dts$ ls
Makefile
ubuntu20_04:/home/ubuntu/nvidia/Linux_for_Tegra/source/nvidia-oot/device-tree/platform/generic-dts$

@KevinFFF

I see you are pointing at source/kernel-devicetree folder not source/oot-nvidia\

Is it possible the directions in the developer guide are wrong, and one is supposed to copy out of kernel-devicetree/generic-dts/dtbs ???

Which developer guide you are referring?

Please check Building the DTBs.
It shows kernel-devicetree as following:

Okay, it seems you referred to the developer guide of JP6.0 for L4T r36.3.0 as following:

Please refer to the steps in developer guide of JP6.2 for L4T r36.4.3

And that explains it. At somepoint I ended up on 36.3 not 36.4.3 not sure how that happened, thought I was on the latest documentation.

While I am not sure why things changed that much between 36.3 and 36.4.3
I appreciate you going through this with me.
Looks like I have a correct build happening!

Thanks for the help.

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