[Gllug] Debugging kernel loading initrd

John Edwards john at cornerstonelinux.co.uk
Wed Apr 30 09:04:40 UTC 2008


On Tue, Apr 29, 2008 at 08:40:19PM +0100, John Edwards wrote:
<snip> On Tue, Apr 29, 2008 at 08:20:32PM +0100, Nix wrote:
>> On 27 Apr 2008, John Edwards told this:
>> 
>>> The glibc was being built on a i686 CPU with "-march=i486" and
>>> "-mtune=generic" CFLAGS. I'm currently rebuilding the whole system
>>> with "--host=i486-pc-linux-gnu" added to glibc configure options to
>>> see if that helps.
>> 
>> Aha. You can't configure a glibc for specific targets (even specific CPU
>> submodels like i586) by just setting CFLAGS. glibc's configure script
>> needs to be told your actual --build system, so that it can look in the
>> appropriate model-specific sysdeps subdirectories. (You should generally
>> set that rather than --host if your build system can run binaries
>> intended for the target glibc, so that it can use it during the build
>> process.)
<snip>
> Thanks again for sharing your deep knowledge of glibc.
> 
> That all makes sense to me, except that the glibc 2.7 INSTALL
> appears to say the opposite (use --host and not --build):
> ------------------------------------------------------------------
> `--build=BUILD-SYSTEM'
> `--host=HOST-SYSTEM'
>      These options are for cross-compiling.  If you specify both
>      options and BUILD-SYSTEM is different from HOST-SYSTEM, `configure'
>      will prepare to cross-compile glibc from BUILD-SYSTEM to be used
>      on HOST-SYSTEM.  You'll probably need the `--with-headers' option
>      too, and you may have to override CONFIGURE's selection of the
>      compiler and/or binutils.
> 
>      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.
> ------------------------------------------------------------------
> 
> 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"?

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.

I'm still not sure if both host and build should be set to build
for i486 on a i686 machine.

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


-- 
#---------------------------------------------------------#
|    John Edwards   Email: john at cornerstonelinux.co.uk    |
#---------------------------------------------------------#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20080430/9fe1b0fa/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list