diff options
Diffstat (limited to 'arch/powerpc/boot/Makefile')
-rw-r--r-- | arch/powerpc/boot/Makefile | 126 |
1 files changed, 77 insertions, 49 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 122a27078998..49797a45416c 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -60,8 +60,9 @@ src-wlib := string.S crt0.S stdio.c main.c \ | |||
60 | src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ | 60 | src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ |
61 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ | 61 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ |
62 | ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ | 62 | ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ |
63 | cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c \ | 63 | cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ |
64 | fixed-head.S ep88xc.c cuboot-hpc2.c ep405.c cuboot-taishan.c \ | 64 | cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ |
65 | fixed-head.S ep88xc.c ep405.c \ | ||
65 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ | 66 | cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ |
66 | cuboot-warp.c cuboot-85xx-cpm2.c | 67 | cuboot-warp.c cuboot-85xx-cpm2.c |
67 | src-boot := $(src-wlib) $(src-plat) empty.c | 68 | src-boot := $(src-wlib) $(src-plat) empty.c |
@@ -123,6 +124,8 @@ targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) | |||
123 | extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ | 124 | extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ |
124 | $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds | 125 | $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds |
125 | 126 | ||
127 | dtstree := $(srctree)/$(src)/dts | ||
128 | |||
126 | wrapper :=$(srctree)/$(src)/wrapper | 129 | wrapper :=$(srctree)/$(src)/wrapper |
127 | wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \ | 130 | wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \ |
128 | $(wrapper) FORCE | 131 | $(wrapper) FORCE |
@@ -181,7 +184,7 @@ quiet_cmd_wrap = WRAP $@ | |||
181 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries | 184 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries |
182 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries | 185 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries |
183 | image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries | 186 | image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries |
184 | image-$(CONFIG_PPC_PS3) += zImage.ps3 | 187 | image-$(CONFIG_PPC_PS3) += zImage-dtb.ps3 |
185 | image-$(CONFIG_PPC_CELLEB) += zImage.pseries | 188 | image-$(CONFIG_PPC_CELLEB) += zImage.pseries |
186 | image-$(CONFIG_PPC_CHRP) += zImage.chrp | 189 | image-$(CONFIG_PPC_CHRP) += zImage.chrp |
187 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp | 190 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp |
@@ -191,33 +194,69 @@ image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800 | |||
191 | image-$(CONFIG_PPC_ISERIES) += zImage.iseries | 194 | image-$(CONFIG_PPC_ISERIES) += zImage.iseries |
192 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage | 195 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage |
193 | 196 | ||
194 | ifneq ($(CONFIG_DEVICE_TREE),"") | 197 | # |
195 | image-$(CONFIG_PPC_8xx) += cuImage.8xx | 198 | # Targets which embed a device tree blob |
196 | image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc | 199 | # |
197 | image-$(CONFIG_EP405) += zImage.ep405 | 200 | # Theses are default targets to build images which embed device tree blobs. |
198 | image-$(CONFIG_8260) += cuImage.pq2 | 201 | # They are only required on boards which do not have FDT support in firmware. |
199 | image-$(CONFIG_EP8248E) += zImage.ep8248e | 202 | # Boards with newish u-boot firmare can use the uImage target above |
200 | image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx | 203 | # |
201 | image-$(CONFIG_STORCENTER) += cuImage.824x | 204 | |
202 | image-$(CONFIG_PPC_83xx) += cuImage.83xx | 205 | # Board ports in arch/powerpc/platform/40x/Kconfig |
203 | image-$(CONFIG_PPC_85xx) += cuImage.85xx | 206 | image-$(CONFIG_EP405) += zImage-dtb.ep405 |
204 | ifeq ($(CONFIG_CPM2),y) | 207 | image-$(CONFIG_WALNUT) += treeImage.walnut |
205 | image-$(CONFIG_PPC_85xx) += cuImage.85xx-cpm2 | 208 | |
206 | endif | 209 | # Board ports in arch/powerpc/platform/44x/Kconfig |
207 | image-$(CONFIG_MPC7448HPC2) += cuImage.hpc2 | ||
208 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony | 210 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony |
209 | image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo | 211 | image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo |
210 | image-$(CONFIG_SEQUOIA) += cuImage.sequoia | 212 | image-$(CONFIG_SEQUOIA) += cuImage.sequoia |
211 | image-$(CONFIG_RAINIER) += cuImage.rainier | 213 | image-$(CONFIG_RAINIER) += cuImage.rainier |
212 | image-$(CONFIG_WALNUT) += treeImage.walnut | ||
213 | image-$(CONFIG_TAISHAN) += cuImage.taishan | 214 | image-$(CONFIG_TAISHAN) += cuImage.taishan |
214 | image-$(CONFIG_KATMAI) += cuImage.katmai | 215 | image-$(CONFIG_KATMAI) += cuImage.katmai |
215 | image-$(CONFIG_WARP) += cuImage.warp | 216 | image-$(CONFIG_WARP) += cuImage.warp |
216 | endif | ||
217 | 217 | ||
218 | ifneq ($(CONFIG_REDBOOT),"") | 218 | # Board ports in arch/powerpc/platform/8xx/Kconfig |
219 | image-$(CONFIG_PPC_8xx) += zImage.redboot-8xx | 219 | image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads |
220 | endif | 220 | image-$(CONFIG_PPC_MPC885ADS) += cuImage.mpc885ads |
221 | image-$(CONFIG_PPC_EP88XC) += zImage-dtb.ep88xc | ||
222 | image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \ | ||
223 | zImage-dtb.adder875-redboot | ||
224 | |||
225 | # Board ports in arch/powerpc/platform/52xx/Kconfig | ||
226 | image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 cuImage.lite5200b | ||
227 | |||
228 | # Board ports in arch/powerpc/platform/82xx/Kconfig | ||
229 | image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads | ||
230 | image-$(CONFIG_PQ2FADS) += cuImage.pq2fads | ||
231 | image-$(CONFIG_EP8248E) += zImage-dtb.ep8248e | ||
232 | |||
233 | # Board ports in arch/powerpc/platform/83xx/Kconfig | ||
234 | image-$(CONFIG_MPC832x_MDS) += cuImage.mpc832x_mds | ||
235 | image-$(CONFIG_MPC832x_RDB) += cuImage.mpc832x_rdb | ||
236 | image-$(CONFIG_MPC834x_ITX) += cuImage.mpc8349emitx \ | ||
237 | cuImage.mpc8349emitxgp | ||
238 | image-$(CONFIG_MPC834x_MDS) += cuImage.mpc834x_mds | ||
239 | image-$(CONFIG_MPC836x_MDS) += cuImage.mpc836x_mds | ||
240 | |||
241 | # Board ports in arch/powerpc/platform/85xx/Kconfig | ||
242 | image-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads | ||
243 | image-$(CONFIG_MPC8560_ADS) += cuImage.mpc8560ads | ||
244 | image-$(CONFIG_MPC85xx_CDS) += cuImage.mpc8541cds \ | ||
245 | cuImage.mpc8548cds \ | ||
246 | cuImage.mpc8555cds | ||
247 | image-$(CONFIG_MPC85xx_MDS) += cuImage.mpc8568mds | ||
248 | image-$(CONFIG_MPC85xx_DS) += cuImage.mpc8544ds \ | ||
249 | cuImage.mpc8572ds | ||
250 | image-$(CONFIG_TQM8540) += cuImage.tqm8540 | ||
251 | image-$(CONFIG_TQM8541) += cuImage.tqm8541 | ||
252 | image-$(CONFIG_TQM8555) += cuImage.tqm8555 | ||
253 | image-$(CONFIG_TQM8560) += cuImage.tqm8560 | ||
254 | image-$(CONFIG_SBC8548) += cuImage.tqm8548 | ||
255 | image-$(CONFIG_SBC8560) += cuImage.tqm8560 | ||
256 | |||
257 | # Board ports in arch/powerpc/platform/embedded6xx/Kconfig | ||
258 | image-$(CONFIG_STORCENTER) += cuImage.storcenter | ||
259 | image-$(CONFIG_MPC7448HPC2) += cuImage.mpc7448hpc2 | ||
221 | 260 | ||
222 | # For 32-bit powermacs, build the COFF and miboot images | 261 | # For 32-bit powermacs, build the COFF and miboot images |
223 | # as well as the ELF images. | 262 | # as well as the ELF images. |
@@ -233,24 +272,20 @@ targets += $(image-y) $(initrd-y) | |||
233 | 272 | ||
234 | $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz | 273 | $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz |
235 | 274 | ||
236 | # If CONFIG_WANT_DEVICE_TREE is set and CONFIG_DEVICE_TREE isn't an | ||
237 | # empty string, define 'dts' to be path to the dts | ||
238 | # CONFIG_DEVICE_TREE will have "" around it, make sure to strip them | ||
239 | ifeq ($(CONFIG_WANT_DEVICE_TREE),y) | ||
240 | ifneq ($(CONFIG_DEVICE_TREE),"") | ||
241 | dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\ | ||
242 | ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%) | ||
243 | endif | ||
244 | endif | ||
245 | |||
246 | # Don't put the ramdisk on the pattern rule; when its missing make will try | 275 | # Don't put the ramdisk on the pattern rule; when its missing make will try |
247 | # the pattern rule with less dependencies that also matches (even with the | 276 | # the pattern rule with less dependencies that also matches (even with the |
248 | # hard dependency listed). | 277 | # hard dependency listed). |
249 | $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) $(dts) | 278 | $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) |
250 | $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz) | 279 | $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) |
251 | 280 | ||
252 | $(obj)/zImage.%: vmlinux $(wrapperbits) $(dts) | 281 | $(obj)/zImage.%: vmlinux $(wrapperbits) |
253 | $(call if_changed,wrap,$*,$(dts)) | 282 | $(call if_changed,wrap,$*) |
283 | |||
284 | $(obj)/zImage-dtb.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | ||
285 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) | ||
286 | |||
287 | $(obj)/zImage-dtb.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | ||
288 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts) | ||
254 | 289 | ||
255 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) | 290 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) |
256 | # prefix | 291 | # prefix |
@@ -260,24 +295,17 @@ $(obj)/vmlinux.strip: vmlinux | |||
260 | $(obj)/zImage.iseries: vmlinux | 295 | $(obj)/zImage.iseries: vmlinux |
261 | $(STRIP) -s -R .comment $< -o $@ | 296 | $(STRIP) -s -R .comment $< -o $@ |
262 | 297 | ||
263 | $(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts | ||
264 | $(STRIP) -s -R .comment $< -o vmlinux.strip | ||
265 | $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) | ||
266 | |||
267 | $(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz | ||
268 | $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz) | ||
269 | |||
270 | $(obj)/uImage: vmlinux $(wrapperbits) | 298 | $(obj)/uImage: vmlinux $(wrapperbits) |
271 | $(call if_changed,wrap,uboot) | 299 | $(call if_changed,wrap,uboot) |
272 | 300 | ||
273 | $(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits) | 301 | $(obj)/cuImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) |
274 | $(call if_changed,wrap,cuboot-$*,$(dts)) | 302 | $(call if_changed,wrap,cuboot-$*,$(dtstree)/$*.dts) |
275 | 303 | ||
276 | $(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits) | 304 | $(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts $(wrapperbits) |
277 | $(call if_changed,wrap,treeboot-$*,$(dts),,$(obj)/ramdisk.image.gz) | 305 | $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) |
278 | 306 | ||
279 | $(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits) | 307 | $(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits) |
280 | $(call if_changed,wrap,treeboot-$*,$(dts)) | 308 | $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts) |
281 | 309 | ||
282 | # If there isn't a platform selected then just strip the vmlinux. | 310 | # If there isn't a platform selected then just strip the vmlinux. |
283 | ifeq (,$(image-y)) | 311 | ifeq (,$(image-y)) |