diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2005-08-15 16:59:13 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-09 08:11:35 -0400 |
commit | a24c8481b6439cb151a4750cc278ea2df4fb0e53 (patch) | |
tree | ad2cc8bfab1daac777f8c309ea64aad016d01db4 /arch/ppc64 | |
parent | dd56fdf23dfa0127d512b73d4238dbd2b5a7c1eb (diff) |
[PATCH] ppc64: zimage build fix
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/Makefile | 21 | ||||
-rw-r--r-- | arch/ppc64/boot/Makefile | 25 |
2 files changed, 30 insertions, 16 deletions
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index 8189953a372c..a91daa324e88 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile | |||
@@ -89,11 +89,12 @@ drivers-$(CONFIG_OPROFILE) += arch/ppc64/oprofile/ | |||
89 | 89 | ||
90 | boot := arch/ppc64/boot | 90 | boot := arch/ppc64/boot |
91 | 91 | ||
92 | boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd | 92 | boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd |
93 | boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd | 93 | boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode |
94 | boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm | 94 | boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd |
95 | boottarget-$(CONFIG_PPC_BPA) := zImage zImage.initrd | 95 | boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm |
96 | $(boottarget-y): vmlinux | 96 | boottargets-$(CONFIG_PPC_BPA) += zImage zImage.initrd |
97 | $(boottargets-y): vmlinux | ||
97 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 98 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
98 | 99 | ||
99 | bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage | 100 | bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage |
@@ -131,10 +132,12 @@ include3/asm: | |||
131 | $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm | 132 | $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm |
132 | 133 | ||
133 | define archhelp | 134 | define archhelp |
134 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' | 135 | echo ' zImage.vmode - Compressed kernel image (arch/$(ARCH)/boot/zImage.vmode)' |
135 | echo ' zImage.initrd- Compressed kernel image with initrd attached,' | 136 | echo ' zImage.initrd.vmode - Compressed kernel image with initrd attached,' |
136 | echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz' | 137 | echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz' |
137 | echo ' (arch/$(ARCH)/boot/zImage.initrd)' | 138 | echo ' (arch/$(ARCH)/boot/zImage.initrd.vmode)' |
139 | echo ' zImage - zImage for pSeries machines' | ||
140 | echo ' zImage.initrd - zImage with initrd for pSeries machines' | ||
138 | endef | 141 | endef |
139 | 142 | ||
140 | CLEAN_FILES += include/asm-ppc64/offsets.h | 143 | CLEAN_FILES += include/asm-ppc64/offsets.h |
diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile index 2c5f5e73d00c..d3567e47cbba 100644 --- a/arch/ppc64/boot/Makefile +++ b/arch/ppc64/boot/Makefile | |||
@@ -37,6 +37,9 @@ quiet_cmd_bootcc = BOOTCC $@ | |||
37 | quiet_cmd_bootas = BOOTAS $@ | 37 | quiet_cmd_bootas = BOOTAS $@ |
38 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< | 38 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< |
39 | 39 | ||
40 | quiet_cmd_bootld = BOOTLD $@ | ||
41 | cmd_bootld = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(2) | ||
42 | |||
40 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c | 43 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c |
41 | $(call if_changed_dep,bootcc) | 44 | $(call if_changed_dep,bootcc) |
42 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S | 45 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S |
@@ -53,7 +56,7 @@ src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section))) | |||
53 | gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) | 56 | gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) |
54 | 57 | ||
55 | hostprogs-y := addnote addRamDisk | 58 | hostprogs-y := addnote addRamDisk |
56 | targets += zImage zImage.initrd imagesize.c \ | 59 | targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd imagesize.c \ |
57 | $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ | 60 | $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ |
58 | $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ | 61 | $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ |
59 | $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ | 62 | $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ |
@@ -75,8 +78,8 @@ addsection = $(CROSS32OBJCOPY) $(1) \ | |||
75 | --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ | 78 | --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ |
76 | --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) | 79 | --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) |
77 | 80 | ||
78 | quiet_cmd_addnote = ADDNOTE $@ | 81 | quiet_cmd_addnote = ADDNOTE $@ |
79 | cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ | 82 | cmd_addnote = $(obj)/addnote $@ |
80 | 83 | ||
81 | $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE | 84 | $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE |
82 | $(call if_changed,gzip) | 85 | $(call if_changed,gzip) |
@@ -91,12 +94,20 @@ $(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c FOR | |||
91 | $(call if_changed_dep,bootcc) | 94 | $(call if_changed_dep,bootcc) |
92 | $(call addsection, $@) | 95 | $(call addsection, $@) |
93 | 96 | ||
94 | $(obj)/zImage: obj-boot += $(call obj-sec, $(required)) | 97 | $(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required)) |
95 | $(obj)/zImage: $(call obj-sec, $(required)) $(obj-boot) $(obj)/addnote FORCE | 98 | $(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) FORCE |
99 | $(call cmd,bootld,$(obj-boot)) | ||
100 | |||
101 | $(obj)/zImage.initrd.vmode: obj-boot += $(call obj-sec, $(required) $(initrd)) | ||
102 | $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) FORCE | ||
103 | $(call cmd,bootld,$(obj-boot)) | ||
104 | |||
105 | $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote FORCE | ||
106 | @cp -f $< $@ | ||
96 | $(call if_changed,addnote) | 107 | $(call if_changed,addnote) |
97 | 108 | ||
98 | $(obj)/zImage.initrd: obj-boot += $(call obj-sec, $(required) $(initrd)) | 109 | $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote FORCE |
99 | $(obj)/zImage.initrd: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(obj)/addnote FORCE | 110 | @cp -f $< $@ |
100 | $(call if_changed,addnote) | 111 | $(call if_changed,addnote) |
101 | 112 | ||
102 | $(obj)/imagesize.c: vmlinux.strip | 113 | $(obj)/imagesize.c: vmlinux.strip |