Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 812350 - genkernel generated (supplied) Linux kernel configuration settings for x86 targets i686 even if CHOST specifies i486
Summary: genkernel generated (supplied) Linux kernel configuration settings for x86 ta...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-10 02:09 UTC by Kevin Brace
Modified: 2021-10-06 20:52 UTC (History)
1 user (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 Kevin Brace 2021-09-10 02:09:02 UTC
I have been trying to install Gentoo Linux to my old Intel Pentium with MMX 233 MHz based computer.
I compiled the Linux kernel using genkernel.

# genkernel all

Since I installed (compiled) and upgraded other packages simultaneously with genkernel, the whole genkernel operation took about 16 straight days to finish.
Anyway, when I try to boot Gentoo Linux, it instantly freezes.
I tried looking into several possibilities, to no avail, but I finally decided to look into the Linux kernel configuration settings genkernel used.
It turns out the .config file under /usr/src/linux installed by genkernel compiles the Linux kernel for i686 (Pentium Pro) and later processors.
Specifically, it is activating the use of CMOV instructions.
Shouldn't genkernel have a way to respect CHOST settings or shouldn't the default .config file supplied by genkernel compile the Linux kernel for i486 (I will say i486SX specifically)?
As a result of this, I am now forced to recompile the Linux kernel, and I expect this to take another 2 weeks or so.
Please fix this since it adversely affects users trying to install Gentoo Linux to Pentium class computers including Socket 370 processor like VIA Technologies Cyrix III / C3.
Comment 1 Sam James archtester gentoo-dev Security 2021-09-10 02:11:30 UTC
(In reply to Kevin Brace from comment #0)
> As a result of this, I am now forced to recompile the Linux kernel, and I
> expect this to take another 2 weeks or so.

I would consider e.g. borrowing Debian or some other distro's binary kernel to get booted initially.

(Or of course, cross-compiling, but I understand that it's kind of against the "point" of some projects like this. I'm going to do it soon too!)

I'll leave others to comment on the genkernel-specific issue, but you are free to compile your own kernel if you wish too.
Comment 2 Kevin Brace 2021-09-17 23:00:41 UTC
I am currently compiling Linux 5.10.61 off of minimal LiveCD environment.
I am simultaneously compiling LLVM 12.0.1 along with the Linux kernel, so the compiling is taking time.
I expect it to take another week and half.
After running the computer (233 MHz Intel Pentium MMX with 768 MB of RAM) 1 week or so straight, LLVM is about 1/3 done.
Linux kernel is probably about 40% done.
I can now interrupt and restart Linux kernel build since I am doing it manually (i.e., did not go through "genkernel all" this time around), but I sure hope the power will not go off (we are already in the wildfire season) since portage is compiling LLVM simultaneously, and if the power goes off, I will need to restart LLVM compilation.


(In reply to Sam James from comment #1)
> (In reply to Kevin Brace from comment #0)
> > As a result of this, I am now forced to recompile the Linux kernel, and I
> > expect this to take another 2 weeks or so.
> 
> I would consider e.g. borrowing Debian or some other distro's binary kernel
> to get booted initially.
> 
> (Or of course, cross-compiling, but I understand that it's kind of against
> the "point" of some projects like this. I'm going to do it soon too!)
> 
> I'll leave others to comment on the genkernel-specific issue, but you are
> free to compile your own kernel if you wish too.
Comment 3 Kevin Brace 2021-10-06 20:52:45 UTC
I can confirm that the boot time crash I experienced was due to CMOV instructions being generated by GCC.
The default Linux kernel compilation settings supplied by genkernel activates generation of CMOV instructions (i.e., assumes Pentium Pro to be the target environment).
I recompiled the Linux kernel with i486SX (a 486 without an FPU) as the target environment, and the computer (Intel Pentium with MMX 233 MHz) can now properly boot Gentoo Linux.
That being said, please fix this bug (shortcoming) or give proper warnings to the user.