1 --- a/arch/powerpc/Makefile
2 +++ b/arch/powerpc/Makefile
3 @@ -166,7 +166,8 @@ all: zImage
5 # With make 3.82 we cannot mix normal and wildcard targets
6 BOOT_TARGETS1 := zImage zImage.initrd uImage
7 -BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
8 +BOOT_TARGETS2 := uImage.fit.% zImage% dtbImage% treeImage.% cuImage.% \
11 PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2)
13 @@ -199,6 +200,7 @@ define archhelp
14 @echo '* zImage - Build default images selected by kernel config'
15 @echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
16 @echo ' uImage - U-Boot native image format'
17 + @echo ' uImage.fit.<dt> - U-Boot Flattened Image Tree image format'
18 @echo ' cuImage.<dt> - Backwards compatible U-Boot image for older'
19 @echo ' versions which do not support device trees'
20 @echo ' dtbImage.<dt> - zImage with an embedded device tree blob'
21 --- a/arch/powerpc/boot/.gitignore
22 +++ b/arch/powerpc/boot/.gitignore
23 @@ -19,6 +19,7 @@ kernel-vmlinux.strip.c
24 kernel-vmlinux.strip.gz
31 --- a/arch/powerpc/boot/Makefile
32 +++ b/arch/powerpc/boot/Makefile
33 @@ -314,6 +314,9 @@ $(obj)/zImage.iseries: vmlinux
34 $(obj)/uImage: vmlinux $(wrapperbits)
35 $(call if_changed,wrap,uboot)
37 +$(obj)/uImage.fit.%: vmlinux $(obj)/%.dtb $(wrapperbits)
38 + $(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb)
40 $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
41 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
43 @@ -353,7 +356,7 @@ install: $(CONFIGURE) $(addprefix $(obj)
45 # anything not in $(targets)
46 clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
47 - zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
48 + uImage.* zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
49 zImage.iseries zImage.miboot zImage.pmac zImage.pseries \
50 zImage.maple simpleImage.* otheros.bld *.dtb
52 --- a/arch/powerpc/boot/wrapper
53 +++ b/arch/powerpc/boot/wrapper
54 @@ -46,6 +46,9 @@ CROSS=
55 # mkimage wrapper script
56 MKIMAGE=$srctree/scripts/mkuboot.sh
58 +# script to generate an .its file for uImage.fit.* images
59 +MKITS=$srctree/scripts/mkits.sh
61 # directory for object and other files used by this script
62 object=arch/powerpc/boot
64 @@ -161,7 +164,7 @@ coff)
65 lds=$object/zImage.coff.lds
66 link_address='0x500000'
69 +miboot|uboot|uboot.fit)
70 # miboot and U-boot want just the bare bits, not an ELF binary
73 @@ -282,6 +285,21 @@ uboot)
74 if [ -z "$cacheit" ]; then
81 + ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
82 + -d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
84 + # mkimage calls dtc for FIT images so use kernel dtc if necessary
85 + export PATH=$PATH:$srctree/scripts/dtc
87 + ${MKIMAGE} -f "$object/uImage.its" "$ofile"
88 + rm "$object/uImage.its"
89 + if [ -z "$cacheit" ]; then