Re: [PATCH 5/6] powerpc/boot: add xz support to the wrapper script
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-09-27 06:37:26
Oliver O'Halloran [off-list ref] writes:
This modifies the script so that the -Z option takes an argument to specify the compression type. It can either be 'gz', 'xz' or 'none'. The legazy --no-gzip and -z options are still supported and will set the compression to none and gzip respectively, but they are not documented. Only xz -6 is used for compression rather than xz -9. Using compression levels higher than 6 requires the decompressor to build a large (64MB) dictionary when decompressing and some environments cannot satisfy large allocations (e.g. POWER 6 LPAR partition firmware).
This isn't working for me on machines that use uImage.
That's the "uboot" case in wrapper, where we do:
${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
$uboot_version -d "$vmz" "$ofile"
ie. we tell mkimage that we're using gzip compression, regardless of
whether we actually are.
That leads to something like:
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-4.8.0-rc5-compiler_gcc-6.2
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 3381044 Bytes = 3.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 0c000000
Booting using the fdt blob at 0xc000000
Uncompressing Kernel Image ... Error: Bad gzipped data
gzip compressed: uncompress error -1
Must RESET board to recover
So you'll need to do some juggling so you can pass the right argument
for -C to mkimage.
cheers