kernel cross-compile
Igor Muratov
migor at lrn.ru
Fri Jun 21 01:55:53 EST 2002
Hi All.
I'm build kernel for 7044-170 (uniproc.).
I'm go step by step corresponding by penguinppc64.org. Now i have
binutils-2.12.90.0.9 and gcc-3.1 successfully compiled with
--target=powerpc64-linux
Next. I try to build kernel 2.4.18 with patch-2.4.19-pre8.gz and
linuxppc64-2.4.19-pre8-ibm-1.patch.gz
Also, I had to make my own small patch
------------->8----------
--- arch/ppc64/kernel/process.c. Thu Jun 20 17:58:26
2002
+++ arch/ppc64/kernel/process.c Thu Jun 20 17:58:51
2002
@@ -41,6 +41,7
@@
#include
<asm/prom.h>
#include
<asm/ppcdebug.h>
#include
<asm/machdep.h>
+#include
<asm/paca.h>
#include
<asm/iSeries/HvCallHpt.h>
int dump_fpu(struct pt_regs *regs, elf_fpregset_t
*fpregs);
--- arch/ppc64/kernel/traps.c. Thu Jun 20 17:58:06
2002
+++ arch/ppc64/kernel/traps.c Thu Jun 20 17:52:58
2002
@@ -40,6 +40,7
@@
#include
<asm/io.h>
#include
<asm/processor.h>
#include
<asm/ppcdebug.h>
+#include
<asm/rtas.h>
extern int fix_alignment(struct pt_regs
*);
extern void bad_page_fault(struct pt_regs *, unsigned
long);
--- arch/ppc64/lib/dec_and_lock.c. Thu Jun 20 18:54:03
2002
+++ arch/ppc64/lib/dec_and_lock.c Thu Jun 20 18:48:03
2002
@@ -8,6 +8,7
@@
*/
#include
<linux/spinlock.h>
+#ifndef
ATOMIC_DEC_AND_LOCK
#include
<asm/system.h>
#include
<asm/atomic.h>
@@ -36,3 +37,4
@@
spin_unlock(lock);
return
0;
}
+#endif
------------->8----------
Now, my trouble in last step of kernel building:
/opt/ppc64/bin/powerpc64-linux-ld -T arch/ppc64/vmlinux.lds -Bstatic -e
0xc000000000000000 -Ttext 0xc000000000000000 arch/ppc64/kernel/head.o
init/main.o init/version.o init/do_mounts.o \
--start-group \
arch/ppc64/kernel/kernel.o arch/ppc64/mm/mm.o
arch/ppc64/lib/lib.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
arch/ppc64/xmon/x.o \
drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/net/net.o drivers/media/media.o drivers/scsi/scsidrv.o
drivers/cdrom/driver.o drivers/pci/driver.o drivers/video/video.o
drivers/input/inputdrv.o \
net/network.o \
/opt/cross/linux/lib/lib.a \
--end-group \
-o vmlinux
arch/ppc64/kernel/head.o: In function `.start_secondary_prolog':
arch/ppc64/kernel/head.o(.text+0x9db4): undefined reference to
`.start_secondary'
arch/ppc64/kernel/kernel.o: In function `.openpic_init_processor':
arch/ppc64/kernel/kernel.o(.text+0x28b04): undefined reference to
`.get_hard_smp_processor_id'
arch/ppc64/kernel/kernel.o: In function `.openpic_set_affinity':
arch/ppc64/kernel/kernel.o(.text+0x28f14): undefined reference to
`.get_hard_smp_processor_id'
arch/ppc64/kernel/kernel.o: In function `.xics_set_affinity':
arch/ppc64/kernel/kernel.o(.text+0x29988): undefined reference to
`.get_hard_smp_processor_id'
arch/ppc64/kernel/kernel.o: In function `.pSeriesLP_qirr_info':
arch/ppc64/kernel/kernel.o(.text+0x36380): undefined reference to
`.get_hard_smp_processor_id'
arch/ppc64/kernel/kernel.o: In function `.openpic_init':
arch/ppc64/kernel/kernel.o(.text.init+0xa60): undefined reference to
`.get_hard_smp_processor_id'
arch/ppc64/kernel/kernel.o(.text.init+0xba0): more undefined references
to `.get_hard_smp_processor_id' follow
kernel/kernel.o: In function `.printk':
kernel/kernel.o(.text+0x4ca4): undefined reference to `.__restore_flags'
kernel/kernel.o(.text+0x4cec): undefined reference to `.__restore_flags'
kernel/kernel.o: In function `.release_console_sem':
kernel/kernel.o(.text+0x4e50): undefined reference to `.__restore_flags'
kernel/kernel.o(.text+0x4e98): undefined reference to `.__restore_flags'
kernel/kernel.o: In function `.register_console':
kernel/kernel.o(.text+0x51c4): undefined reference to `.__restore_flags'
kernel/kernel.o(.text+0x12718): more undefined references to
`.__restore_flags' follow
drivers/video/video.o: In function `.tdfxfb_probe':
drivers/video/video.o(.text.init+0x190c): undefined reference to
`.eeh_memset'
make: *** [vmlinux] Error 1
Where is my fault?
--
With best regards System administrator
Igor Muratov mailto:migor at lrn.ru
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list