Custom build

UD:~/jetson_4/sources/Linux_for_Tegra/source/public$ ls -a
. hardware
.. kernel
dtc-1.4.0.tar.bz2 kernel_src.tbz2
dtc-1.4.0.tar.bz2.sha1sum kernel_src.tbz2.sha1sum
FreeRTOSV8.1.2_src.tbz2 libgstnvdrmvideosink_src.tbz2
FreeRTOSV8.1.2_src.tbz2.sha1sum libgstnvdrmvideosink_src.tbz2.sha1sum
gstegl_src.tbz2 libgstnvvideosinks_src.tbz2
gstegl_src.tbz2.sha1sum libgstnvvideosinks_src.tbz2.sha1sum
gstjpeg_src.tbz2 nvbuild.sh
gstjpeg_src.tbz2.sha1sum nvcommon_build.sh
gst-nvarguscamera_src.tbz2 nvgstapps_src.tbz2
gst-nvarguscamera_src.tbz2.sha1sum nvgstapps_src.tbz2.sha1sum
gst-nvcompositor_src.tbz2 nvidia-xconfig_src.tbz2
gst-nvcompositor_src.tbz2.sha1sum nvidia-xconfig_src.tbz2.sha1sum
gst-nvtee_src.tbz2 nv_public_src_build.sh
gst-nvtee_src.tbz2.sha1sum nvsample_cudaprocess_src.tbz2
gst-nvv4l2camera_src.tbz2 nvsample_cudaprocess_src.tbz2.sha1sum
gst-nvv4l2camera_src.tbz2.sha1sum opencv_gst_samples_src.tbz2
gst-nvvidconv_src.tbz2 opencv_gst_samples_src.tbz2.sha1sum
gst-nvvidconv_src.tbz2.sha1sum public_sources_sha.txt
gst-nvvideo4linux2_src.tbz2 u-boot_src.tbz2
gst-nvvideo4linux2_src.tbz2.sha1sum u-boot_src.tbz2.sha1sum
gstomx1_src.tbz2 v4l2_libs_src.tbz2
gstomx1_src.tbz2.sha1sum v4l2_libs_src.tbz2.sha1sum
inthings@inthings-Z790-UD:~/jetson_4/sources/Linux_for_Tegra/source/public$

but still show the error

Could you clean up things and do it again?

You already did that ln -s here so I am not really sure about what that does “hardware” directory do there. Whether this is true path or just a symbolic link.

And actually your build steps are not same as what our document provided.

I really don’t know where did you get such steps. You better follow our steps one by one first.

Hi,
i followed the you given document after found the error

one 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]: *** [/home/inthings/jetson_4/Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile:133: arch/arm64/boot/dts/ddot] Error 1
CC kernel/kallsyms.o
make[1]: *** [arch/arm64/Makefile:154: dtbs] Error 2

second error :

/home/inthings/jetson_4/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/wireless/realtek/rtl8812au/hal/rtl8812a/usb/rtl8812au_xmit.c: In function ‘upload_txpktbuf_8812au’:
/home/inthings/jetson_4/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/wireless/realtek/rtl8812au/hal/rtl8812a/usb/rtl8812au_xmit.c:433:61: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
433 | while ((rtw_read32(adapter, REG_PKTBUF_DBG_CTRL) & BIT23) == 1) {
| ^~
CC drivers/platform/tegra/tegra_l1ss_kernel_interface.o
CC [M] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/pwrseq.o
CC [M] drivers/net/wireless/realtek/rtl8814au/hal/rtl8814a/rtl8814a_rf6052.o
cc1: all warnings being treated as errors

make[1]: *** [/home/inthings/jetson_4/Linux_for_Tegra/source/public/kernel/kernel-4.9/Makefile:1122: drivers] Error 2
make[1]: Leaving directory ‘/home/inthings/jetson_4/kernel_out’
make: *** [Makefile:171: sub-make] Error 2
inthings@inthings-Z790-UD:~/jetson_4/Linux_for_Tegra/source/public/kernel/kernel-4.9$

Please directly share the commands you ran in your terminal for us to check.

inthings@inthings-Z790-UD:~/jetson_4/Linux_for_Tegra/source/public/kernel/kernel-4.9$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make[1]: Entering directory ‘/home/inthings/jetson_4/kernel_out’
HOSTCC scripts/basic/fixdep
GEN ./Makefile
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf

configuration written to .config

make[1]: Leaving directory ‘/home/inthings/jetson_4/kernel_out’
inthings@inthings-Z790-UD:~/jetson_4/Linux_for_Tegra/source/public/kernel/kernel-4.9$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8 → this command found the error

I mean every step. Not just one make command. Every command before this make happened.

Including all the variable that got exported.

inthings@inthings-Z790-UD:~/jetson_4$ ls
Jetson-210_Linux_R32.7.5_aarch64.tbz2 public_sources.tbz2
kernel_out Tegra_Linux_Sample-Root-Filesystem_R32.7.5_aarch64.tbz2
Linux_for_Tegra
inthings@inthings-Z790-UD:~/jetson_4$

Extract the TBZ2 file:
tar -xjf public_sources.tbz2

Extract the kernel source file:
cd Linux_for_Tegra/source/public
tar –xjf kernel_src.tbz2

Install the utilities with the command:
sudo apt install build-essential bc

export TEGRA_KERNEL_OUT=~/jetson_4/kernel_out
mkdir -p $TEGRA_KERNEL_OUT

export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra

cd cd ~/jetson_4/sources/Linux_for_Tegra/source/public/kernel/kernel-4.9
mkdir -p $TEGRA_KERNEL_OUT
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8

Where are you building this driver code? Is it on your host PC?

yes Linux 20.04

But looks like you didn’t export toolchian for your cross compile here.

Hi WayneWWW
i did the export toolchain

but still have the issue

Hi,
Please run the command and see if the toolchain is shown:

$ ls /usr/bin/aarch64-linux-gnu-*

To ensure the path is correct.

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