[uClinux-dev] LPC22xx build error on uClinux-dist-test-20061215, part 2

Brandon Fosdick brandon at teslamotors.com
Wed Jan 3 16:22:36 EST 2007


Here's what I had to do to get a default build for LPC22xx to actually 
build. I have no idea if this will actually run. I can make a patch if 
anyone cares.


First I modified vendors/Philips/LPC22xx/config.linux-2.6.x to define 
both CONFIG_CPU_ARM7TDMI and CONFIG_CPU_LPC22xx then re-ran menuconfig 
to force everything to defaults. I verified both symbols are defined in 
linux-2.6.x/.config, then ran make again..

---
<snip>
   CC      arch/arm/kernel/compat.o
   AS      arch/arm/kernel/entry-armv.o
arch/arm/kernel/entry-armv.S:344:2: warning: #warning "NPTL on non MMU 
needs fixing"
arch/arm/kernel/entry-armv.S:798:2: warning: #warning "NPTL on non MMU 
needs fixing"
arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:204: Error: undefined symbol NR_IRQS used 
as an immediate value
arch/arm/kernel/entry-armv.S:409: Error: undefined symbol NR_IRQS used 
as an immediate value
make[2]: *** [arch/arm/kernel/entry-armv.o] Error 1
make[1]: *** [arch/arm/kernel] Error 2
make[1]: Leaving directory 
`/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x'
make: *** [linux] Error 1
---

Adding
#include "irqs.h"
to linux-2.6.x/include/asm-arm/arch-lpc22xx/entry-macro.S solved that 
problem. make clean && make...

---
   CC      arch/arm/mach-lpc22xx/arch.o
arch/arm/mach-lpc22xx/arch.c:43: error: `MACH_TYPE_LPC22xx' undeclared 
here (not in a function)
arch/arm/mach-lpc22xx/arch.c:43: error: initializer element is not constant
arch/arm/mach-lpc22xx/arch.c:43: error: (near initialization for 
`__mach_desc_LPC22xx.nr')
arch/arm/mach-lpc22xx/arch.c:44: warning: implicit declaration of 
function `MAINTAINER'
arch/arm/mach-lpc22xx/arch.c:45: error: initializer element is not constant
arch/arm/mach-lpc22xx/arch.c:45: error: (near initialization for 
`__mach_desc_LPC22xx.boot_params')
arch/arm/mach-lpc22xx/arch.c:45: error: parse error before "INITIRQ"
make[2]: *** [arch/arm/mach-lpc22xx/arch.o] Error 1
make[1]: *** [arch/arm/mach-lpc22xx] Error 2
make[1]: Leaving directory 
`/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x'
make: *** [linux] Error 1
---

In arch/arm/mach-lpc22xx/arch.c MACHINE_START is passed LPC22xx as the 
first argument which results in the symbol MACH_TYPE_LPC22xx. However, 
mach-types.h defines MACH_TYPE_LPC22XX. Fixed that, then make clean && 
make...

---
arch/arm/mach-lpc22xx/arch.c:44: warning: implicit declaration of 
function `MAINTAINER'
arch/arm/mach-lpc22xx/arch.c:45: error: initializer element is not constant
arch/arm/mach-lpc22xx/arch.c:45: error: (near initialization for 
`__mach_desc_LPC22XX.boot_params')
arch/arm/mach-lpc22xx/arch.c:45: error: parse error before "INITIRQ"
---

The MAINTAINER macros seems to have disapeared between 2.4.x and 2.6.x, 
so comment that line. The INITIRQ macro doesn't exist in 2.6.x either, 
but struct machine_desc still has init_irq, so stop using the macro. 
make clean && make...

---
   MODPOST vmlinux
/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x/arch/arm/boot/Makefile:17: 
/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x/arch/arm/mach-lpc22xx//Makefile.boot: 
No such file or directory
make[2]: *** No rule to make target 
`/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x/arch/arm/mach-lpc22xx//Makefile.boot'. 
  Stop.
make[1]: *** [zImage] Error 2
make[1]: Leaving directory 
`/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x'
make: *** [linux] Error 1
---

Copy Makefile.boot from arch/arm/mach-versatile to 
arch/arm/mach-lpc22xx. make clean && make...

---
   AS      arch/arm/boot/compressed/piggy.o
make[3]: *** No rule to make target `include/asm/arch/uncompress.h', 
needed by `arch/arm/boot/compressed/misc.o'.  Stop.
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[1]: *** [zImage] Error 2
make[1]: Leaving directory 
`/home/bfoz/Downloads/uClinux-dist-test/linux-2.6.x'
make: *** [linux] Error 1
---

Add uncompress.h with stub functions to include/asm-arm/lpc22xx. make 
clean && make...

...it worked! Well, it built. Now for the hard part...

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the uClinux-dev mailing list