login
Header Space

 
 

Linux 2.6.x PPC Cross Compilation

May 21, 2007 - 11:17am
Submitted by vignesb_rect on May 21, 2007 - 11:17am.
Linux

How to compile Linux 2.6.21 version for PPC?
I am using ELDK Cross Compiler for MPC8560 Boards.

Steps Followed:
1. cp arch/ppc/configs/mpc8560_ads_defconfig .config
2. make menuconfig ARCH=ppc
3. make ARCH=ppc CROSS_COMPILE=ppc_85xx-

When Making

ppc_85xx-objcopy -O elf32-powerpc \
--add-section=.image=arch/ppc/boot/images/vmlinux.gz \
--set-section-flags=.image=contents,alloc,load,readonly,data \
arch/ppc/boot/simple/dummy.o arch/ppc/boot/simple/image.o
ppc_85xx-ld -m elf32ppc -T /home/vignesh/Desktop/KernelPorting/linux-2.6.21/arch/ppc/boot/ld.script -Ttext 0x00800000 -Bstatic -o arch/ppc/boot/simple/zvmlinux arch/ppc/boot/simple/head.o arch/ppc/boot/simple/relocate.o arch/ppc/boot/simple/misc.o arch/ppc/boot/simple/image.o arch/ppc/boot/common/lib.a arch/ppc/boot/lib/lib.a
arch/ppc/boot/common/lib.a(misc-common.o): In function `tstc':
misc-common.c:(.text+0x30): undefined reference to `serial_tstc'
arch/ppc/boot/common/lib.a(misc-common.o): In function `getc':
misc-common.c:(.text+0x5c): undefined reference to `serial_tstc'
misc-common.c:(.text+0x6c): undefined reference to `serial_getc'
arch/ppc/boot/common/lib.a(misc-common.o): In function `puts':
misc-common.c:(.text+0xcc): undefined reference to `serial_putc'
misc-common.c:(.text+0x130): undefined reference to `serial_putc'
arch/ppc/boot/common/lib.a(misc-common.o): In function `putc':
misc-common.c:(.text+0x1ac): undefined reference to `serial_putc'
misc-common.c:(.text+0x264): undefined reference to `serial_putc'
make[2]: *** [arch/ppc/boot/simple/zvmlinux] Error 1
make[1]: *** [simple] Error 2
make: *** [zImage] Error 2

I am getting such an error.
Any one out there getting such an error let me know.

Linux 2.6.x PPC Cross Compilation

July 10, 2007 - 1:24am
Anonymous (not verified)

check again in your make menuconfig.
You might not have included some option required by other option.

No. make menuconfig would

July 10, 2007 - 5:32am

No. make menuconfig would catch the dependency.
This sounds like a broken platform in the tree, something like CONFIG_WANT_EARLY_SERIAL having been defined, but the actual serial driver missing.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary