Commit 307b569f authored by Russell King's avatar Russell King

Merge

parents 5be2bc3c 452e9f81
...@@ -34,14 +34,12 @@ apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3 ...@@ -34,14 +34,12 @@ apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3
# Note that GCC is lame - it doesn't numerically define an # Note that GCC is lame - it doesn't numerically define an
# architecture version macro, but instead defines a whole # architecture version macro, but instead defines a whole
# series of macros. # series of macros.
arch-y :=
arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3
arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4
arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5 arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5
arch-$(CONFIG_CPU_XSCALE) :=-D__LINUX_ARM_ARCH__=5 -march=armv4 -Wa,-mxscale #-march=armv5te arch-$(CONFIG_CPU_XSCALE) :=-D__LINUX_ARM_ARCH__=5 -march=armv4 -Wa,-mxscale #-march=armv5te
# This selects how we optimise for the processor. # This selects how we optimise for the processor.
tune-y :=
tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610
tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710
tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi
...@@ -58,123 +56,67 @@ CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa, ...@@ -58,123 +56,67 @@ CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,
CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu
AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float -Wa,-mno-fpu AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float -Wa,-mno-fpu
#Default value
DATAADDR := .
ifeq ($(CONFIG_CPU_26),y) ifeq ($(CONFIG_CPU_26),y)
PROCESSOR := armo PROCESSOR := armo
HEAD := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o HEAD := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o
LDFLAGS_BLOB += --oformat elf26-littlearm LDFLAGS_BLOB += --oformat elf26-littlearm
ifeq ($(CONFIG_ROM_KERNEL),y) ifeq ($(CONFIG_ROM_KERNEL),y)
DATAADDR = 0x02080000 DATAADDR := 0x02080000
TEXTADDR = 0x03800000 textaddr-y := 0x03800000
else else
TEXTADDR = 0x02080000 textaddr-y := 0x02080000
endif endif
endif endif
ifeq ($(CONFIG_CPU_32),y) ifeq ($(CONFIG_CPU_32),y)
PROCESSOR = armv PROCESSOR := armv
HEAD := arch/arm/kernel/head.o arch/arm/kernel/init_task.o HEAD := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
TEXTADDR = 0xC0008000
LDFLAGS_BLOB += --oformat elf32-littlearm LDFLAGS_BLOB += --oformat elf32-littlearm
endif textaddr-y := 0xC0008000
endif
ifeq ($(CONFIG_ARCH_ARCA5K),y)
MACHINE = arc machine-$(CONFIG_ARCH_ARCA5K) := arc
endif machine-$(CONFIG_ARCH_RPC) := rpc
machine-$(CONFIG_ARCH_EBSA110) := ebsa110
ifeq ($(CONFIG_ARCH_RPC),y) machine-$(CONFIG_ARCH_CLPS7500) := clps7500
MACHINE = rpc incdir-$(CONFIG_ARCH_CLPS7500) := cl7500
endif machine-$(CONFIG_FOOTBRIDGE) := footbridge
incdir-$(CONFIG_FOOTBRIDGE) := ebsa285
ifeq ($(CONFIG_ARCH_EBSA110),y) textaddr-$(CONFIG_ARCH_CO285) := 0x60008000
MACHINE = ebsa110 machine-$(CONFIG_ARCH_CO285) := footbridge
endif incdir-$(CONFIG_ARCH_CO285) := ebsa285
machine-$(CONFIG_ARCH_FTVPCI) := ftvpci
ifeq ($(CONFIG_ARCH_CLPS7500),y) incdir-$(CONFIG_ARCH_FTVPCI) := nexuspci
MACHINE = clps7500 machine-$(CONFIG_ARCH_TBOX) := tbox
INCDIR = cl7500 machine-$(CONFIG_ARCH_SHARK) := shark
endif machine-$(CONFIG_ARCH_SA1100) := sa1100
ifeq ($(CONFIG_FOOTBRIDGE),y)
MACHINE = footbridge
INCDIR = ebsa285
endif
ifeq ($(CONFIG_ARCH_CO285),y)
TEXTADDR = 0x60008000
MACHINE = footbridge
INCDIR = ebsa285
endif
ifeq ($(CONFIG_ARCH_FTVPCI),y)
MACHINE = ftvpci
INCDIR = nexuspci
endif
ifeq ($(CONFIG_ARCH_TBOX),y)
MACHINE = tbox
endif
ifeq ($(CONFIG_ARCH_SHARK),y)
MACHINE = shark
endif
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
ifeq ($(CONFIG_SA1111),y)
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
TEXTADDR = 0xc0208000 textaddr-$(CONFIG_SA1111) := 0xc0208000
endif endif
MACHINE = sa1100 machine-$(CONFIG_ARCH_PXA) := pxa
endif machine-$(CONFIG_ARCH_L7200) := l7200
machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
ifeq ($(CONFIG_ARCH_PXA),y) machine-$(CONFIG_ARCH_CAMELOT) := epxa10db
MACHINE = pxa textaddr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000
endif machine-$(CONFIG_ARCH_CLPS711X) := clps711x
textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
ifeq ($(CONFIG_ARCH_L7200),y) machine-$(CONFIG_ARCH_ANAKIN) := anakin
MACHINE = l7200 machine-$(CONFIG_ARCH_IOP310) := iop310
endif machine-$(CONFIG_ARCH_ADIFCC) := adifcc
ifeq ($(CONFIG_ARCH_INTEGRATOR),y) MACHINE := $(machine-y)
MACHINE = integrator TEXTADDR := $(textaddr-y)
endif ifeq ($(incdir-y),)
incdir-y := $(MACHINE)
ifeq ($(CONFIG_ARCH_CAMELOT),y) endif
MACHINE = epxa10db INCDIR := $(incdir-y)
endif
ifeq ($(CONFIG_ARCH_CLPS711X),y)
TEXTADDR = 0xc0028000
MACHINE = clps711x
endif
ifeq ($(CONFIG_ARCH_FORTUNET),y)
TEXTADDR = 0xc0008000
endif
ifeq ($(CONFIG_ARCH_ANAKIN),y)
MACHINE = anakin
endif
ifeq ($(CONFIG_ARCH_IOP310),y)
MACHINE = iop310
endif
ifeq ($(CONFIG_ARCH_ADIFCC),y)
MACHINE = adifcc
endif
export MACHINE PROCESSOR TEXTADDR GZFLAGS CFLAGS_BOOT export MACHINE PROCESSOR TEXTADDR GZFLAGS CFLAGS_BOOT
# Only set INCDIR if its not already defined above
# Grr, ?= doesn't work as all the other assignment operators do. Make bug?
ifeq ($(origin INCDIR), undefined)
INCDIR :=$(MACHINE)
endif
ifeq ($(origin DATAADDR), undefined)
DATAADDR := .
endif
# Do we have FASTFPE? # Do we have FASTFPE?
FASTFPE :=arch/arm/fastfpe FASTFPE :=arch/arm/fastfpe
ifeq ($(FASTFPE),$(wildcard $(FASTFPE))) ifeq ($(FASTFPE),$(wildcard $(FASTFPE)))
...@@ -194,7 +136,10 @@ drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ ...@@ -194,7 +136,10 @@ drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/
libs-y += arch/arm/lib/ libs-y += arch/arm/lib/
makeboot = $(call descend,arch/arm/boot,$(1)) # Default target when executing plain make
all: zImage
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/arm/boot $(1)
# Update machine arch and proc symlinks if something which affects # Update machine arch and proc symlinks if something which affects
# them changed. We use .arch and .proc to indicate when they were # them changed. We use .arch and .proc to indicate when they were
...@@ -217,13 +162,17 @@ prepare: maketools ...@@ -217,13 +162,17 @@ prepare: maketools
.PHONY: maketools FORCE .PHONY: maketools FORCE
maketools: include/asm-arm/.arch include/asm-arm/.proc \ maketools: include/asm-arm/.arch include/asm-arm/.proc \
include/asm-arm/constants.h include/linux/version.h FORCE include/asm-arm/constants.h include/linux/version.h FORCE
+@$(call descend,arch/arm/tools, include/asm-arm/mach-types.h) $(Q)$(MAKE) -f scripts/Makefile.build obj=arch/arm/tools include/asm-arm/mach-types.h
# Convert bzImage to zImage
bzImage: vmlinux
$(call makeboot,arch/arm/boot/zImage)
zImage Image bootpImage: vmlinux zImage Image bootpImage: vmlinux
+@$(call makeboot,arch/arm/boot/$@) $(call makeboot,arch/arm/boot/$@)
bzImage zinstall install: vmlinux zinstall install: vmlinux
+@$(call makeboot,$@) $(call makeboot,$@)
MRPROPER_FILES += \ MRPROPER_FILES += \
include/asm-arm/arch include/asm-arm/.arch \ include/asm-arm/arch include/asm-arm/.arch \
...@@ -233,15 +182,15 @@ MRPROPER_FILES += \ ...@@ -233,15 +182,15 @@ MRPROPER_FILES += \
# We use MRPROPER_FILES and CLEAN_FILES now # We use MRPROPER_FILES and CLEAN_FILES now
archmrproper: archmrproper:
archclean: FORCE archclean:
+@$(call makeboot,clean) $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/arm/boot
# My testing targets (that short circuit a few dependencies) # My testing targets (that short circuit a few dependencies)
zImg:; +@$(call makeboot, zImage) zImg:; $(call makeboot, arch/arm/boot/zImage)
Img:; +@$(call makeboot, Image) Img:; $(call makeboot, arch/arm/boot/Image)
i:; +@$(call makeboot, install) bp:; $(call makeboot, arch/arm/boot/bootpImage)
zi:; +@$(call makeboot, zinstall) i:; $(call makeboot, install)
bp:; +@$(call makeboot, bootpImage) zi:; $(call makeboot, zinstall)
# #
# Configuration targets. Use these to select a # Configuration targets. Use these to select a
...@@ -261,10 +210,9 @@ bp:; +@$(call makeboot, bootpImage) ...@@ -261,10 +210,9 @@ bp:; +@$(call makeboot, bootpImage)
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
@:
include/asm-$(ARCH)/constants.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/constants.h: include/asm-$(ARCH)/constants.h.tmp
@echo -n ' Generating $@' @echo -n ' Generating $@'
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed) @$(update-if-changed)
...@@ -13,132 +13,81 @@ ...@@ -13,132 +13,81 @@
# PARAMS_PHYS must be with 4MB of ZRELADDR # PARAMS_PHYS must be with 4MB of ZRELADDR
# INITRD_PHYS must be in RAM # INITRD_PHYS must be in RAM
ifeq ($(CONFIG_CPU_26),y) zreladdr-$(CONFIG_CPU_26) := 0x02080000
ZRELADDR = 0x02080000 params_phys-$(CONFIG_CPU_26) := 0x0207c000
PARAMS_PHYS = 0x0207c000 initrd_phys-$(CONFIG_CPU_26) := 0x02180000
INITRD_PHYS = 0x02180000 zreladdr-$(CONFIG_ARCH_RPC) := 0x10008000
endif params_phys-$(CONFIG_ARCH_RPC) := 0x10000100
initrd_phys-$(CONFIG_ARCH_RPC) := 0x18000000
ifeq ($(CONFIG_ARCH_RPC),y) zreladdr-$(CONFIG_ARCH_CLPS7500) := 0x10008000
ZRELADDR = 0x10008000 zreladdr-$(CONFIG_ARCH_CLPS7500) := 0x10008000
PARAMS_PHYS = 0x10000100 zreladdr-$(CONFIG_ARCH_EBSA110) := 0x00008000
INITRD_PHYS = 0x18000000 params_phys-$(CONFIG_ARCH_EBSA110) := 0x00000400
endif initrd_phys-$(CONFIG_ARCH_EBSA110) := 0x00800000
ztextaddr-$(CONFIG_ARCH_SHARK) := 0x08508000
ifeq ($(CONFIG_ARCH_CLPS7500),y) zreladdr-$(CONFIG_ARCH_SHARK) := 0x08008000
ZRELADDR = 0x10008000 zreladdr-$(CONFIG_FOOTBRIDGE) := 0x00008000
endif params_phys-$(CONFIG_FOOTBRIDGE) := 0x00000100
initrd_phys-$(CONFIG_FOOTBRIDGE) := 0x00800000
ifeq ($(CONFIG_ARCH_EBSA110),y) zreladdr-$(CONFIG_ARCH_INTEGRATOR) := 0x00008000
ZRELADDR = 0x00008000 params_phys-$(CONFIG_ARCH_INTEGRATOR) := 0x00000100
PARAMS_PHYS = 0x00000400 initrd_phys-$(CONFIG_ARCH_INTEGRATOR) := 0x00800000
INITRD_PHYS = 0x00800000 zreladdr-$(CONFIG_ARCH_CAMELOT) := 0x00008000
endif zreladdr-$(CONFIG_ARCH_NEXUSPCI) := 0x40008000
zreladdr-$(CONFIG_ARCH_L7200) := 0xf0008000
ifeq ($(CONFIG_ARCH_SHARK),y)
ZTEXTADDR = 0x08508000
ZRELADDR = 0x08008000
endif
ifeq ($(CONFIG_FOOTBRIDGE),y)
ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000
endif
ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
ZRELADDR = 0x00008000
PARAMS_PHYS = 0x00000100
INITRD_PHYS = 0x00800000
endif
ifeq ($(CONFIG_ARCH_CAMELOT),y)
ZRELADDR = 0x00008000
endif
ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
ZRELADDR = 0x40008000
endif
ifeq ($(CONFIG_ARCH_L7200),y)
ZRELADDR = 0xf0008000
endif
# The standard locations for stuff on CLPS711x type processors # The standard locations for stuff on CLPS711x type processors
ifeq ($(CONFIG_ARCH_CLPS711X),y) zreladdr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000
ZRELADDR = 0xc0028000 params_phys-$(CONFIG_ARCH_CLPS711X) := 0xc0000100
PARAMS_PHYS = 0xc0000100
endif
# Should probably have some agreement on these... # Should probably have some agreement on these...
ifeq ($(CONFIG_ARCH_P720T),y) initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000
INITRD_PHYS = 0xc0400000 initrd_phys-$(CONFIG_ARCH_CDB89712) := 0x00700000
endif zreladdr-$(CONFIG_ARCH_SA1100) := 0xc0008000
ifeq ($(CONFIG_ARCH_CDB89712),y)
INITRD_PHYS = 0x00700000
endif
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
ZRELADDR = 0xc0008000 zreladdr-$(CONFIG_SA1111) := 0xc0208000
# No defconfig file to move this into...
#ifeq ($(CONFIG_SA1100_YOPY),y)
# ZTEXTADDR = 0x00080000
# ZBSSADDR = 0xc0200000
#endif
ifeq ($(CONFIG_SA1111),y)
ZRELADDR = 0xc0208000
endif
endif
ifeq ($(CONFIG_ARCH_PXA),y)
ZRELADDR = 0xa0008000
endif
ifeq ($(CONFIG_ARCH_ANAKIN),y)
ZRELADDR = 0x20008000
endif
ifeq ($(CONFIG_ARCH_IQ80310),y)
ZRELADDR = 0xa0008000
endif
ifeq ($(CONFIG_ARCH_ADIFCC),y)
ZRELADDR = 0xc0008000
endif endif
zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000
zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000
zreladdr-$(CONFIG_ARCH_IQ80310) := 0xa0008000
zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000
ZRELADDR := $(zreladdr-y)
ZTEXTADDR := $(ztextaddr-y)
PARAMS_PHYS := $(params_phys-y)
INITRD_PHYS := $(initrd_phys-y)
# #
# We now have a PIC decompressor implementation. Decompressors running # We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly # from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config) # from ROM or Flash must define ZTEXTADDR (preferably via the config)
# # FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
ifeq ($(CONFIG_ZBOOT_ROM),y) ifeq ($(CONFIG_ZBOOT_ROM),y)
ZTEXTADDR =$(CONFIG_ZBOOT_ROM_TEXT) ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
ZBSSADDR =$(CONFIG_ZBOOT_ROM_BSS) ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
else else
ZTEXTADDR =0 ZTEXTADDR := 0
ZBSSADDR =ALIGN(4) ZBSSADDR := ALIGN(4)
endif endif
export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS
include $(TOPDIR)/Rules.make EXTRA_TARGETS := Image zImage bootpImage
$(obj)/Image: vmlinux FORCE $(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
bzImage: $(obj)/zImage
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
$(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: vmlinux FORCE $(obj)/compressed/vmlinux: vmlinux FORCE
+@$(call descend,arch/arm/boot/compressed, $(obj)/compressed/vmlinux) $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed $@
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
+@$(call descend,arch/arm/boot/bootp, $(obj)/bootp/bootp) $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed $@
.PHONY: initrd .PHONY: initrd
initrd: initrd:
...@@ -157,19 +106,16 @@ zinstall: $(obj)/zImage ...@@ -157,19 +106,16 @@ zinstall: $(obj)/zImage
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \ $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \
$(obj)/zImage System.map "$(INSTALL_PATH)" $(obj)/zImage System.map "$(INSTALL_PATH)"
clean: clean-files := $(addprefix $(obj)/,Image zImage bootpImage)
$(RM) $(addprefix $(obj)/,Image zImage bootpImage) subdir- := bootp compressed
+@$(call descend,arch/arm/boot/bootp, clean)
+@$(call descend,arch/arm/boot/compressed, clean)
archhelp: archhelp:
@echo '* bzImage/zImage- Compressed kernel image (arch/$(ARCH)/boot/zImage)' @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
@echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' @echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
@echo ' bootpImage - Combined zImage and initial RAM disk' @echo ' bootpImage - Combined zImage and initial RAM disk'
@echo ' initrd - Create an initial image'
@echo ' install - Install uncompressed kernel' @echo ' install - Install uncompressed kernel'
@echo ' zinstall - Install compressed kernel' @echo ' zinstall - Install compressed kernel'
@echo ' Install using (your) ~/bin/installkernel or' @echo ' Install using (your) ~/bin/installkernel or'
@echo ' (distribution) /sbin/installkernel or' @echo ' (distribution) /sbin/installkernel or'
@echo ' install to $$(INSTALL_PATH) and run lilo' @echo ' install to $$(INSTALL_PATH) and run lilo'
...@@ -9,8 +9,6 @@ ZLDFLAGS =-p -X -T $(obj)/bootp.lds \ ...@@ -9,8 +9,6 @@ ZLDFLAGS =-p -X -T $(obj)/bootp.lds \
EXTRA_TARGETS := bootp EXTRA_TARGETS := bootp
include $(TOPDIR)/Rules.make
# Note that bootp.lds picks up kernel.o and initrd.o # Note that bootp.lds picks up kernel.o and initrd.o
$(obj)/bootp: $(addprefix $(obj)/,init.o kernel.o initrd.o bootp.lds) $(obj)/bootp: $(addprefix $(obj)/,init.o kernel.o initrd.o bootp.lds)
$(LD) $(ZLDFLAGS) -o $@ $(obj)/init.o $(LD) $(ZLDFLAGS) -o $@ $(obj)/init.o
...@@ -22,5 +20,3 @@ $(obj)/initrd.o: $(INITRD) ...@@ -22,5 +20,3 @@ $(obj)/initrd.o: $(INITRD)
$(LD) -r -s -o $@ -b binary $(INITRD) $(LD) -r -s -o $@ -b binary $(INITRD)
.PHONY: $(INITRD) $(ZSYSTEM) .PHONY: $(INITRD) $(ZSYSTEM)
clean:; $(RM) $(obj)/bootp
...@@ -63,28 +63,30 @@ ifeq ($(CONFIG_CPU_XSCALE),y) ...@@ -63,28 +63,30 @@ ifeq ($(CONFIG_CPU_XSCALE),y)
OBJS += head-xscale.o OBJS += head-xscale.o
endif endif
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;\ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/
s/BSS_START/$(ZBSSADDR)/;s#OBJ#$(obj)#
EXTRA_TARGETS := vmlinux piggy.o font.o head.o $(OBJS) EXTRA_TARGETS := vmlinux vmlinux.lds piggy piggy.gz\
piggy.o font.o head.o $(OBJS)
EXTRA_CFLAGS := $(CFLAGS_BOOT) -fpic EXTRA_CFLAGS := $(CFLAGS_BOOT) -fpic
EXTRA_AFLAGS := -traditional EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make
LDFLAGS_vmlinux := -p -X \ LDFLAGS_vmlinux := -p -X \
$(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
$(addprefix $(obj)/, $(OBJS)) $(addprefix $(obj)/, $(OBJS)) FORCE
$(call if_changed,ld) $(call if_changed,ld)
@:
$(obj)/piggy: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/piggy: vmlinux; $(call if_changed,objcopy) $(obj)/piggy.gz: $(obj)/piggy FORCE
$(obj)/piggy.gz: $(obj)/piggy; $(call if_changed,gzip) $(call if_changed,gzip)
LDFLAGS_piggy.o := -r -b binary LDFLAGS_piggy.o := -r -b binary
$(obj)/piggy.o: $(obj)/piggy.gz $(obj)/piggy.o: $(obj)/piggy.gz FORCE
$(call if_changed,ld) $(call if_changed,ld)
CFLAGS_font.o := -Dstatic= CFLAGS_font.o := -Dstatic=
...@@ -93,9 +95,7 @@ $(obj)/font.o: $(FONTC) ...@@ -93,9 +95,7 @@ $(obj)/font.o: $(FONTC)
$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm/boot/Makefile .config $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm/boot/Makefile .config
@sed "$(SEDFLAGS)" < $< > $@ @sed "$(SEDFLAGS)" < $< > $@
.PHONY: clean clean-files := $(addprefix $(obj)/,vmlinux piggy* vmlinux.lds)
clean:
rm -f $(addprefix $(obj)/,vmlinux core piggy* vmlinux.lds)
$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
# Copyright (C) 2001 Russell King # Copyright (C) 2001 Russell King
# #
include $(TOPDIR)/Rules.make
include/asm-arm/mach-types.h: $(obj)/mach-types $(obj)/gen-mach-types include/asm-arm/mach-types.h: $(obj)/mach-types $(obj)/gen-mach-types
@echo ' Generating $@' @echo ' Generating $@'
@awk -f $(obj)/gen-mach-types $(obj)/mach-types > $@ @$(AWK) -f $(obj)/gen-mach-types $(obj)/mach-types > $@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment