aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/Kconfig19
-rw-r--r--arch/powerpc/Makefile9
-rw-r--r--arch/powerpc/boot/Makefile126
-rw-r--r--arch/powerpc/boot/cuboot-mpc7448hpc2.c (renamed from arch/powerpc/boot/cuboot-hpc2.c)0
-rwxr-xr-xarch/powerpc/boot/wrapper23
5 files changed, 103 insertions, 74 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1348bbc92510..d21495f35727 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -438,25 +438,6 @@ config WANT_DEVICE_TREE
438 bool 438 bool
439 default n 439 default n
440 440
441config DEVICE_TREE
442 string "Static device tree source file"
443 depends on WANT_DEVICE_TREE
444 help
445 This specifies the device tree source (.dts) file to be
446 compiled and included when building the bootwrapper. If a
447 relative filename is given, then it will be relative to
448 arch/powerpc/boot/dts. If you are not using the bootwrapper,
449 or do not need to build a dts into the bootwrapper, this
450 field is ignored.
451
452 For example, this is required when building a cuImage target
453 for an older U-Boot, which cannot pass a device tree itself.
454 Such a kernel will not work with a newer U-Boot that tries to
455 pass a device tree (unless you tell it not to). If your U-Boot
456 does not mention a device tree in "help bootm", then use the
457 cuImage target and specify a device tree here. Otherwise, use
458 the uImage target and leave this field blank.
459
460endmenu 441endmenu
461 442
462config ISA_DMA_API 443config ISA_DMA_API
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index f70df9b64f8f..6845482f0093 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -151,14 +151,11 @@ core-$(CONFIG_XMON) += arch/powerpc/xmon/
151drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ 151drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
152 152
153# Default to zImage, override when needed 153# Default to zImage, override when needed
154defaultimage-y := zImage 154all: zImage
155defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage
156KBUILD_IMAGE := $(defaultimage-y)
157all: $(KBUILD_IMAGE)
158 155
159CPPFLAGS_vmlinux.lds := -Upowerpc 156CPPFLAGS_vmlinux.lds := -Upowerpc
160 157
161BOOT_TARGETS = zImage zImage.initrd uImage 158BOOT_TARGETS = zImage zImage.initrd uImage treeImage.% cuImage.%
162 159
163PHONY += $(BOOT_TARGETS) 160PHONY += $(BOOT_TARGETS)
164 161
@@ -180,7 +177,7 @@ define archhelp
180endef 177endef
181 178
182install: vdso_install 179install: vdso_install
183 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install 180 $(Q)$(MAKE) $(build)=$(boot) install
184 181
185vdso_install: 182vdso_install:
186ifeq ($(CONFIG_PPC64),y) 183ifeq ($(CONFIG_PPC64),y)
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 \
60src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ 60src-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
67src-boot := $(src-wlib) $(src-plat) empty.c 68src-boot := $(src-wlib) $(src-plat) empty.c
@@ -123,6 +124,8 @@ targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
123extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 124extra-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
127dtstree := $(srctree)/$(src)/dts
128
126wrapper :=$(srctree)/$(src)/wrapper 129wrapper :=$(srctree)/$(src)/wrapper
127wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \ 130wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \
128 $(wrapper) FORCE 131 $(wrapper) FORCE
@@ -181,7 +184,7 @@ quiet_cmd_wrap = WRAP $@
181image-$(CONFIG_PPC_PSERIES) += zImage.pseries 184image-$(CONFIG_PPC_PSERIES) += zImage.pseries
182image-$(CONFIG_PPC_MAPLE) += zImage.pseries 185image-$(CONFIG_PPC_MAPLE) += zImage.pseries
183image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries 186image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
184image-$(CONFIG_PPC_PS3) += zImage.ps3 187image-$(CONFIG_PPC_PS3) += zImage-dtb.ps3
185image-$(CONFIG_PPC_CELLEB) += zImage.pseries 188image-$(CONFIG_PPC_CELLEB) += zImage.pseries
186image-$(CONFIG_PPC_CHRP) += zImage.chrp 189image-$(CONFIG_PPC_CHRP) += zImage.chrp
187image-$(CONFIG_PPC_EFIKA) += zImage.chrp 190image-$(CONFIG_PPC_EFIKA) += zImage.chrp
@@ -191,33 +194,69 @@ image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800
191image-$(CONFIG_PPC_ISERIES) += zImage.iseries 194image-$(CONFIG_PPC_ISERIES) += zImage.iseries
192image-$(CONFIG_DEFAULT_UIMAGE) += uImage 195image-$(CONFIG_DEFAULT_UIMAGE) += uImage
193 196
194ifneq ($(CONFIG_DEVICE_TREE),"") 197#
195image-$(CONFIG_PPC_8xx) += cuImage.8xx 198# Targets which embed a device tree blob
196image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc 199#
197image-$(CONFIG_EP405) += zImage.ep405 200# Theses are default targets to build images which embed device tree blobs.
198image-$(CONFIG_8260) += cuImage.pq2 201# They are only required on boards which do not have FDT support in firmware.
199image-$(CONFIG_EP8248E) += zImage.ep8248e 202# Boards with newish u-boot firmare can use the uImage target above
200image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx 203#
201image-$(CONFIG_STORCENTER) += cuImage.824x 204
202image-$(CONFIG_PPC_83xx) += cuImage.83xx 205# Board ports in arch/powerpc/platform/40x/Kconfig
203image-$(CONFIG_PPC_85xx) += cuImage.85xx 206image-$(CONFIG_EP405) += zImage-dtb.ep405
204ifeq ($(CONFIG_CPM2),y) 207image-$(CONFIG_WALNUT) += treeImage.walnut
205image-$(CONFIG_PPC_85xx) += cuImage.85xx-cpm2 208
206endif 209# Board ports in arch/powerpc/platform/44x/Kconfig
207image-$(CONFIG_MPC7448HPC2) += cuImage.hpc2
208image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony 210image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
209image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo 211image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo
210image-$(CONFIG_SEQUOIA) += cuImage.sequoia 212image-$(CONFIG_SEQUOIA) += cuImage.sequoia
211image-$(CONFIG_RAINIER) += cuImage.rainier 213image-$(CONFIG_RAINIER) += cuImage.rainier
212image-$(CONFIG_WALNUT) += treeImage.walnut
213image-$(CONFIG_TAISHAN) += cuImage.taishan 214image-$(CONFIG_TAISHAN) += cuImage.taishan
214image-$(CONFIG_KATMAI) += cuImage.katmai 215image-$(CONFIG_KATMAI) += cuImage.katmai
215image-$(CONFIG_WARP) += cuImage.warp 216image-$(CONFIG_WARP) += cuImage.warp
216endif
217 217
218ifneq ($(CONFIG_REDBOOT),"") 218# Board ports in arch/powerpc/platform/8xx/Kconfig
219image-$(CONFIG_PPC_8xx) += zImage.redboot-8xx 219image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads
220endif 220image-$(CONFIG_PPC_MPC885ADS) += cuImage.mpc885ads
221image-$(CONFIG_PPC_EP88XC) += zImage-dtb.ep88xc
222image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \
223 zImage-dtb.adder875-redboot
224
225# Board ports in arch/powerpc/platform/52xx/Kconfig
226image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 cuImage.lite5200b
227
228# Board ports in arch/powerpc/platform/82xx/Kconfig
229image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads
230image-$(CONFIG_PQ2FADS) += cuImage.pq2fads
231image-$(CONFIG_EP8248E) += zImage-dtb.ep8248e
232
233# Board ports in arch/powerpc/platform/83xx/Kconfig
234image-$(CONFIG_MPC832x_MDS) += cuImage.mpc832x_mds
235image-$(CONFIG_MPC832x_RDB) += cuImage.mpc832x_rdb
236image-$(CONFIG_MPC834x_ITX) += cuImage.mpc8349emitx \
237 cuImage.mpc8349emitxgp
238image-$(CONFIG_MPC834x_MDS) += cuImage.mpc834x_mds
239image-$(CONFIG_MPC836x_MDS) += cuImage.mpc836x_mds
240
241# Board ports in arch/powerpc/platform/85xx/Kconfig
242image-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads
243image-$(CONFIG_MPC8560_ADS) += cuImage.mpc8560ads
244image-$(CONFIG_MPC85xx_CDS) += cuImage.mpc8541cds \
245 cuImage.mpc8548cds \
246 cuImage.mpc8555cds
247image-$(CONFIG_MPC85xx_MDS) += cuImage.mpc8568mds
248image-$(CONFIG_MPC85xx_DS) += cuImage.mpc8544ds \
249 cuImage.mpc8572ds
250image-$(CONFIG_TQM8540) += cuImage.tqm8540
251image-$(CONFIG_TQM8541) += cuImage.tqm8541
252image-$(CONFIG_TQM8555) += cuImage.tqm8555
253image-$(CONFIG_TQM8560) += cuImage.tqm8560
254image-$(CONFIG_SBC8548) += cuImage.tqm8548
255image-$(CONFIG_SBC8560) += cuImage.tqm8560
256
257# Board ports in arch/powerpc/platform/embedded6xx/Kconfig
258image-$(CONFIG_STORCENTER) += cuImage.storcenter
259image-$(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
239ifeq ($(CONFIG_WANT_DEVICE_TREE),y)
240ifneq ($(CONFIG_DEVICE_TREE),"")
241dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
242 ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)
243endif
244endif
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.
283ifeq (,$(image-y)) 311ifeq (,$(image-y))
diff --git a/arch/powerpc/boot/cuboot-hpc2.c b/arch/powerpc/boot/cuboot-mpc7448hpc2.c
index 1b8953259d75..1b8953259d75 100644
--- a/arch/powerpc/boot/cuboot-hpc2.c
+++ b/arch/powerpc/boot/cuboot-mpc7448hpc2.c
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 763a0c46f441..c3178155311b 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -158,6 +158,29 @@ miboot|uboot)
158cuboot*) 158cuboot*)
159 binary=y 159 binary=y
160 gzip= 160 gzip=
161 case "$platform" in
162 *-mpc885ads|*-adder875*|*-ep88xc)
163 platformo=$object/cuboot-8xx.o
164 ;;
165 *5200*|*-motionpro)
166 platformo=$object/cuboot-52xx.o
167 ;;
168 *-pq2fads|*-ep8248e|*-mpc8272*|*-storcenter)
169 platformo=$object/cuboot-pq2.o
170 ;;
171 *-mpc824*)
172 platformo=$object/cuboot-824x.o
173 ;;
174 *-mpc83*)
175 platformo=$object/cuboot-83xx.o
176 ;;
177 *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555*)
178 platformo=$object/cuboot-85xx-cpm2.o
179 ;;
180 *-mpc85*)
181 platformo=$object/cuboot-85xx.o
182 ;;
183 esac
161 ;; 184 ;;
162ps3) 185ps3)
163 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" 186 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o"