Greetings!
Is there a "right way" to cross build an out of tree kernel module for Debian buster?
I got something to (mostly) work, but my approach is a bit awkward.
Here's what I did within a buster chroot:
```
dpkg --add-architecture arm64
apt update
# Install some build essentials and the linux headers (amd64)
apt install -y build-essential crossbuild-essential-arm64 linux-headers-amd64
# Force installation of the arm64 kernel headers:
apt download linux-headers-4.19.0-17-arm64
dpkg -i --force-depends ./linux-headers-4.19.0-17-arm64_4.19.194-1_arm64.deb
# Now, build the driver:
make KDIR=/usr/src/linux-headers-4.19.0-17-arm64/ \
CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64
```
Ultimately, I'd like to create a package for this driver using sbuild, but the forced installation of the arm64 headers is going to be a problem (I think).
Simply attempting to install the arm64 linux headers causes the following error:
```
The following packages have unmet dependencies:
linux-headers-4.19.0-17-arm64:arm64 : Depends: gcc-8:arm64 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.```
Am I going about this wrong? Is there a better way?
Thanks!
|