XIP kernel(2.6.11 with MTD) fail in compiling
Hello,
I'm working on a PXA-272 based development board and trying to enable a XIP kernel for it. The root file system needs to be JFFS2, so MTD support should be included. When I tried to boot the kernel, it stalled at that message:
===============================================
......
eth0: cs8900 rev K found at 0xf0000300 no EEPROM
cs89x0: No EEPROM, relying on command line....
cs89x0 media RJ-45, IRQ 41, programmed I/O, MAC 00:0b:f4:2f:9b:e5
Probing flash0 at physical address 0x00000000 (32-bit bankwidth)
===============================================
I found an option in kernel configuration, named "MTD_XIP" and it seemed a solution. I also added a "-mlong-calls" option to CFLAGS when XIP enabled, in case some function calls exceeded the PC24 limitation in ARM.
Compilation errors occured like that:
===============================================
drivers/built-in.o(.text+0x59130): In function `cfi_intelext_write_words':
: relocation truncated to fit: R_ARM_PC24 .data drivers/built-in.o(.text+0x591bc): In function `cfi_intelext_write_words':
: relocation truncated to fit: R_ARM_PC24 .data drivers/built-in.o(.text+0x59270): In function `cfi_intelext_write_words':
: relocation truncated to fit: R_ARM_PC24 .data drivers/built-in.o(.text+0x593e4): In function `cfi_intelext_write_buffers':
: relocation truncated to fit: R_ARM_PC24 .data drivers/built-in.o(.data+0x8a40): In function `do_xxlock_oneblock':
: relocation truncated to fit: R_ARM_PC24 .text drivers/built-in.o(.data+0x8aa4): In function `do_xxlock_oneblock':
: relocation truncated to fit: R_ARM_PC24 .text drivers/built-in.o(.data+0x8d14): In function `do_xxlock_oneblock':
: relocation truncated to fit: R_ARM_PC24 .text drivers/built-in.o(.data+0x8dbc): In function `do_xxlock_oneblock':
: relocation truncated to fit: R_ARM_PC24 .text drivers/built-in.o(.data+0x8eb4): In function `do_write_oneword':
: relocation truncated to fit: R_ARM_PC24 .text drivers/built-in.o(.data+0x8f38): In function `do_write_oneword':
: relocation truncated to fit: R_ARM_PC24 .text drivers/built-in.o(.data+0x92e4): In function `do_write_oneword':
: additional relocation overflows omitted from the output
make: *** [.tmp_vmlinux1] Error 1
===============================================
Anyone knows why the linker still complains, even with "-mlong-calls" used?
My cross compile toolchain versions:
arm-linux-gcc 3.4.3
binutils 2.16
And some basic info about my memory layout:
flash memory start from 0x00000000, 64MB
SDRAM start from 0xa0000000, 64MB
Thanks a lot for your time.
Chen,Xi
Quoted 4 lines · Chen,Xi
Hello,
I'm working on a PXA-272 based development board and trying to enable a XIP kernel for it.
Please try a later kernel.
Quoted 2 lines
I found an option in kernel configuration, named "
MTD_XIP" and it seemed a solution.
It is mandatory if you want to use MTD with a XIP kernel.
Quoted 3 lines
I also added a "-mlong-calls" option to CFLAGS when XIP enabled, in case some function
calls exceeded the PC24 limitation in ARM.
This is unnecessary. The XIP kernel is already properly located in memory so to not exceed linkage requirements on ARM.
Nicolas