How to build nvidia-l4t kernel deb packages from sources?

I tred the following:

export CROSS_COMPILE_AARCH64_PATH=/opt/toolchains/aarch64-glibc-2020.08-1
export CROSS_COMPILE=${CROSS_COMPILE_AARCH64_PATH}/bin/aarch64-linux-
export ARCH=arm64
export LOCALVERSION=-tegra
make -C kernel/kernel-5.10/ tegra_defconfig
make -C kernel/kernel-5.10/ bindeb-pkg

Everything appears to be built correctly, until the packaging step:

...
  OBJCOPY arch/arm64/boot/Image
  GZIP    arch/arm64/boot/Image.gz
make KERNELRELEASE=5.10.104-tegra ARCH=arm64    KBUILD_BUILD_VERSION=1 -f ./Makefile intdeb-pkg
sh ./scripts/package/builddeb
make[6]: *** No rule to make target 'debian/linux-image/usr/lib/linux-image-5.10.104-tegra/../../../../../../hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dtb', needed by '__dtbs_install'.  Stop.
make[5]: *** [Makefile:1401: dtbs_install] Error 2
make[4]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 2
make[3]: *** [Makefile:1582: intdeb-pkg] Error 2
make[2]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1582: bindeb-pkg] Error 2
make: Leaving directory '/srv/om/jag/orin511/k511deb/kernel/kernel-5.10'
jag@fufu:k511deb$
1 Like

had you install the Jetson Linux build utilities? such as… $ sudo apt install build-essential bc.

Yes, they are installed:

jag@fufu:k511deb$ dpkg -s build-essential | head -n 2
Package: build-essential
Status: install ok installed
jag@fufu:k511deb$ dpkg -s bc | head -n 2
Package: bc
Status: install ok installed
jag@fufu:k511deb$

The device tree tegra234-p3701-0000-p3737-0000.dtb file is built in the kernel built directory, but being sought in the hardware/ source directory.

jag@fufu:k511deb$ find . -name tegra234-p3701-0000-p3737-0000.dtb
./kernel/kernel-5.10/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000-p3737-0000.dtb
jag@fufu:k511deb$

Just to test, you could put a symbolic link in the hardware/ directory pointing to the actual .dtb file. If that succeeds, then the target itself could be given a patch to look there.

please also refer to developer guide, Repackaging Debian Packages.

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