Boot problem

Ronald Hummelink maillist at hummelink.xs4all.nl
Mon Jan 26 05:16:50 PST 2004


On Mon, 2004-01-26 at 12:01, Greg Schafer wrote:
> On Mon, Jan 26, 2004 at 11:42:58AM +0100, Meher Khiari wrote:
> > > Huh? It's the kernel crapping out and not the compiled LFS.
> > > As you quite
> > > rightly say, the K6 is more like an i586. Compiling his
> > > kernel for i586
> > > should allow it to boot fine.
> 
> > No, it is more an LFS compilation pb.
> > Effectively the K6 is a i586 and when you compiled the packages for the
> > Athlon platform it was compiled for the i686. You have compiled the kernel
> > for the i586 (and it works) but the other binaries (bash, init ....) are
> > compiled for an i686 and that's why it don't work !
> > 
> > > There is no need for cross-compiling hint unless _optimizing_
> > > for a lesser
> > > cpu. By default, i.e. without any sort of CFLAGS, gcc will emit i386
> > > instructions that run on all x86 CPU's (equivalent to -march=i386).
> 
> > By default the configure script tries to figure out the machine type and
> > emits i686 for the Athlon and compiles for it !!
> 
> No, you're completely wrong on both counts. This has been explained on the
> lists hundreds of times. GCC will *schedule* for the i686. But the
> instructions will still run on all x86 CPU's. The OP's problem is the kernel
> which WAS compiled with -march=1686 or -march=athlon depending on what
> CPU was selected thus causing the blowup. That's why recompiling for i586
> will make it boot.
> 

Greg calm down!

The very next thing that should be displayed is the message displayed by
init. since this does not happen, the problem is init, not the kernel.
This behaviour is HIGHLY typical for the build on fast can not run on
slow box. Having experienced this personally i know what the behaviour
looks like. The fact the system does boot on teh athlon only strengtens
the suspect is indeed Illegal instruction while running init... My
Lfs-3.1-cvs box suffered this very same path.

A kernel build for i686 will reboot instantly when booted on i586, not
somewhere along the way (there is detection code very early in
kernelboot)

(So yes, I DARE to tell YOU you are wrong since every symptom points
that way.)

Solution is indeed as suggested: get the crosscompiling hint, build the
i586 faker module, rebuild lfs from scratch.

Ronald


> If you don't believe me. Try this:
> 
> echo 'main(){}' > dummy.c
> gcc -fverbose-asm -S dummy.c
> grep march dummy.s
> 
> and tell me what you see? I dare you to still tell me I'm wrong!

> Greg
> LFS Toolchain Maintainer
-- 
Linux is like a small snowball rolling downhill. Microsoft is just
waiting down the mountain...




More information about the lfs-support mailing list