linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [v3] XZ compressed zImage support
@ 2016-09-22  6:54 Oliver O'Halloran
  2016-09-22  6:54 ` [PATCH 1/6] powerpc/boot: add sed script Oliver O'Halloran
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Oliver O'Halloran @ 2016-09-22  6:54 UTC (permalink / raw)
  To: linuxppc-dev

This series adds support for using XZ compression in addition to gzip in the
kernel boot wrapper. Currently this is only enabled for 64bit Book3S processors
since it seems that some embedded platforms rely on uBoot (or similar) to
decompress the image rather than having the kernel decompress itself. Enabling
it for other platforms should be fairly straight forward though.

Supporting other compression algorithms (like ARM and x86 do) is possible, but
painful. Each algorithm includes some kernel headers even when the #defines
that are supposed to make them usable in a pre-boot environment are set.
Including kernel headers is an issue because on powerpc  the boot wrapper is
compiled with a different toolchain and possibly for a different target for
backwards compatibility reasons*. This makes it difficult to include kernel
headers since the include paths, etc are not setup for BOOTCC.

This can be worked around by rewriting parts of the each decompressor with sed
scripts, but the rewriting requried is specific to each decompressor.

-oliver

*powermacs have 32bit firmware that cannot directly load a 64bit kernel. A 64
bit big endian kernel has a 32bit wrapper to work around this. On 64bit little
endian we don't have this legacy problem so the wrapper is also 64bit little
endian, but the toolchain issues are still there.

---
Changes from v1:
        fixed some missing dependecies in the Makefile that were causing random
        build breaks.

        Fixed "make clean" so that it would remove the files copied into
        arch/powerpc/boot/ when the wrapper was built.

        previously this series renamed "zlibheader" to "zlibheaders". There were
        consequences.

Changes from v2:
	Adding missing stdint.h and stdbool.h

	Reduced XZ compression level from -9 to -6. Using compression levels
	above -6 requires the decompressor to construct a 64MB dictionary. The
	firmware on some platforms cannot satisfy large allocations (even when
	the memory is physically present) causing decompression failures.
	Luckily using the lower compression level doesn't have much of a
	penalty.
---

^ permalink raw reply	[flat|nested] 10+ messages in thread
* XZ compressed zImage support
@ 2016-08-30  8:10 Oliver O'Halloran
  2016-08-30  8:10 ` [PATCH 3/6] powerpc/boot: use the preboot decompression API Oliver O'Halloran
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver O'Halloran @ 2016-08-30  8:10 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: stewart

This series adds support for using XZ compression in addition to gzip in the
kernel boot wrapper. Currently this is only enabled for 64bit Book3S processors
since it seems that some embedded platforms rely on uBoot (or similar) to
decompress the image rather than having the kernel decompress itself. Enabling
it for other platforms should be fairly straight forward though.

Supporting other compression algorithms (like ARM and x86 do) is possible, but
painful. Each algorithm includes some kernel headers even when the #defines
that are supposed to make them usable in a pre-boot environment are set.
Including kernel headers is an issue because on powerpc  the boot wrapper is
compiled with a different toolchain and possibly for a different target for
backwards compatibility reasons*. This makes it difficult to include kernel
headers since the include paths, etc are not setup for BOOTCC.

This can be worked around by rewriting parts of the each decompressor with sed
scripts, but the rewriting requried is specific to each decompressor.

-oliver

*powermacs have 32bit firmware that cannot directly load a 64bit kernel. A 64
bit big endian kernel has a 32bit wrapper to work around this. On 64bit little
endian we don't have this legacy problem so the wrapper is also 64bit little
endian, but the toolchain issues are still there.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-28 11:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22  6:54 [v3] XZ compressed zImage support Oliver O'Halloran
2016-09-22  6:54 ` [PATCH 1/6] powerpc/boot: add sed script Oliver O'Halloran
2016-09-28 11:34   ` [1/6] " Michael Ellerman
2016-09-22  6:54 ` [PATCH 2/6] powerpc/boot: Use CONFIG_KERNEL_GZIP Oliver O'Halloran
2016-09-22  6:54 ` [PATCH 3/6] powerpc/boot: use the preboot decompression API Oliver O'Halloran
2016-09-22  6:54 ` [PATCH 4/6] powerpc/boot: remove legacy gzip wrapper Oliver O'Halloran
2016-09-22  6:54 ` [PATCH 5/6] powerpc/boot: add xz support to the wrapper script Oliver O'Halloran
2016-09-27  6:37   ` Michael Ellerman
2016-09-22  6:54 ` [PATCH 6/6] powerpc/boot: Add support for XZ compression Oliver O'Halloran
  -- strict thread matches above, loose matches on Subject: below --
2016-08-30  8:10 XZ compressed zImage support Oliver O'Halloran
2016-08-30  8:10 ` [PATCH 3/6] powerpc/boot: use the preboot decompression API Oliver O'Halloran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).