From: Ian Molton - Updates to makefiles required by the other changes in this patchset. - Also add some entries to the linker scripts. The linker scripts really ought to be merged into one script but that will have to wait. - Add a comment for building xipImages Update the compiler flags used to build arm26 so gcc 3.4 doesnt barf. Signed-off-by: Andrew Morton --- 25-akpm/arch/arm26/Makefile | 14 +++++++------- 25-akpm/arch/arm26/boot/Makefile | 8 +++++--- 25-akpm/arch/arm26/kernel/Makefile | 15 +++++++-------- 25-akpm/arch/arm26/kernel/vmlinux-arm26-xip.lds.in | 5 ++++- 25-akpm/arch/arm26/kernel/vmlinux-arm26.lds.in | 3 ++- 25-akpm/arch/arm26/lib/Makefile | 12 ++++++------ 25-akpm/arch/arm26/machine/Makefile | 6 +----- 25-akpm/arch/arm26/mm/Makefile | 3 ++- 8 files changed, 34 insertions(+), 32 deletions(-) diff -puN arch/arm26/boot/Makefile~arm26-build-system-updates arch/arm26/boot/Makefile --- 25/arch/arm26/boot/Makefile~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/boot/Makefile Thu Dec 23 14:22:03 2004 @@ -1,5 +1,5 @@ # -# arch/arm/boot/Makefile +# arch/arm26/boot/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive @@ -51,8 +51,10 @@ $(obj)/compressed/vmlinux: vmlinux FORCE ifeq ($(CONFIG_XIP_KERNEL),y) $(obj)/xipImage: vmlinux FORCE - $(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin - $(OBJCOPY) -S -O binary -R .init -R .text -R .comment -R __ex_table -R __ksymtab vmlinux vmlinux-data.bin +# $(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin +# FIXME - where has .pci_fixup crept in from? + $(OBJCOPY) -S -O binary -R .data -R .pci_fixup -R .comment vmlinux vmlinux-text.bin + $(OBJCOPY) -S -O binary -R .init -R .text -R __ex_table -R .pci_fixup -R __ksymtab -R __ksymtab_gpl -R __kcrctab -R __kcrctab_gpl -R __param -R .comment vmlinux vmlinux-data.bin cat vmlinux-text.bin vmlinux-data.bin > $@ $(RM) -f vmlinux-text.bin vmlinux-data.bin @echo ' Kernel: $@ is ready' diff -puN arch/arm26/kernel/Makefile~arm26-build-system-updates arch/arm26/kernel/Makefile --- 25/arch/arm26/kernel/Makefile~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/kernel/Makefile Thu Dec 23 14:22:03 2004 @@ -2,17 +2,16 @@ # Makefile for the linux kernel. # -ENTRY_OBJ = entry.o - # Object file lists. -obj-y := compat.o dma.o entry.o irq.o \ - process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \ - time.o traps.o ecard.o time-acorn.o dma.o \ - ecard.o fiq.o time.o +AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) + +obj-y := compat.o dma.o entry.o irq.o process.o ptrace.o \ + semaphore.o setup.o signal.o sys_arm.o time.o traps.o \ + ecard.o dma.o ecard.o fiq.o time.o + +extra-y := head.o init_task.o vmlinux.lds obj-$(CONFIG_FIQ) += fiq.o obj-$(CONFIG_MODULES) += armksyms.o -extra-y := init_task.o vmlinux.lds - diff -puN arch/arm26/kernel/vmlinux-arm26.lds.in~arm26-build-system-updates arch/arm26/kernel/vmlinux-arm26.lds.in --- 25/arch/arm26/kernel/vmlinux-arm26.lds.in~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/kernel/vmlinux-arm26.lds.in Thu Dec 23 14:22:03 2004 @@ -65,6 +65,7 @@ SECTIONS _text = .; /* Text and read-only data */ *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) *(.rodata) @@ -90,7 +91,7 @@ SECTIONS .data : { /* * first, the init task union, aligned - * to an 8192 byte boundary. + * to an 8192 byte boundary. (see arm26/kernel/init_task.c) */ *(.init.task) diff -puN arch/arm26/kernel/vmlinux-arm26-xip.lds.in~arm26-build-system-updates arch/arm26/kernel/vmlinux-arm26-xip.lds.in --- 25/arch/arm26/kernel/vmlinux-arm26-xip.lds.in~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/kernel/vmlinux-arm26-xip.lds.in Thu Dec 23 14:22:03 2004 @@ -64,6 +64,7 @@ SECTIONS _text = .; /* Text and read-only data */ *(.text) SCHED_TEXT + LOCK_TEXT /* FIXME - borrowed from arm32 - check*/ *(.fixup) *(.gnu.warning) *(.rodata) @@ -91,9 +92,11 @@ SECTIONS _sdata = .; .data : { + . = ALIGN(8192); /* * first, the init thread union, aligned - * to an 8192 byte boundary. + * to an 8192 byte boundary. (see arm26/kernel/init_task.c) + * FIXME - sould this be 32K aligned on arm26? */ *(.init.task) diff -puN arch/arm26/lib/Makefile~arm26-build-system-updates arch/arm26/lib/Makefile --- 25/arch/arm26/lib/Makefile~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/lib/Makefile Thu Dec 23 14:22:03 2004 @@ -1,5 +1,5 @@ # -# linux/arch/arm/lib/Makefile +# linux/arch/arm26/lib/Makefile # # Copyright (C) 1995-2000 Russell King # @@ -7,15 +7,15 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ csumpartialcopy.o csumpartialcopyuser.o clearbit.o \ copy_page.o delay.o findbit.o memchr.o memcpy.o \ - memset.o memzero.o setbit.o \ - strchr.o strrchr.o testchangebit.o \ + memset.o memzero.o setbit.o \ + strchr.o strrchr.o testchangebit.o \ testclearbit.o testsetbit.o getuser.o \ putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ ucmpdi2.o udivdi3.o lib1funcs.o ecard.o io-acorn.o \ floppydma.o io-readsb.o io-writesb.o io-writesl.o \ - uaccess-kernel.o uaccess-user.o io-readsw-armv3.o \ - io-writesw-armv3.o io-readsl-armv3.o ecard.o \ - io-acorn.o floppydma.o + uaccess-kernel.o uaccess-user.o io-readsw.o \ + io-writesw.o io-readsl.o ecard.o io-acorn.o \ + floppydma.o lib-n := diff -puN arch/arm26/machine/Makefile~arm26-build-system-updates arch/arm26/machine/Makefile --- 25/arch/arm26/machine/Makefile~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/machine/Makefile Thu Dec 23 14:22:03 2004 @@ -4,9 +4,5 @@ # Object file lists. -obj-y := dma.o irq.o oldlatches.o \ - small_page.o +obj-y := dma.o irq.o latches.o -extra-y := head.o - -AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) diff -puN arch/arm26/Makefile~arm26-build-system-updates arch/arm26/Makefile --- 25/arch/arm26/Makefile~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/Makefile Thu Dec 23 14:22:03 2004 @@ -6,6 +6,7 @@ # for more details. # # Copyright (C) 1995-2001 by Russell King +# Copyright (c) 2004 Ian Molton LDFLAGS_vmlinux :=-p -X CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) @@ -20,13 +21,9 @@ ifeq ($(CONFIG_DEBUG_INFO),y) CFLAGS +=-g endif -# Force -mno-fpu to be passed to the assembler. Some versions of gcc don't -# do this with -msoft-float -CFLAGS_BOOT :=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -CFLAGS +=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -AFLAGS +=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu - -head-y := arch/arm26/machine/head.o arch/arm26/kernel/init_task.o +CFLAGS_BOOT :=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm +CFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm +AFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float ifeq ($(CONFIG_XIP_KERNEL),y) TEXTADDR := 0x03880000 @@ -36,6 +33,8 @@ else DATAADDR := . endif +head-y := arch/arm26/kernel/head.o arch/arm26/kernel/init_task.o + ifeq ($(incdir-y),) incdir-y := endif @@ -109,6 +108,7 @@ define archhelp echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' echo ' bootpImage - Combined zImage and initial RAM disk' + echo ' xipImage - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)' echo ' initrd - Create an initial image' echo ' install - Install uncompressed kernel' echo ' zinstall - Install compressed kernel' diff -puN arch/arm26/mm/Makefile~arm26-build-system-updates arch/arm26/mm/Makefile --- 25/arch/arm26/mm/Makefile~arm26-build-system-updates Thu Dec 23 14:22:03 2004 +++ 25-akpm/arch/arm26/mm/Makefile Thu Dec 23 14:22:03 2004 @@ -2,4 +2,5 @@ # Makefile for the linux arm26-specific parts of the memory manager. # -obj-y := init.o extable.o proc-funcs.o mm-memc.o fault.o +obj-y := init.o extable.o proc-funcs.o memc.o fault.o \ + small_page.o _