aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/boot
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2005-08-15 16:59:13 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-09 08:11:35 -0400
commita24c8481b6439cb151a4750cc278ea2df4fb0e53 (patch)
treead2cc8bfab1daac777f8c309ea64aad016d01db4 /arch/ppc64/boot
parentdd56fdf23dfa0127d512b73d4238dbd2b5a7c1eb (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/boot')
-rw-r--r--arch/ppc64/boot/Makefile25
1 files changed, 18 insertions, 7 deletions
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 $@
37quiet_cmd_bootas = BOOTAS $@ 37quiet_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
40quiet_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)))
53gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) 56gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section)))
54 57
55hostprogs-y := addnote addRamDisk 58hostprogs-y := addnote addRamDisk
56targets += zImage zImage.initrd imagesize.c \ 59targets += 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
78quiet_cmd_addnote = ADDNOTE $@ 81quiet_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