Architecture-specific kernels (arm64-generic) built for x86_64

  • Open
  • quality assurance status badge
Details
3 participants
  • Dariqq
  • Leo Famulari
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Vagrant Cascadian
Severity
normal

Debbugs page

Vagrant Cascadian wrote 7 days ago
(address . bug-guix@gnu.org)(address . w@wmeyer.eu)(address . leo@famulari.name)
87y0x9zvlp.fsf@wireframe
In trying to create an alternate kernel configuration, I noticed that
the various kernels on x86_64 that are targeted at various specific
architectures (e.g. linux-libre-arm64-generic) ... are actually built
for X86_64:

$ file $(guix build linux-libre-arm64-generic)/bzImage
gnu/packages/linux.scm:989:2: warning: package linux-libre-arm64-generic@6.13.6 does not support x86_64-linux
/gnu/store/2jj1jxirrgiq972xbfk8cz8b9i642qq5-linux-libre-arm64-generic-6.13.6/bzImage: Linux kernel x86 boot executable bzImage, version 6.13.6-arm64-generic (guix@guix) #1 SMP PREEMPT_DYNAMIC 1, RO-rootFS, swap_dev 0XF, Normal VGA
$ grep ^CONFIG_X86_64= $(guix build linux-libre-arm64-generic)/.config
gnu/packages/linux.scm:989:2: warning: package linux-libre-arm64-generic@6.13.6 does not support x86_64-linux
CONFIG_X86_64=y

Those were downloaded from the substitute servers... and guix even
helpfully warns me that something is fishy... so it is not like I was
holding it wrong, per se! :)

These packages should either refuse to build (e.g. it does not match the
architecture, so should not even try to build) or attempt to cross build
when building on a non-native architecture.

I swear they used to cross-build for the appropriate architecture on
x86_64 out-of-the box ages ago, but there have been probably significant
changes to how cross-compilation and/or linux-libre packaging is done
since then...

$ git grep -E 'define-public linux-libre.*(generic|honey|mips|arm)' gnu/packages/linux.scm | nl
1 gnu/packages/linux.scm:(define-public linux-libre-arm-generic
2 gnu/packages/linux.scm:(define-public linux-libre-arm-generic-5.10
3 gnu/packages/linux.scm:(define-public linux-libre-arm-generic-5.4
4 gnu/packages/linux.scm:(define-public linux-libre-arm-omap2plus
5 gnu/packages/linux.scm:(define-public linux-libre-arm64-generic
6 gnu/packages/linux.scm:(define-public linux-libre-lts-arm64-generic
7 gnu/packages/linux.scm:(define-public linux-libre-arm64-generic-5.10
8 gnu/packages/linux.scm:(define-public linux-libre-arm64-generic-5.4
9 gnu/packages/linux.scm:(define-public linux-libre-arm64-honeycomb
10 gnu/packages/linux.scm:(define-public linux-libre-riscv64-generic
11 gnu/packages/linux.scm:(define-public linux-libre-mips64el-fuloong2e

Building all those package variants is a waste of build resources when
the result is not usable for the intended purpose...

Thanks for maintaining linux-libre in Guix! :)


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZ9IWQgAKCRDcUY/If5cW
qswHAQCCxbojqzuIGpA2XmfhXIZKG6dTQCxrE4xe3VuQI/3lfgEAoU+TTWj30lO9
PB+nkdFmh4x/UjAYq1pX2B+hQdK7Ngw=
=k6tU
-----END PGP SIGNATURE-----

Leo Famulari wrote 5 days ago
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . w@wmeyer.eu)(address . 76988@debbugs.gnu.org)
Z9R_IXFQHva46fyK@jasmine.lan
Thanks for pointing this out!

I don't do anything regarding the "generic" arm64 kernels, so I also
don't know how they work or why they are built in any particular way.

Here's a crude command to produce a list of interesting changes to the
linux-libre packaging:

`git log v1.4.0..HEAD --grep linux-libre --oneline | grep -v Update | grep -v "Remove linux-libre" | grep -v "Add linux-libre" | grep -v "news:"`

I hope that the arm64 / aarch64 users can get them working properly! And
I invite them to join the kernel team and help out in the future too!
Dariqq wrote 2 days ago
bug#76988: Architecture-specific kernels (arm64-generic) built for, x86_64
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . w@wmeyer.eu)(address . 76988@debbugs.gnu.org)(name . Leo Famulari)(address . leo@famulari.name)
cd28178e-1b73-47da-bf25-2f8883ba79e6@posteo.net
Hello Vagrant,

This looks to me like a problem with cuirass (or cuirass settings).
The packages are marked as unsupported correctly, e.g. the arm64-generic
kenel should only support aarch64-linux (as can be seen by the warning).
However the ci server attempts to build it for all architectures.

I searched for linux-libre-arm64-generic-6.13.7 on the cuirass
interface on ci.g.g.o and there were builds for
i686-linux, x86_64_linux, powerpc64le-linux and
aarch64-linux

As the x86_64 build succeeds it then serves the substitute to someone
asking for it.

Specifying either --system=aarch64-linux or --target=aarch64-linux-gnu
gave me a substitute corresponding to a native/cross built arm64 kernel.

file $(guix build linux-libre-arm64-generic
--target=aarch64-linux-gnu)/Image
/gnu/store/*linux-libre-arm64-generic-6.13.7/Image: Linux kernel ARM64
boot executable Image, little-endian, 4K pages
Vagrant Cascadian wrote 2 days ago
(name . Dariqq)(address . dariqq@posteo.net)(address . w@wmeyer.eu)(address . 76988@debbugs.gnu.org)(name . Leo Famulari)(address . leo@famulari.name)
87h63rmwks.fsf@wireframe
On 2025-03-17, Dariqq wrote:
Toggle quote (5 lines)
> This looks to me like a problem with cuirass (or cuirass settings).
> The packages are marked as unsupported correctly, e.g. the arm64-generic
> kenel should only support aarch64-linux (as can be seen by the warning).
> However the ci server attempts to build it for all architectures.

It is definitely not specific to cuirass, as I only noticed it with
"guix build" of a custom package that would not possibly have
substitutes, and only later checked the substitute servers
(ci.guix.gnu.org, bordeax.guix.gnu.org) to see that they had the same
problem...


Toggle quote (16 lines)
> I searched for linux-libre-arm64-generic-6.13.7 on the cuirass
> interface on ci.g.g.o and there were builds for
> i686-linux, x86_64_linux, powerpc64le-linux and
> aarch64-linux
>
> As the x86_64 build succeeds it then serves the substitute to someone
> asking for it.
>
> Specifying either --system=aarch64-linux or --target=aarch64-linux-gnu
> gave me a substitute corresponding to a native/cross built arm64 kernel.
>
> file $(guix build linux-libre-arm64-generic
> --target=aarch64-linux-gnu)/Image
> /gnu/store/*linux-libre-arm64-generic-6.13.7/Image: Linux kernel ARM64
> boot executable Image, little-endian, 4K pages

That is consistent with what I observed too!


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZ9hSlAAKCRDcUY/If5cW
qtooAQCd96pCt/zqOE/lX4G9TiF4Jjwi2a6fqyRQxuLk0T9olwD/adM0pTaobD9j
NG3sxktwi2seJ2WcqXxuam3SohWNQAo=
=/6eM
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76988@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76988
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help