diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2010-01-10 18:14:23 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2010-01-10 18:14:23 +0000 |
commit | 3c0f3ae29400cbf074cc8435cd97395d370720ba (patch) | |
tree | 5b164387b2ffb6b616a1d7e349df043370859494 /target/linux/mpc83xx/patches | |
parent | b28f438a37183e012e6a7b591adb9552bb9b78c0 (diff) | |
download | mtk-20170518-3c0f3ae29400cbf074cc8435cd97395d370720ba.zip mtk-20170518-3c0f3ae29400cbf074cc8435cd97395d370720ba.tar.gz mtk-20170518-3c0f3ae29400cbf074cc8435cd97395d370720ba.tar.bz2 |
FIT uImage support for the MPC8377-WLAN
SVN-Revision: 19094
Diffstat (limited to 'target/linux/mpc83xx/patches')
-rw-r--r-- | target/linux/mpc83xx/patches/005-powerpc_mkuboot.patch | 30 | ||||
-rw-r--r-- | target/linux/mpc83xx/patches/006-powerpc_create_fit_uImages.patch | 94 |
2 files changed, 124 insertions, 0 deletions
diff --git a/target/linux/mpc83xx/patches/005-powerpc_mkuboot.patch b/target/linux/mpc83xx/patches/005-powerpc_mkuboot.patch new file mode 100644 index 0000000..8e200b1 --- /dev/null +++ b/target/linux/mpc83xx/patches/005-powerpc_mkuboot.patch @@ -0,0 +1,30 @@ +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -43,6 +43,9 @@ gzip=.gz + # cross-compilation prefix + CROSS= + ++# mkimage wrapper script ++MKIMAGE=$srctree/scripts/mkuboot.sh ++ + # directory for object and other files used by this script + object=arch/powerpc/boot + objbin=$object +@@ -262,7 +265,7 @@ membase=`${CROSS}objdump -p "$kernel" | + case "$platform" in + uboot) + rm -f "$ofile" +- mkimage -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \ ++ ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \ + $uboot_version -d "$vmz" "$ofile" + if [ -z "$cacheit" ]; then + rm -f "$vmz" +@@ -322,7 +325,7 @@ coff) + ;; + cuboot*) + gzip -f -9 "$ofile" +- mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ ++ ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ + $uboot_version -d "$ofile".gz "$ofile" + ;; + treeboot*) diff --git a/target/linux/mpc83xx/patches/006-powerpc_create_fit_uImages.patch b/target/linux/mpc83xx/patches/006-powerpc_create_fit_uImages.patch new file mode 100644 index 0000000..d553c67 --- /dev/null +++ b/target/linux/mpc83xx/patches/006-powerpc_create_fit_uImages.patch @@ -0,0 +1,94 @@ +--- a/arch/powerpc/Makefile ++++ b/arch/powerpc/Makefile +@@ -157,7 +157,8 @@ drivers-$(CONFIG_OPROFILE) += arch/power + # Default to zImage, override when needed + all: zImage + +-BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% ++BOOT_TARGETS = zImage zImage.initrd uImage uImage.fit.% zImage% dtbImage% \ ++ treeImage.% cuImage.% simpleImage.% + + PHONY += $(BOOT_TARGETS) + +@@ -173,6 +174,7 @@ define archhelp + @echo '* zImage - Build default images selected by kernel config' + @echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)' + @echo ' uImage - U-Boot native image format' ++ @echo ' uImage.fit.<dt> - U-Boot Flattened Image Tree image format' + @echo ' cuImage.<dt> - Backwards compatible U-Boot image for older' + @echo ' versions which do not support device trees' + @echo ' dtbImage.<dt> - zImage with an embedded device tree blob' +--- a/arch/powerpc/boot/.gitignore ++++ b/arch/powerpc/boot/.gitignore +@@ -19,6 +19,7 @@ kernel-vmlinux.strip.c + kernel-vmlinux.strip.gz + mktree + uImage ++uImage.fit.* + cuImage.* + dtbImage.* + treeImage.* +--- a/arch/powerpc/boot/Makefile ++++ b/arch/powerpc/boot/Makefile +@@ -306,6 +306,9 @@ $(obj)/zImage.iseries: vmlinux + $(obj)/uImage: vmlinux $(wrapperbits) + $(call if_changed,wrap,uboot) + ++$(obj)/uImage.fit.%: vmlinux $(obj)/%.dtb $(wrapperbits) ++ $(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb) ++ + $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) + $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) + +@@ -345,7 +348,7 @@ install: $(CONFIGURE) $(addprefix $(obj) + + # anything not in $(targets) + clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ +- zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \ ++ uImage.* zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \ + zImage.iseries zImage.miboot zImage.pmac zImage.pseries \ + simpleImage.* otheros.bld *.dtb + +--- a/arch/powerpc/boot/wrapper ++++ b/arch/powerpc/boot/wrapper +@@ -46,6 +46,9 @@ CROSS= + # mkimage wrapper script + MKIMAGE=$srctree/scripts/mkuboot.sh + ++# script to generate an .its file for uImage.fit.* images ++MKITS=$srctree/scripts/mkits.sh ++ + # directory for object and other files used by this script + object=arch/powerpc/boot + objbin=$object +@@ -156,7 +159,7 @@ coff) + lds=$object/zImage.coff.lds + link_address='0x500000' + ;; +-miboot|uboot) ++miboot|uboot|uboot.fit) + # miboot and U-boot want just the bare bits, not an ELF binary + ext=bin + objflags="-O binary" +@@ -272,6 +275,21 @@ uboot) + fi + exit 0 + ;; ++uboot.fit) ++ rm -f "$ofile" ++ ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \ ++ -d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its" ++ ++ # mkimage calls dtc for FIT images so use kernel dtc if necessary ++ export PATH=$PATH:$srctree/scripts/dtc ++ ++ ${MKIMAGE} -f "$object/uImage.its" "$ofile" ++ rm "$object/uImage.its" ++ if [ -z "$cacheit" ]; then ++ rm -f "$vmz" ++ fi ++ exit 0 ++ ;; + esac + + addsec() { |