> 
> I think it's currently possible to use flash-kernel:armhf on an
> arm64 system to build an armhf image, and this would break that.
> Given that flash-kernel is an arch-dependent package, I think it
> should use the package architecture here instead of `uname -m`.
> 
> (But since flash-kernel doesn't contain any native code, I think
> it wwould be even better to make it arch-independent and to specify
> the machine architecture in each entry in db/all.db.)
> 
> Ben.
> 

Specifying the machine architecture in db/all.db will not solve the
problem.

The key field for all.db is the "Machine" property read from
/proc/device-tree/model. (It would be safer to read the property from
the new dtb to be installed because the model property may change over
time as has happened for the "Wandboard i.MX6 Quad Board rev B1".)

If a system is supported both by armhf and arm64 kernels we cannot
safely assume that the model property is different. Both armhf and
arm64 kernels might (or even should) be using the same device tree.

If we want to provide the package architecture we would have to pass
it to the kernel hooks.
linux-image-3.16.0-4-amd64.postinst has variable $arch.
Unfortunately it is missing in linux-image-4.7.0-1-amd64.postinst.
We could copy the architecture to an environment variable here, e.g.

$ENV{'DEB_ARCH'}="$arch";

Best regards

Heinrich Schuchardt

Reply via email to