Joe,

Could please explain the statements you made below?  I am performing a
similar task to Luigi... I'm working on a i686 but I want to cross-compile
and build a system for an i586.

Are you saying that when I am building the the CLFS System (starting at
Chapter 9), I need to "fake out" uname using an inserted kernel module, or
using a wrapper around the real uname?  Or is this something that I need to
do way before that (i.e. when I am building the cross-compiler)?

Btw, which kernel do I modify... my system's kernel or the one built in
Chapter 12?

Lastly, I need to understand if MACHTYPE and uname are related.  I took and
applied the suggestion you provided concerning how to get the stripped down
MACHTYPE in a Makefile.  When I test the result of my ARCH variable
(pre-chroot) it is set to i686.  When I am building the CLFS System, should
that not be i586?

Dave

On 9/10/07, Joe Ciccone <[EMAIL PROTECTED]> wrote:
>
> luigi wrote:
> > Hello,
> >
> > I am trying to cross compile and I have some (newbie) questions:
> >
> > -
> > .bashrc:
> > on my compiling host -->
> > export CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE |
> > cut -d- -f2)/cross/")"
> >
> > I obtained i686-cross-linux-gnu
> > export CLFS_HOST="i686-cross-linux-gnu"
> >
> > For my target host I obtained with the same command:
> >
> > export CLFS_TARGET="i586-cross-linux-gnu"
> >
> > Is this ok or should I insert
> >  i586-pc-linux-gnu
> > in .bashrc?
> >
> -cross- is only meant for the host triplet. the target triplet is
> supposed to be -pc- for x86, and -unknown- for virtually everything
> else. The type of build you're attempting will not achieve the goal
> you're looking for. You will obtain a i586 toolchain, but the final
> system's triplet is determined by the output of config.guess. Since
> you're host system is a p4, and you're host distro probably has a i686
> kernel, if you chroot you will end up with a i686 system. Pretty much
> what you want to happen is uname -m to report i586 instead of i686 so
> that when you compile the final system config.guess will report
> i586-pc-linux-gnu.
>
> There's a couple of ways to go about doing this.
>
> The first one is to install a uname hack into the kernel. Which modifies
> the uts machine name to be whatever you want, in your case, i586.
> The second one is to wrap the uname program with a script or another
> program that modifies it's output.
> The third is to pass arguments to each and every package you want to
> build.
>
> I recommend the first one as it's the most transparent to the build. You
> just have to remember to remove the kernel module after you're done.
>
> This tarball contains the sources to work with 2.6 kernels before the
> uts namespace changes, (I believe pre 2.16):
> http://cross-lfs.org/~jciccone/uname_hack.tar.bz2
>
> This source file works with kernels after the uts namespace changes
> (2.16 and on):
> http://cross-lfs.org/~jciccone/uname_ix86.c
> _______________________________________________
> Clfs-support mailing list
> [email protected]
> http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support
>
_______________________________________________
Clfs-support mailing list
[email protected]
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support

Reply via email to