CDROM Boot Initrd Problem

Charles Meier cmeier at peerpro.net
Tue Nov 9 16:33:38 PST 2004


I think I have this one figured out.  Based on the gcc
specs file, it looks as though gcc is using an i686
as the default architecture.  It isn't my kernel that is the
root of the problem, it is the glibc libs and executables
which are compiled for an i686 that prevents the new LFS
from booting on an older i586 or K6.  The "fix" is to
completely redo my LFS by compiling everything for the
correct target architecture.

But this problem brings up two points that may be of interest
to LFS folks:  First, the comment in the directions for glibc
seems very misleading:

  This package is known to behave badly when you change its default
  optimization flags (including the -march and -mcpu options). Therefore,
  if you have defined any environment variables that override default
  optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting
  them when building Glibc.

It is misleading because AFAICT, having a default cpu target in
the specs files is EXACTLY the same as compiling w/
-march="default_cpu".  So if glibc "behaves badly when you change
its default optimization flags (including the -march and -mcpu options)"
why doesn't it behave badly when the default is set in the specs file
(or does it?  Glibc seems really fragile at times).

2nd point is that it ought to be trivial to build an LFS that works
on your choice of processors in the ix86 family by modifying the default
cpu in the specs file sometime early in the LFS build process.  This means
LFS can be built for a different processor in the same family without
using unnessary kernel modules or ugly uname hacks.  Gnu's configure
scripts might override that based on uname, but that can be overcome
by putting some std options into a file in the prefix/share directory.

cmeier

Jeremy Huntwork wrote:
> On Tue, 2004-11-09 at 08:34 -0500, Charles Meier wrote:
> 
> 
>>My LFS was built as a pure vanilla system w/ no options for -mcpu or -march.
>>Why is a uname hack necessary?
> 
> 
> If it was really an arch problem with the kernel, I don't think it would
> have gotten that far.  I had once tried to use a 686 kernel on my 586
> and right after loading the kernel in grub, the machine would reboot.
> So if the kernel wasn't the right arch, you wouldn't get as far as you
> did.
> 
> Are you able to boot the cd using init=/bin/bash ?
> 
> That might provide a clue.
> 




More information about the lfs-support mailing list