View previous topic :: View next topic |
Author |
Message |
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Fri Apr 09, 2021 9:14 am Post subject: |
|
|
Hi Neddy,
I don't know which compiler I am using exactly. I am just following the HPPA Installation Handbook step by step.
I tried genkernel all exactly because I don't feel confident to go through kernel options, but that didn't work so I tried a manual configuration.
https://pastebin.com/baakxx90
Here you go. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Fri Apr 09, 2021 11:33 am Post subject: |
|
|
Shiunbird,
You have told the kernel to make. That's a 64 bit kernel.
It requires that you use kgcc64, since your userspace gcc is 32 bit only.
The config also says Code: | CONFIG_ARCH_DEFCONFIG="arch/parisc/configs/generic-64bit_defconfig" |
Poking about a bit there is also a generic-32bit_defconfig.
Install kgcc64 then use that to build the kernel.
The handbook says Code: | To compile a 64-bit kernel, first emerge kgcc64. However, running a 64-bit kernel is discouraged. Only run a 64-bit kernel if the system has more than 4GB of RAM or if the server requires it, i.e. on the A500. | You should use a 64 bit kernel as you have 8G RAM.
I've not had a system that used a 64 bit kernel with a 32 bit userland since my SUN U10 (SPARC) failed in 2012, so my memory of kernel building is a bit rusty.
The choice is to configure and make 32 bit kernel with your system gcc and lose 4G RAM, or use kgcc64 to build a 64 bit kernel.
It worries me that the kernel build actually started with the wrong gcc. That makes me think you have to tell the kernel build system which gcc to use and that's not in the handbook.
Nor is it in the SPARC handbook.
Even looking at a pre wiki Gentoo Handbook the kernel build instructions are the same. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Fri Apr 09, 2021 1:56 pm Post subject: |
|
|
Aha!
I used kgcc64 the first time, but since it looked to me that my Debian kernel was 32 bit, I skip it this time.
Do I need to re-emerge genkernel after building kgcc64?
The first time it built ok, so I guess if I do kgcc and try again it will work out. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Fri Apr 09, 2021 2:02 pm Post subject: |
|
|
Shiunbird,
Genkernel is just a dumb tool. It provides a config file, dumps that into the kernel and builds it and an initrd.
There is no need to rebuild it if you have it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Sat Apr 10, 2021 6:28 am Post subject: |
|
|
Hi Neddy,
kgcc64 built flawlessly overnight.
Here is what happens:
Code: | (chroot) c8000 /usr/src/linux # make -v
GNU Make 4.3
Built for hppa2.0-unknown-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(chroot) c8000 /usr/src/linux # make -j4 && make modules_install
SYNC include/config/auto.conf.cmd
scripts/Kconfig.include:40: linker 'hppa64-linux-ld' not found
make[2]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1
make[1]: *** [Makefile:602: syncconfig] Error 2
make: *** [Makefile:710: include/config/auto.conf.cmd] Error 2
(chroot) c8000 /usr/src/linux # |
And
Code: | (chroot) c8000 /usr/src/linux # genkernel all
portageq: no python-exec wrapped executable found in /usr/lib/python-exec.
portageq: no python-exec wrapped executable found in /usr/lib/python-exec.
* Gentoo Linux Genkernel; Version 4.2.1
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: all
* ERROR: No kernel .config specified, or file not found!
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.
*
* Please do *not* report kernel compilation failures as genkernel bugs!
*
(chroot) c8000 /usr/src/linux #
|
I thought genkernel would build the config file, but it complains that it doesn't have one.
If I provide the one I make, genkernel says it has a bad format. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Sat Apr 10, 2021 8:57 am Post subject: |
|
|
Shiunbird,
I've never used genkernel but it has an option to use the existing .config file and another to let you run menuconfig before it does its stuff.
If you do Code: | make generic-64bit_defconfig | you will get the kernel provided generic-64bit_defconfig, which is probably no use whatsoever but you can fettle that with make menuconfig.
genkernel -h
genkernel --help
man genkernel
and https://wiki.gentoo.org/wiki/Genkernel are all worth a read.
If genkernel does not have a config for you, that's a bug. Please report it at bugs.gentoo.org.
Code: | scripts/Kconfig.include:40: linker 'hppa64-linux-ld' not found | says that you are missing a 64 bit linker.
That would be provided by a 64 bit binutils, such as sys-devel/binutils-hppa64.
However, that script is looking for not Code: | hppa64-unknown-linux-ld | so its going to fail for genkernel too.
You need sys-devel/binutils-hppa64 if its not already installed and you need the kernel build system to look for the 64 bit linker you have installed.
Or possibly add some symlinks so that hppa64-linux-ld points to the linker you actually have.
I can test cross compiling a kernel here as the kernel is one of the easiest packages to cross compile.
Testing in a chroot is a bit harder as I don't have any real hardware. I would be relying on QEMU to let me chroot from amd64 into hppa. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Sat Apr 10, 2021 10:11 am Post subject: |
|
|
I'm back to trying to figure this out.
I can provide safe remote access if you wish. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Sat Apr 10, 2021 10:22 am Post subject: |
|
|
No good.
I have no idea what's different now. During my previous attempt, I'd get much further in the build.
https://pastebin.com/anb8riGS
Things like this:
Code: | ./include/linux/smp.h: At top level:
./include/linux/smp.h:34:26: error: requested alignment '20' is not a positive power of 2
34 | __aligned(sizeof(struct __call_single_data));
| ^~~~~~~~~~~~~~~~~~
./include/linux/compiler_attributes.h:52:68: note: in definition of macro '__aligned'
52 | #define __aligned(x) __attribute__((__aligned__(x))) |
make me think it's a problem with the code but I'm not nearly as good enough as required to figure this out. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Sat Apr 10, 2021 10:42 am Post subject: |
|
|
Shiunbird,
I'm curious to have a look round but that's very much a last ditch thing.
My main system is doing an update right now, including adding in QEMU with hppa, built with static-user, so I can chroot into my hppa target root.
I collect cross toolchains
Code: | $ gcc-config -l
[1] aarch64-unknown-linux-gnu-10.2.0 *
[2] arm-brcm-linux-uclibcgnueabi-10.2.0 *
[3] armv6j-hardfloat-linux-gnueabi-10.2.0 *
[4] armv7a-hardfloat-linux-gnueabi-10.2.0 *
[5] avr-10.2.0 *
[6] hppa-unknown-linux-gnu-10.2.0 *
[7] hppa64-unknown-linux-gnu-10.2.0 *
[8] i586-pc-linux-gnu-10.2.0 *
[9] i686-pc-linux-gnu-10.2.0 *
[10] mips64el-unknown-linux-gnu-10.2.0 *
[11] powerpc-unknown-linux-gnu-10.2.0 *
[12] x86_64-pc-linux-gnu-9.3.0
[13] x86_64-pc-linux-gnu-10.2.0 * |
and there is a new gcc and binutils out, so that 12 gccs and binutils to build :)
As you posted your kernel .config, I have all the information to try a cross compile, so I may well try.
-- edit -- .
The 5.11.11 kernel with your config as posted above, cross compiles OK. Its put all the bits together then
Code: | ARCH=parisc CROSS_COMPILE=hppa64-unknown-linux-gnu- make menuconfig
ARCH=parisc CROSS_COMPILE=hppa64-unknown-linux-gnu- make -j10
ARCH=parisc CROSS_COMPILE=hppa64-unknown-linux-gnu- make modules_install INSTALL_MOD_PATH=/usr/hppa-unknown-linux-gnu |
I did not need to do the menuconfig. I was just curious. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Sun Apr 11, 2021 9:46 am Post subject: |
|
|
Thank you. You are incredibly kind.
I'll restart fresh in a couple of days because that issue with the path for python-exec is irritating me. (I'm not really voluntarily studying for another AWS certification - so a bit short on time).
I will most definitely get back to you.
Having the functional Debian installation allows me to get to the point where we are now in not more than 20 minutes (and i can let world build overnight)
I'm still very curious to what I am missing to have it work and build on its own out of the box. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Sun Apr 11, 2021 10:06 am Post subject: |
|
|
Shiunbird,
Where did your gentoo CHOST come from?
Its not the same as the default set in the profile.
Its not wrong,
I can host that kernel if you want to try it or just the binary bits.
Cross compiling is always fun. :)
Portage won't cross compile from 64 bit to 32 bit and I can't get QEMU to build with hppa support just yet.
I will file a bug about that. That makes it difficult to port portage to new 32 bit arches from a 64 bit build host.
Anyway. Gentoo is a hobby for all of us. Putting foot on the table is way above Gentoo in every list of priorities.
Good luck with you studies. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Sun Apr 11, 2021 10:15 am Post subject: |
|
|
You have a quite impressive build environment. =)
I agree - I must keep eating.
However, studying cloud stuff and point-and-click interfaces with silly APIs is boring.
This is where the fun is, thus is where I've been spending most of my time. =)
My CHOST is default out of the box. I didn't change anything.
But it could be related to this:
https://en.wikipedia.org/wiki/PA-RISC#CPU_specifications
The ISA has different versions. I have the latest (PA-9000 shortfin) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Sun Apr 11, 2021 5:52 pm Post subject: |
|
|
Shiunbird,
Its a Gentoo thing. I understand it better now.
I built a cross toolchain for hppa-unknown-linux-gnu, so that's the CHOST I got.
I could add a hppa2.0-unknown-linux-gnu toolchain to my collection. It only matters if you want to use my binaries.
A few of them, mostly toolchain things, are CHOST dependant, as its hard coded in them at build time.
That cross toolchain collection is things I've build up over the years. Its not all useful to me any more but I just can't bring myself to delete it because I just know I will want it again if I do that.
I was thinking that my CHOST was default out of the box too. :) _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mattst88 Developer
Joined: 28 Oct 2004 Posts: 422
|
Posted: Mon Sep 13, 2021 5:29 am Post subject: |
|
|
genkernel-4 wrecked the cross-compiling support we need to build 64-bit kernels on PA-RISC.
With the latest genkernel, you can make things work by passing a maddening number of options:
Code: | --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 |
See boot/kernel/hppa64/gk_kernargs in https://gitweb.gentoo.org/proj/releng.git/tree/releases/specs/hppa/installcd-stage2-minimal.spec?id=f05a60204a66a9db5370bae1d91845c70d98d356 for example. _________________ My Wiki page |
|
Back to top |
|
|
|