Custom build

  1. Downloaded the BSP and Sample Root Filesystem
    Jetson-210_Linux_R32.7.5_aarch64.tbz2
    Tegra_Linux_Sample-Root-Filesystem_R32.7.5_aarch64.tbz2`
  2. Extracted and Assembled the Root Filesystem

$ cd Linux_for_Tegra/rootfs/
$ sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.7.5_aarch64.tbz2

  1. Returned to Parent Directory and Applied Binaries:

$ cd ..
$ sudo apt-get install qemu-user-static
$ sudo ./apply_binaries.sh


4. **Applied Overlay (PCN Patch)**:


$ sudo tar xpf ../overlay_32.7.5_PCN211181.tbz2

5. **Customized Kernel Config:

$ cd sources/kernel/kernel-4.9/
$ make ARCH=arm64 O=build menuconfig
  1. Built Kernel Using Provided Script:

$ ./nvbuild.sh -o $PWD/kernel_out

Issue Faced During Build:

When I attempt to build the kernel, I receive the following error:

make[2]: *** No rule to make target ‘arch/arm64/boot/dts/../hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a00.dts’, needed by ‘arch/arm64/boot/dts/ddot/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a00.dtb’. Stop.
make[2]: *** Waiting for unfinished jobs…
DTC arch/arm64/boot/dts/ddot
cc1: fatal error: arch/arm64/boot/dts/..: No such file or directory
compilation terminated.
make[2]: *** [../arch/arm64/boot/dts/Makefile:133: arch/arm64/boot/dts/ddot] Error 1
make[1]: *** [arch/arm64/Makefile:154: dtbs] Error 2
make: *** [Makefile:171: sub-make] Error 2
how to solve this issue

Hello @niyas2,

It seems like you might be missing some device tree source code.

A couple quick questions:

  1. During which step did you extracted the BSP sources?

  2. Are you applying any custom changes to the source code?

  3. Is that all the output logs you got from the build process?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hi,
1- Iextracted the BSP sources right after downloading the Jetson Linux Driver Package (Jetson-210_Linux_R32.7.5_aarch64.tbz2) and the Sample Root Filesystem (Tegra_Linux_Sample-Root-Filesystem_R32.7.5_aarch64.tbz2).

I used tar to extract them, then applied the root filesystem using sudo ./apply_binaries.sh.
2- No, I used the default BSP and did not modify the kernel or device tree. but I change the menuconfig (enable ppp)
3- No, I only shared the last portion of the log where the error occurred. I can share the complete build log if needed.

Actually your steps here didn’t download any source code here.

Jetson Linux Driver Package and Sample Root Filesystem are all just for flashing. They do not include the source code.

It sounds weird to me that you suddenly have “sources/kernel/kernel-4.9/” appeared there.

Can you share the exact link to download the custom kernel build dependencies, and can you also provide the exact steps for a custom kernel build for Jetson Nano?

I don’t know which Jetpack version you are using there.

For rel-32.7.6, you could download source code from this website. And that " See the online Jetson Linux Developer Guide for detailed documentation." link has the document for steps to build custom kernel.

Hi WayneWWW

inthings@inthings-desktop:~$ head -n 1 /etc/nv_tegra_release

R32 (release), REVISION: 7.1, GCID: 29818004, BOARD: t210ref, EABI: aarch64, DATE: Sat Feb 19 17:05:08 UTC 2022

inthings@inthings-desktop:~$
jetpack version :4.61

please check

I followed the link you provided and downloaded the files, as shown in the screenshot below

is correct ? or any other file required ?

No, I think they are already sufficient to build a custom kernel.

If I change the menuconfig, what is the next step? What are the commands to rebuild the kernel?

You mean you already built out the kernel and how to apply it to the board?
or you are talking about how to build?

yes im talking about how to build and how to change the menuconfig after how to rebuild ?

Please refer to above document.

i followed this step ,
when am run this command
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j$(nproc) Image modules dtbs

error happen how to solve the error ?

/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a00.dtb’. Stop.
make[2]: *** Waiting for unfinished jobs…
DTC arch/arm64/boot/dts/ddot
cc1: fatal error: arch/arm64/boot/dts/..: No such file or directory
compilation terminated.
make[2]: *** [/home/inthings/jetson_4/sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile:133: arch/arm64/boot/dts/ddot] Error 1
make[1]: *** [arch/arm64/Makefile:154: dtbs] Error 2
make[1]: *** Waiting for unfinished jobs…
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL /home/inthings/jetson_4/sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/checksyscalls.sh
make[1]: Leaving directory ‘/home/inthings/jetson_4/kernel_out’
make: *** [Makefile:171: sub-make] Error 2
inthings@inthings-Z790-UD:~/jetson_4/sources/Linux_for_Tegra/source/public/kernel/kernel-4.9$

Are you sure you also decompress the device tree source code from the tarball you downloaded?

yes i did

Please share how is your directory looks like here

ls -a Linux_for_Tegra/source/public/

inthings@inthings-Z790-UD:~/jetson_4/Linux_for_Tegra/source$ ls -a Linux_for_Tegra/source/public/
ls: cannot access ‘Linux_for_Tegra/source/public/’: No such file or directory
inthings@inthings-Z790-UD:~/jetson_4/Linux_for_Tegra/source$ ls
nv_src_build.sh
inthings@inthings-Z790-UD:~/jetson_4/Linux_for_Tegra/source$

but i did

  1. Downloaded the BSP public sources tarball:**

public_sources.tbz2

  1. Extracted the public sources:

tar -xjf public_sources.tbz2

  1. Extracted the kernel source from inside:

cd Linux_for_Tegra/source/public
tar -xjf kernel_src.tbz2

  1. Verified kernel source is in:

Linux_for_Tegra/source/public/kernel/kernel-4.9


5. **Linked the missing `hardware` directory from BSP to resolve DTB path issue:**


cd Linux_for_Tegra/source/public/kernel/kernel-4.9
ln -s ../../../hardware hardware

6. **Then attempted to build DTBs:**

make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs -j$(nproc)

Hi,

Why did you do something that was not mentioned in the document?

I just want to know what are the directories look like when you decompressed them out.

For example, why are you running ln -s here? This shall not be needed.