diff options
-rw-r--r-- | arch/powerpc/boot/Makefile | 67 |
1 files changed, 24 insertions, 43 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 1dc7f2bb2b96..de80e47d1171 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -116,50 +116,10 @@ CROSSWRAP := -C "$(CROSS_COMPILE)" | |||
116 | endif | 116 | endif |
117 | endif | 117 | endif |
118 | 118 | ||
119 | # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd | ||
119 | quiet_cmd_wrap = WRAP $@ | 120 | quiet_cmd_wrap = WRAP $@ |
120 | cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) vmlinux | 121 | cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \ |
121 | quiet_cmd_wrap_initrd = WRAP $@ | 122 | $(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) vmlinux |
122 | cmd_wrap_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \ | ||
123 | -i $(obj)/ramdisk.image.gz vmlinux | ||
124 | |||
125 | $(obj)/zImage.chrp: vmlinux $(wrapperbits) | ||
126 | $(call if_changed,wrap,chrp) | ||
127 | |||
128 | $(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits) | ||
129 | $(call if_changed,wrap_initrd,chrp) | ||
130 | |||
131 | $(obj)/zImage.pseries: vmlinux $(wrapperbits) | ||
132 | $(call if_changed,wrap,pseries) | ||
133 | |||
134 | $(obj)/zImage.initrd.pseries: vmlinux $(wrapperbits) | ||
135 | $(call if_changed,wrap_initrd,pseries) | ||
136 | |||
137 | $(obj)/zImage.pmac: vmlinux $(wrapperbits) | ||
138 | $(call if_changed,wrap,pmac) | ||
139 | |||
140 | $(obj)/zImage.initrd.pmac: vmlinux $(wrapperbits) | ||
141 | $(call if_changed,wrap_initrd,pmac) | ||
142 | |||
143 | $(obj)/zImage.coff: vmlinux $(wrapperbits) | ||
144 | $(call if_changed,wrap,pmaccoff) | ||
145 | |||
146 | $(obj)/zImage.initrd.coff: vmlinux $(wrapperbits) | ||
147 | $(call if_changed,wrap_initrd,pmaccoff) | ||
148 | |||
149 | $(obj)/zImage.miboot: vmlinux $(wrapperbits) | ||
150 | $(call if_changed,wrap,miboot) | ||
151 | |||
152 | $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits) | ||
153 | $(call if_changed,wrap_initrd,miboot) | ||
154 | |||
155 | $(obj)/zImage.ps3: vmlinux | ||
156 | $(STRIP) -s -R .comment $< -o $@ | ||
157 | |||
158 | $(obj)/zImage.initrd.ps3: vmlinux | ||
159 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" | ||
160 | |||
161 | $(obj)/uImage: vmlinux $(wrapperbits) | ||
162 | $(call if_changed,wrap,uboot) | ||
163 | 123 | ||
164 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries | 124 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries |
165 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries | 125 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries |
@@ -179,8 +139,29 @@ endif | |||
179 | 139 | ||
180 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) | 140 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) |
181 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) | 141 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) |
142 | initrd-y := $(filter-out $(image-y), $(initrd-y)) | ||
182 | targets += $(image-y) $(initrd-y) | 143 | targets += $(image-y) $(initrd-y) |
183 | 144 | ||
145 | $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz | ||
146 | |||
147 | # Don't put the ramdisk on the pattern rule; when its missing make will try | ||
148 | # the pattern rule with less dependencies that also matches (even with the | ||
149 | # hard dependency listed). | ||
150 | $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) | ||
151 | $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) | ||
152 | |||
153 | $(obj)/zImage.%: vmlinux $(wrapperbits) | ||
154 | $(call if_changed,wrap,$*) | ||
155 | |||
156 | $(obj)/zImage.ps3: vmlinux | ||
157 | $(STRIP) -s -R .comment $< -o $@ | ||
158 | |||
159 | $(obj)/zImage.initrd.ps3: vmlinux | ||
160 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" | ||
161 | |||
162 | $(obj)/uImage: vmlinux $(wrapperbits) | ||
163 | $(call if_changed,wrap,uboot) | ||
164 | |||
184 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) | 165 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) |
185 | @rm -f $@; ln $< $@ | 166 | @rm -f $@; ln $< $@ |
186 | $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) | 167 | $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) |