[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ppc
Subject:    [linux-ppc] Some nits found cross compiling kernel
From:       Matt Porter <porter () neta ! com>
Date:       1998-08-29 8:58:53
[Download RAW message or body]

I've been setting up a little cross development environment from Linux/x86
to Linux/PPC.  I've noticed a few interesting thiings along the way to my
first zImage (don't know if it works, my target boards are at work).

I used binutils-2.9, egcs 1.0.3a, and vger kernel 2.1.119 extracted
980828.

1) Building egcs with --target=powerpc-unknown-linux yielded a compiler
which has __linux__ defined out of the box.  Due to some weird kernel
errors trying to build the vger source from a couple days ago I rebuilt
egcs a few times and using --target=ppc-linux-elf got a compiler that
didn't have __linux__ defined (had to force it into CFLAGS).  Anyway, I
thought that was odd since all of these similar target names should get
funneled into powerpc-unknown-linux-gnu AFAIK.

2) Cross-compiling the kernel is not real clean after vmlinux is
generated.  The Makefile in ./coffboot which generated vmlinux.gz wants a
powerpc-eabi cross compiler but I had to change i to grab my objcopy
binary...maybe all the ./arch/ppc makefile's should share CROSS*
variables.

3) On to zvmlinuz, grabbing the bootloader code caused some header files
not to be found.  <elf.h> in misc.c and <string.h> in ../coffboot/zlib.c
don't exist in those directories but rather need linux/....h to be found.
It would be nice to clean this up.

4) Finally, the offset and size scripts should use the variables set in
the Makefiles so that they properly use the cross tools for objdump.
They currently fail, of course, trying to use the x86 native objdump.

Hope this helps someone cross-compiling the kernel.  Please let me know if
I missed something obvious with these minor problems.

Matt Porter
porter@neta.com


[[ This message was sent via the linux-ppc mailing list. Replies are not ]]
[[ forced back to the list,  so be sure to Cc linux-ppc if your reply is ]]
[[ of general interest.  To unsubscribe from linux-ppc, send the message ]]
[[ 'unsubscribe' to linux-ppc-request@meetpoint.mcu.motsps.com.          ]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic