diff options
Diffstat (limited to 'arch/powerpc/boot/Makefile')
-rw-r--r-- | arch/powerpc/boot/Makefile | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 3716594ea33e..5c384aad1184 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -37,13 +37,15 @@ zlib := inffast.c inflate.c inftrees.c | |||
37 | zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h | 37 | zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h |
38 | zliblinuxheader := zlib.h zconf.h zutil.h | 38 | zliblinuxheader := zlib.h zconf.h zutil.h |
39 | 39 | ||
40 | $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ | 40 | $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ |
41 | $(addprefix $(obj)/,$(zlibheader)) | 41 | $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) |
42 | 42 | ||
43 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ | 43 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ |
44 | ns16550.c serial.c simple_alloc.c div64.S util.S \ | 44 | ns16550.c serial.c simple_alloc.c div64.S util.S \ |
45 | gunzip_util.c elf_util.c $(zlib) devtree.c | 45 | gunzip_util.c elf_util.c $(zlib) devtree.c \ |
46 | src-plat := of.c cuboot-83xx.c cuboot-85xx.c | 46 | 44x.c ebony.c |
47 | src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ | ||
48 | cuboot-ebony.c treeboot-ebony.c | ||
47 | src-boot := $(src-wlib) $(src-plat) empty.c | 49 | src-boot := $(src-wlib) $(src-plat) empty.c |
48 | 50 | ||
49 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 51 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
@@ -129,7 +131,14 @@ image-$(CONFIG_PPC_CELLEB) += zImage.pseries | |||
129 | image-$(CONFIG_PPC_CHRP) += zImage.chrp | 131 | image-$(CONFIG_PPC_CHRP) += zImage.chrp |
130 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp | 132 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp |
131 | image-$(CONFIG_PPC_PMAC) += zImage.pmac | 133 | image-$(CONFIG_PPC_PMAC) += zImage.pmac |
132 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage cuImage | 134 | image-$(CONFIG_PPC_HOLLY) += zImage.holly-elf |
135 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage | ||
136 | |||
137 | ifneq ($(CONFIG_DEVICE_TREE),"") | ||
138 | image-$(CONFIG_PPC_83xx) += cuImage.83xx | ||
139 | image-$(CONFIG_PPC_85xx) += cuImage.85xx | ||
140 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony | ||
141 | endif | ||
133 | 142 | ||
134 | # For 32-bit powermacs, build the COFF and miboot images | 143 | # For 32-bit powermacs, build the COFF and miboot images |
135 | # as well as the ELF images. | 144 | # as well as the ELF images. |
@@ -138,7 +147,8 @@ image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot | |||
138 | endif | 147 | endif |
139 | 148 | ||
140 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) | 149 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) |
141 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) | 150 | initrd-y := $(patsubst zImage%, zImage.initrd%, \ |
151 | $(patsubst treeImage%, treeImage.initrd%, $(image-y))) | ||
142 | initrd-y := $(filter-out $(image-y), $(initrd-y)) | 152 | initrd-y := $(filter-out $(image-y), $(initrd-y)) |
143 | targets += $(image-y) $(initrd-y) | 153 | targets += $(image-y) $(initrd-y) |
144 | 154 | ||
@@ -159,18 +169,27 @@ $(obj)/zImage.ps3: vmlinux | |||
159 | $(obj)/zImage.initrd.ps3: vmlinux | 169 | $(obj)/zImage.initrd.ps3: vmlinux |
160 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" | 170 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" |
161 | 171 | ||
172 | $(obj)/zImage.holly-elf: vmlinux $(wrapperbits) | ||
173 | $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,) | ||
174 | |||
175 | $(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) $(obj)/ramdisk.image.gz | ||
176 | $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,$(obj)/ramdisk.image.gz) | ||
177 | |||
162 | $(obj)/uImage: vmlinux $(wrapperbits) | 178 | $(obj)/uImage: vmlinux $(wrapperbits) |
163 | $(call if_changed,wrap,uboot) | 179 | $(call if_changed,wrap,uboot) |
164 | 180 | ||
165 | cuboot-plat-$(CONFIG_83xx) += 83xx | 181 | # CONFIG_DEVICE_TREE will have "" around it, make sure to strip them |
166 | cuboot-plat-$(CONFIG_85xx) += 85xx | ||
167 | cuboot-plat-y += unknown-platform | ||
168 | |||
169 | dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\ | 182 | dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\ |
170 | ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE) | 183 | ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%) |
184 | |||
185 | $(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits) | ||
186 | $(call if_changed,wrap,cuboot-$*,$(dts)) | ||
187 | |||
188 | $(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits) | ||
189 | $(call if_changed,wrap,treeboot-$*,$(dts)) | ||
171 | 190 | ||
172 | $(obj)/cuImage: vmlinux $(wrapperbits) | 191 | $(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits) |
173 | $(call if_changed,wrap,cuboot-$(word 1,$(cuboot-plat-y)),$(dts)) | 192 | $(call if_changed,wrap,treeboot-$*,$(dts),,$(obj)/ramdisk.image.gz) |
174 | 193 | ||
175 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) | 194 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) |
176 | @rm -f $@; ln $< $@ | 195 | @rm -f $@; ln $< $@ |
@@ -181,8 +200,8 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) | |||
181 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< | 200 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< |
182 | 201 | ||
183 | # anything not in $(targets) | 202 | # anything not in $(targets) |
184 | clean-files += $(image-) $(initrd-) zImage zImage.initrd \ | 203 | clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ |
185 | cuImage.elf cuImage.bin.gz | 204 | treeImage.* |
186 | 205 | ||
187 | # clean up files cached by wrapper | 206 | # clean up files cached by wrapper |
188 | clean-kernel := vmlinux.strip vmlinux.bin | 207 | clean-kernel := vmlinux.strip vmlinux.bin |