Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716862 - genkernel-4 unable to build hppa netboot64 and livecd
Summary: genkernel-4 unable to build hppa netboot64 and livecd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL: https://gitweb.gentoo.org/proj/genker...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-10 05:22 UTC by Matt Turner
Modified: 2023-01-08 19:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2020-04-10 05:22:19 UTC
hppa has shipped 64-bit kernels with 32-bit userspace for ages (there is no 64-bit userspace).

With genkernel-3 we used the --kernel-cross-compile=... option to build a 64-bit kernel. With genkernel-4 this is not possible since there is only a --cross-compile=... option that controls kernel and userspace.

As a result, we can not build ISOs or netboot64 images currently.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2020-04-10 12:24:38 UTC
To clarify: We really need the possibility to build both kernels. There's no rule like "If it's hppa64, it's always 64bit kernel... if it's hppa, it's always 32bit kernel" or "it's always 64bit kernel, only userspace can be 32bit sometimes"?
Comment 2 Matt Turner gentoo-dev 2020-04-11 18:34:19 UTC
> If it's hppa64, it's always 64bit kernel... if it's hppa, it's always 32bit kernel

If what is hppa64, exactly?

In releng.git/releases/weekly/specs/hppa/netboot2-hppa{32,64}.spec there really isn't anything that differentiates the builds except for the --cross-compile=hppa64-unknown-linux-gnu flag.
Comment 3 Matt Turner gentoo-dev 2020-04-11 18:38:14 UTC
Pressed submit too soon.

> "it's always 64bit kernel, only userspace can be 32bit sometimes"?

That's right. In netboot2-hppa64 the kernel is 64-bit and the userland is 32-bit. In netboot2-hppa32 both are 32-bit.
Comment 4 Matt Turner gentoo-dev 2020-05-20 18:02:38 UTC
Any more thoughts on this? Like I mentioned, we cannot build HPPA ISOs or netboot images as a result.
Comment 5 Rolf Eike Beer archtester 2020-06-01 20:02:07 UTC
The trick is to only set this:

KERNEL_CROSS_COMPILE="hppa64-unknown-linux-gnu"

Don't set the unprefixed CROSS_COMPILE.
Comment 6 Matt Turner gentoo-dev 2021-09-13 18:03:11 UTC
End user ran into this here: https://forums.gentoo.org/viewtopic-p-8598012.html

I noticed that recently more --kernel-* options were added, but I didn't immediately spot them because they weren't added to the longusage(). I pushed two commits to resolve that:

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=0fb54668df8925cd81ed9d40917c19a78891f9da
https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=be489a166f78f9cb2e89e8749094a6ddd0310ade

I also updated the hppa specs in releng.git to use these options:

https://gitweb.gentoo.org/proj/releng.git/commit/?id=41695d87ba25fa3ed9bf7730657e11761906329b
https://gitweb.gentoo.org/proj/releng.git/commit/?id=f05a60204a66a9db5370bae1d91845c70d98d356

which works \o/

... but good grief, we seriously have to pass

>   --kernel-ar=hppa64-unknown-linux-gnu-ar
>   --kernel-as=hppa64-unknown-linux-gnu-as
>   --kernel-cc=hppa64-unknown-linux-gnu-cc
>   --kernel-ld=hppa64-unknown-linux-gnu-ld
>   --kernel-nm=hppa64-unknown-linux-gnu-nm
>   --kernel-objcopy=hppa64-unknown-linux-gnu-objcopy
>   --kernel-objdump=hppa64-unknown-linux-gnu-objdump
>   --kernel-ranlib=hppa64-unknown-linux-gnu-ranlib
>   --kernel-readelf=hppa64-unknown-linux-gnu-readelf
>   --kernel-strip=hppa64-unknown-linux-gnu-strip

when the kernel build system lets you just specify a CHOST prefix? We should really readd --kernel-cross-compile=... to genkernel.
Comment 7 matoro archtester 2022-12-21 20:49:06 UTC
I have opened a genkernel PR for this here:  https://github.com/gentoo/genkernel/pull/44

Tested on my hppa box using both genkernel.conf and command line options.  This implementation allows explicit --kernel-xxx= options to override --kernel-cross-compile= on the whole.
Comment 8 Larry the Git Cow gentoo-dev 2023-01-08 18:58:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=92427dc0d11b26b03fcfb9c6de7c23fac32c7888

commit 92427dc0d11b26b03fcfb9c6de7c23fac32c7888
Author:     Matoro Mahri <matoro@users.noreply.github.com>
AuthorDate: 2022-12-21 20:01:26 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2023-01-08 18:57:02 +0000

    Reimplement --kernel-cross-compile= for genkernel 4.x
    
    This restores the --kernel-cross-compile= option from genkernel 3.x,
    which controls only the --kernel-xxx= options as opposed to both kernel
    and userspace options controlled by --cross-compile=.
    
    Also adds documentation on the missing options in default
    genkernel.conf.
    
    Bug: https://bugs.gentoo.org/716862
    Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com>
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 gen_cmdline.sh       |  6 ++++++
 gen_determineargs.sh | 23 ++++++++++++-----------
 genkernel.conf       | 25 +++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 11 deletions(-)
Comment 9 Matt Turner gentoo-dev 2023-01-08 19:07:25 UTC
commit b134bfb4883f72b633432818ab78662bb26d423f
Author: Matt Turner <mattst88@gentoo.org>
Date:   Sun Jan 8 14:03:44 2023 -0500

    sys-kernel/genkernel: Version bump to 4.3.2