Cross compiling the kernel

VAKKALANKA RAO Sridhar SVakkalankarao at covansys.com
Tue Apr 29 22:49:12 EST 2003


Hi Gruss,

I really appreciate your help. Here are the sequence of steps taken by me:

(1) Download linux-2.4.20 kernel source, patch-2.4.21-pre4, ppc64-patch-2.4.21-pre4, ppc64-patch-2.4.21-pre4-2 and unzip them all.

(2) Untar the kernel source and run the three patches in the same order specified above (I had no problems).

(3) Add /opt/ppc64/bin to the PATH environment variable (I followed the toolchain instructions in the URL very closely).

(4) In the top level Makefile, hardcode ARCH to ppc64 (in subsequent trials, I searched for all occurences of "uname -m" and performed hardcoding for all, but that didn't work either).

(5) In the same top level Makefile, set CROSS_COMPILE = powerpc64-linux- .

(6) Run "make menuconfig" at the shell prompt and take care of all hardware issues.

(7) Run "make dep" at the shell (there were no problems).

(8) Run "make clean" at the shell (again no problems).

(9) Run "make zImage" at the shell.

Running "make zImage" gave the following output.

powerpc64-linux-gcc -D__KERNEL__ -I/home/penguin/kernel/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -fsigned-char -msoft-float -pipe -Wno-uninitialized -mminimal-toc -fno-builtin -mtraceback=full   -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /home/penguin/kernel/linux/include/asm/io.h:248,
                 from /home/penguin/kernel/linux/include/linux/blkdev.h:11,
                 from /home/penguin/kernel/linux/include/linux/blk.h:4,
                 from init/main.c:25:
/home/penguin/kernel/linux/include/asm/eeh.h: In function `eeh_readb':
/home/penguin/kernel/linux/include/asm/eeh.h:105: warning: comparison of promoted ~unsigned with constant
/home/penguin/kernel/linux/include/asm/eeh.h: In function `eeh_readw':
/home/penguin/kernel/linux/include/asm/eeh.h:116: warning: comparison of promoted ~unsigned with constant
/home/penguin/kernel/linux/include/asm/eeh.h: In function `eeh_inb':
/home/penguin/kernel/linux/include/asm/eeh.h:162: warning: comparison of promoted ~unsigned with constant
/home/penguin/kernel/linux/include/asm/eeh.h: In function `eeh_inw':
/home/penguin/kernel/linux/include/asm/eeh.h:177: warning: comparison of promoted ~unsigned with constant
/home/penguin/kernel/linux/include/asm/unistd.h: In function `init':
/home/penguin/kernel/linux/include/asm/unistd.h:442: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:442: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h: In function `write':
/home/penguin/kernel/linux/include/asm/unistd.h:437: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:437: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h: In function `read':
/home/penguin/kernel/linux/include/asm/unistd.h:438: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:438: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h: In function `lseek':
/home/penguin/kernel/linux/include/asm/unistd.h:439: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:439: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h: In function `execve':
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:441: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h: In function `open':
/home/penguin/kernel/linux/include/asm/unistd.h:442: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:442: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h: In function `waitpid':
/home/penguin/kernel/linux/include/asm/unistd.h:445: error: asm-specifier for variable `__sc_4' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:445: error: asm-specifier for variable `__sc_5' conflicts with asm clobber list
/home/penguin/kernel/linux/include/asm/unistd.h:445: confused by earlier errors, bailing out
make: *** [init/main.o] Error 1

I hope you are able to help me out with this.

Thanks in advance
Sri

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list