aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2005-08-10 20:57:42 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-09 08:11:35 -0400
commite4df7671716f1fffb3437a7c1a14e3d2465fefef (patch)
tree9864f1e007165b4612e617890738e9ad3c2912e3 /arch
parenta24c8481b6439cb151a4750cc278ea2df4fb0e53 (diff)
[PATCH] ppc64: makefile cleanup
This patch cleans up the output generated by ppc64 builds. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/boot/Makefile28
1 files changed, 15 insertions, 13 deletions
diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile
index d3567e47cbba..33fdc8710891 100644
--- a/arch/ppc64/boot/Makefile
+++ b/arch/ppc64/boot/Makefile
@@ -66,7 +66,7 @@ extra-y := initrd.o
66quiet_cmd_ramdisk = RAMDISK $@ 66quiet_cmd_ramdisk = RAMDISK $@
67 cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@ 67 cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@
68 68
69quiet_cmd_stripvm = STRIP $@ 69quiet_cmd_stripvm = STRIP $@
70 cmd_stripvm = $(STRIP) -s $< -o $@ 70 cmd_stripvm = $(STRIP) -s $< -o $@
71 71
72vmlinux.strip: vmlinux FORCE 72vmlinux.strip: vmlinux FORCE
@@ -74,9 +74,17 @@ vmlinux.strip: vmlinux FORCE
74$(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE 74$(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE
75 $(call if_changed,ramdisk) 75 $(call if_changed,ramdisk)
76 76
77addsection = $(CROSS32OBJCOPY) $(1) \ 77quiet_cmd_addsection = ADDSEC $@
78 --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ 78 cmd_addsection = $(CROSS32OBJCOPY) $@ \
79 --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) 79 --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(patsubst %.o,%.gz, $@) \
80 --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(OBJCOPYFLAGS)
81
82quiet_cmd_imagesize = GENSIZE $@
83 cmd_imagesize = ls -l vmlinux.strip | \
84 awk '{printf "/* generated -- do not edit! */\n" "unsigned long vmlinux_filesize = %d;\n", $$5}' \
85 > $(obj)/imagesize.c && \
86 $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \
87 awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' >> $(obj)/imagesize.c
80 88
81quiet_cmd_addnote = ADDNOTE $@ 89quiet_cmd_addnote = ADDNOTE $@
82 cmd_addnote = $(obj)/addnote $@ 90 cmd_addnote = $(obj)/addnote $@
@@ -88,11 +96,11 @@ $(obj)/kernel-initrd.gz: $(obj)/ramdisk.image.gz
88 cp -f $(obj)/ramdisk.image.gz $@ 96 cp -f $(obj)/ramdisk.image.gz $@
89 97
90$(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz FORCE 98$(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz FORCE
91 touch $@ 99 @touch $@
92 100
93$(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c FORCE 101$(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c FORCE
94 $(call if_changed_dep,bootcc) 102 $(call if_changed_dep,bootcc)
95 $(call addsection, $@) 103 $(call cmd,addsection)
96 104
97$(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required)) 105$(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required))
98$(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) FORCE 106$(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) FORCE
@@ -111,13 +119,7 @@ $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote FORCE
111 $(call if_changed,addnote) 119 $(call if_changed,addnote)
112 120
113$(obj)/imagesize.c: vmlinux.strip 121$(obj)/imagesize.c: vmlinux.strip
114 @echo Generating $@ 122 $(call cmd,imagesize)
115 ls -l vmlinux.strip | \
116 awk '{printf "/* generated -- do not edit! */\n" \
117 "unsigned long vmlinux_filesize = %d;\n", $$5}' > $(obj)/imagesize.c
118 $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \
119 awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \
120 >> $(obj)/imagesize.c
121 123
122install: $(CONFIGURE) $(BOOTIMAGE) 124install: $(CONFIGURE) $(BOOTIMAGE)
123 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" 125 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)"