[Gllug] Debugging kernel loading initrd

Nix nix at esperi.org.uk
Thu May 1 00:42:21 UTC 2008


On 29 Apr 2008, John Edwards said:
> Thanks again for sharing your deep knowledge of glibc.

Ha! Ha! Hardly. I know enough to build and test it, know when test
failures are likely to be significant, fix simple bugs and not get
burned. Complex stuff is still beyond me.

> That all makes sense to me, except that the glibc 2.7 INSTALL
> appears to say the opposite (use --host and not --build):

That's somewhat out of date. If you set one, it'll set the other for
you.

>      If you only specify `--host', `configure' will prepare for a
>      native compile but use what you specify instead of guessing what
>      your system is. This is most useful to change the CPU submodel.
>      For example, if `configure' guesses your machine as
>      `i586-pc-linux-gnu' but you want to compile a library for 386es,
>      give `--host=i386-pc-linux-gnu' or just `--host=i386-linux' and add
>      the appropriate compiler flags (`-mcpu=i386' will do the trick) to
>      CFLAGS.
>
>      If you specify just `--build', `configure' will get confused.

In that case I'm using a confused glibc on every system I use :)

You actually get a warning from configure if you use --host without
--build. It's probably safest to use both unless you're cross-compiling.

> So to clarify I'm building glibc using Linux From Scratch on an i686
> machine but want to use it on CPUs from i486 upwards. So should I be
> setting both build and host to "i486-pc-linux-gnu"?

Yep.

> ps. The CFLAGS were done by someone else and I've not touched them.

glibc makes massive changes to them anyway, filtering out dangerous
options and adding heaps of others.

(btw, if you're not using --enable-omitfp, you almost certainly want
to. It's tested much more than alternatives, despite the horrible
warnings wrapped around it for no obvious reason. I've not known it
cause a problem since the days of GCC 2.7.x.)

On 30 Apr 2008, John Edwards told this:

> Ran a full rebuild on the Intel Core 2 Duo with both --host and
> --build set to i486-pc-linux-gnu, and then the busybox ASH shell
> can now run init.

Yay!

> Thanks very much to you and Richard Jones for your help. I think
> I owe you guys a drink or two.

I guess it's lucky for you I don't drink alcohol, then :) but yes, we
should meet up and swap reminiscences of the days when the net was young
and Brunel University's CS department wasn't crap ;)

(disclaimer: all my spies inside Brunel had left as of a couple of years
ago, so it *may* have ceased being crap and I wouldn't know: IIRC you
left more recently than I so may still have active spies.)

-- 
`If you are having a "ua luea luea le ua le" kind of day, I can only
 assume that you are doing no work due [to] incapacitating nausea caused 
 by numerous lazy demons.' --- Frossie
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list