[PATCH 0/3] alpha: self-extracting compressed kernel images

Matt Turner posted 3 patches 1 week, 5 days ago
arch/alpha/Kconfig                       |   7 ++
arch/alpha/Makefile                      |   6 +-
arch/alpha/boot/.gitignore               |   2 +
arch/alpha/boot/Makefile                 |  16 ++-
arch/alpha/boot/compressed/.gitignore    |   3 +
arch/alpha/boot/compressed/Makefile      |  63 ++++++++++
arch/alpha/boot/compressed/head.S        |  36 ++++++
arch/alpha/boot/compressed/misc.c        | 209 +++++++++++++++++++++++++++++++
arch/alpha/boot/compressed/trampoline.S  |  46 +++++++
arch/alpha/boot/compressed/vmlinux.lds.S |  83 ++++++++++++
arch/alpha/boot/compressed/vmlinux.scr   |  10 ++
scripts/xz_wrap.sh                       |   5 +
12 files changed, 478 insertions(+), 8 deletions(-)
[PATCH 0/3] alpha: self-extracting compressed kernel images
Posted by Matt Turner 1 week, 5 days ago
Alpha is the last architecture whose boot loader decompresses the kernel
itself: aboot carries its own inflate code, so vmlinux.gz has always
been plain gzip, and adding a compression format meant writing a
decompressor for aboot as well as for the kernel.

Build a self-extracting image instead, a small ELF stub with the
compressed vmlinux linked in, which aboot loads and enters like any
other kernel. The compression format then becomes an ordinary kernel
Kconfig choice, and all seven formats become available: xz gives the
smallest image, 5547496 bytes against 7677280 for the equivalent gzip
one. The build now emits arch/alpha/boot/vmlinuz, since the image is no
longer gzip data.

The SRM netboot path (bootpz.c) has its own boot protocol and keeps
using gzip.

Signed-off-by: Matt Turner <mattst88@gmail.com>
---
Matt Turner (3):
      xz: add arch-specific tuning for alpha
      alpha: add self-extracting compressed kernel boot stub
      alpha: support the remaining kernel compression formats

 arch/alpha/Kconfig                       |   7 ++
 arch/alpha/Makefile                      |   6 +-
 arch/alpha/boot/.gitignore               |   2 +
 arch/alpha/boot/Makefile                 |  16 ++-
 arch/alpha/boot/compressed/.gitignore    |   3 +
 arch/alpha/boot/compressed/Makefile      |  63 ++++++++++
 arch/alpha/boot/compressed/head.S        |  36 ++++++
 arch/alpha/boot/compressed/misc.c        | 209 +++++++++++++++++++++++++++++++
 arch/alpha/boot/compressed/trampoline.S  |  46 +++++++
 arch/alpha/boot/compressed/vmlinux.lds.S |  83 ++++++++++++
 arch/alpha/boot/compressed/vmlinux.scr   |  10 ++
 scripts/xz_wrap.sh                       |   5 +
 12 files changed, 478 insertions(+), 8 deletions(-)
---
base-commit: 4407825b2f96b0e48a4bd08ab196b50a30eb3aef
change-id: 20260912-alpha-kernel-compression-2043f806fb75

Best regards,
-- 
Matt Turner <mattst88@gmail.com>
Re: [PATCH 0/3] alpha: self-extracting compressed kernel images
Posted by Magnus Lindholm 1 week, 5 days ago
Hi Matt,

On Sat, Sep 12, 2026 at 9:55 PM Matt Turner <mattst88@gmail.com> wrote:
>
> Alpha is the last architecture whose boot loader decompresses the kernel
> itself: aboot carries its own inflate code, so vmlinux.gz has always
> been plain gzip, and adding a compression format meant writing a
> decompressor for aboot as well as for the kernel.
>
> Build a self-extracting image instead, a small ELF stub with the
> compressed vmlinux linked in, which aboot loads and enters like any
> other kernel. The compression format then becomes an ordinary kernel
> Kconfig choice, and all seven formats become available: xz gives the
> smallest image, 5547496 bytes against 7677280 for the equivalent gzip
> one. The build now emits arch/alpha/boot/vmlinuz, since the image is no
> longer gzip data.
>
> The SRM netboot path (bootpz.c) has its own boot protocol and keeps
> using gzip.
>
> Signed-off-by: Matt Turner <mattst88@gmail.com>


Nice series! I've done some testing during the weekend and it all looks
good to me, thanks for doing this.

Regards

Magnus


> ---
> Matt Turner (3):
>       xz: add arch-specific tuning for alpha
>       alpha: add self-extracting compressed kernel boot stub
>       alpha: support the remaining kernel compression formats
>
>  arch/alpha/Kconfig                       |   7 ++
>  arch/alpha/Makefile                      |   6 +-
>  arch/alpha/boot/.gitignore               |   2 +
>  arch/alpha/boot/Makefile                 |  16 ++-
>  arch/alpha/boot/compressed/.gitignore    |   3 +
>  arch/alpha/boot/compressed/Makefile      |  63 ++++++++++
>  arch/alpha/boot/compressed/head.S        |  36 ++++++
>  arch/alpha/boot/compressed/misc.c        | 209 +++++++++++++++++++++++++++++++
>  arch/alpha/boot/compressed/trampoline.S  |  46 +++++++
>  arch/alpha/boot/compressed/vmlinux.lds.S |  83 ++++++++++++
>  arch/alpha/boot/compressed/vmlinux.scr   |  10 ++
>  scripts/xz_wrap.sh                       |   5 +
>  12 files changed, 478 insertions(+), 8 deletions(-)
> ---
> base-commit: 4407825b2f96b0e48a4bd08ab196b50a30eb3aef
> change-id: 20260912-alpha-kernel-compression-2043f806fb75
>
> Best regards,
> --
> Matt Turner <mattst88@gmail.com>
>