[uClinux-dev] LPC22xx build error on uClinux-dist-test-20061215,
part 2
Greg Ungerer
gerg at snapgear.com
Thu Jan 4 10:10:37 EST 2007
Hi Brandon,
Brandon Fosdick wrote:
> 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.
Please do generate patches when you have it working.
I can add this to the next dist, and 2.6.x-uc0 big
patches.
Regards
Greg
> 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
> ______________________________________________________________________
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
--
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: gerg at snapgear.com
SnapGear -- a Secure Computing Company PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
More information about the uClinux-dev
mailing list