forked from Minki/linux
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>
This commit is contained in:
parent
fbded57c96
commit
1cc9a21b0b
@ -198,6 +198,7 @@ config PPC
|
|||||||
select HAVE_IOREMAP_PROT
|
select HAVE_IOREMAP_PROT
|
||||||
select HAVE_IRQ_EXIT_ON_IRQ_STACK
|
select HAVE_IRQ_EXIT_ON_IRQ_STACK
|
||||||
select HAVE_KERNEL_GZIP
|
select HAVE_KERNEL_GZIP
|
||||||
|
select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
|
||||||
select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
|
select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
|
||||||
select HAVE_KPROBES
|
select HAVE_KPROBES
|
||||||
select HAVE_KPROBES_ON_FTRACE
|
select HAVE_KPROBES_ON_FTRACE
|
||||||
|
@ -22,6 +22,7 @@ all: $(obj)/zImage
|
|||||||
|
|
||||||
compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
|
compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
|
||||||
compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
|
compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
|
||||||
|
compress-$(CONFIG_KERNEL_LZMA) := CONFIG_KERNEL_LZMA
|
||||||
|
|
||||||
ifdef CROSS32_COMPILE
|
ifdef CROSS32_COMPILE
|
||||||
BOOTCC := $(CROSS32_COMPILE)gcc
|
BOOTCC := $(CROSS32_COMPILE)gcc
|
||||||
@ -257,6 +258,7 @@ endif
|
|||||||
|
|
||||||
compressor-$(CONFIG_KERNEL_GZIP) := gz
|
compressor-$(CONFIG_KERNEL_GZIP) := gz
|
||||||
compressor-$(CONFIG_KERNEL_XZ) := xz
|
compressor-$(CONFIG_KERNEL_XZ) := xz
|
||||||
|
compressor-$(CONFIG_KERNEL_LZMA) := lzma
|
||||||
|
|
||||||
# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
|
# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
|
||||||
quiet_cmd_wrap = WRAP $@
|
quiet_cmd_wrap = WRAP $@
|
||||||
|
@ -137,7 +137,7 @@ while [ "$#" -gt 0 ]; do
|
|||||||
-Z)
|
-Z)
|
||||||
shift
|
shift
|
||||||
[ "$#" -gt 0 ] || usage
|
[ "$#" -gt 0 ] || usage
|
||||||
[ "$1" != "gz" -o "$1" != "xz" -o "$1" != "none" ] || usage
|
[ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "none" ] || usage
|
||||||
|
|
||||||
compression=".$1"
|
compression=".$1"
|
||||||
uboot_comp=$1
|
uboot_comp=$1
|
||||||
@ -374,6 +374,9 @@ if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel
|
|||||||
.gz)
|
.gz)
|
||||||
gzip -n -f -9 "$vmz.$$"
|
gzip -n -f -9 "$vmz.$$"
|
||||||
;;
|
;;
|
||||||
|
.lzma)
|
||||||
|
xz --format=lzma -f -6 "$vmz.$$"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# drop the compression suffix so the stripped vmlinux is used
|
# drop the compression suffix so the stripped vmlinux is used
|
||||||
compression=
|
compression=
|
||||||
|
Loading…
Reference in New Issue
Block a user