Boot problem

Greg Schafer gschafer at zip.com.au
Mon Jan 26 03:01:12 PST 2004


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.

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



More information about the lfs-support mailing list