aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2019-06-14 06:16:24 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2019-07-04 12:06:38 -0400
commit1cc9a21b0bb36debdf96dbcc4b139d6639373018 (patch)
tree1facb9ac7c1f75511b0ca90fe05433ba6cffd108 /arch/powerpc/boot
parentfbded57c962e7c42c932e1a46c8d801441726662 (diff)
powerpc/boot: Add lzma support for uImage
This patch allows to generate lzma compressed uImage Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r--arch/powerpc/boot/Makefile2
-rwxr-xr-xarch/powerpc/boot/wrapper5
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 73d1f3562978..9b7b11a22925 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -22,6 +22,7 @@ all: $(obj)/zImage
22 22
23compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP 23compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
24compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ 24compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
25compress-$(CONFIG_KERNEL_LZMA) := CONFIG_KERNEL_LZMA
25 26
26ifdef CROSS32_COMPILE 27ifdef CROSS32_COMPILE
27 BOOTCC := $(CROSS32_COMPILE)gcc 28 BOOTCC := $(CROSS32_COMPILE)gcc
@@ -257,6 +258,7 @@ endif
257 258
258compressor-$(CONFIG_KERNEL_GZIP) := gz 259compressor-$(CONFIG_KERNEL_GZIP) := gz
259compressor-$(CONFIG_KERNEL_XZ) := xz 260compressor-$(CONFIG_KERNEL_XZ) := xz
261compressor-$(CONFIG_KERNEL_LZMA) := lzma
260 262
261# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd 263# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
262quiet_cmd_wrap = WRAP $@ 264quiet_cmd_wrap = WRAP $@
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 4e9beecf2502..51dc42f5acbc 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -137,7 +137,7 @@ while [ "$#" -gt 0 ]; do
137 -Z) 137 -Z)
138 shift 138 shift
139 [ "$#" -gt 0 ] || usage 139 [ "$#" -gt 0 ] || usage
140 [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "none" ] || usage 140 [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "none" ] || usage
141 141
142 compression=".$1" 142 compression=".$1"
143 uboot_comp=$1 143 uboot_comp=$1
@@ -374,6 +374,9 @@ if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel
374 .gz) 374 .gz)
375 gzip -n -f -9 "$vmz.$$" 375 gzip -n -f -9 "$vmz.$$"
376 ;; 376 ;;
377 .lzma)
378 xz --format=lzma -f -6 "$vmz.$$"
379 ;;
377 *) 380 *)
378 # drop the compression suffix so the stripped vmlinux is used 381 # drop the compression suffix so the stripped vmlinux is used
379 compression= 382 compression=