Purpose:
I am trying to patch the kernel for use with custom hardware. However, I am first building the kernel with no patches applied.
Problem:
I am unable to package the kernel for L4T 32.5.1 as a debian package. I see the same issue in 32.5.0 and 32.5.1. I did not see the issue with 32.3.
Host machine:
Trial 1: x86_64
Trial 2: arm64 (in case cross-compilation was an issue)
Both had identical results
Steps followed:
- Download BSP
cd bsp-32.5.1.0/Linux_for_Tegra
- Sync sources
bash source_sync.sh -t tegra-l4t-r32.5.1
- Nvidia drivers
tar -xjf nv_tegra/nvidia_drivers.tbz2 -C nvidia_drivers
- Make
cd sources/kernel/kernel-4.9
# when cross-compiling, do the following 2 lines:
export ARCH=arm64
export CROSS_COMPILE=$TOOLCHAIN_PATH/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra-rebuilt
make tegra_defconfig
make -j 8
make bindeb-pkg
Error message occurs in the make bindeb-pkg
step, particularly in the headers check:
...
CHECK usr/include/media/ (12 files)
./usr/include/media/ov23850.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>
CHECK usr/include/misc/ (11 files)
./usr/include/misc/eqos_ape_ioctl.h:31: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/misc/tegra-cryptodev.h:90: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/misc/tegra-cryptodev.h:150: userspace cannot reference function or variable defined in the kernel
./usr/include/misc/tegra-cryptodev.h:151: userspace cannot reference function or variable defined in the kernel
CHECK usr/include/mtd/ (5 files)
CHECK usr/include/net/ (1 files)
./usr/include/net/pgdrv.h:38: included file 'linux/cdev.h' is not exported
scripts/Makefile.headersinst:169: recipe for target 'usr/include/net/.check' failed
make[2]: *** [usr/include/net/.check] Error 123
scripts/Makefile.headersinst:44: recipe for target 'net' failed
make[1]: *** [net] Error 2
Makefile:1312: recipe for target 'headers_check' failed
make: *** [headers_check] Error 2
It appears that cdev.h
is in kernel space, not in user space / uapi. Is there a uapi cdev.h
missing, or is there something else that should be present?