[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cross building an out of tree kernel module?



Hi,

On Thu, Aug 26, 2021 at 03:20:45AM +0000, Nathan Miller wrote:
> Is there a "right way" to cross build an out of tree kernel module for Debian buster?

Right place to ask here.

> 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?

I fear you nailed it. You'll be unable to install the header package
until it gets updated. It should be depending on gcc-8-for-host:arm64
instead and it cannot do that, because the package does not exist yet.
This is a long-standing issue known as #666743. It needs more testing
and review to proceed.

The linux source package already employs a workaround for the lack of
gcc-for-host in Build-Depends. That workaround can be copied to the
runtime depends in principle. You can even do so yourself and rebuild
linux.

This is of course a very unsatisfying answer. It does highlight though
that the Debian cross movement needs help. We cannot make all the things
just work with the current level of participation. The present rate of
regressions already exceeds our capacity.

Helmut


Reply to: