* [PATCH v2] arm64: Allow packing uncompressed images into distro packages
@ 2024-09-11 2:53 Bjorn Andersson
2024-10-08 12:14 ` Konrad Dybcio
2024-10-16 16:44 ` Marc Zyngier
0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Andersson @ 2024-09-11 2:53 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Linus Torvalds
Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, Bjorn Andersson
From: Bjorn Andersson <quic_bjorande@quicinc.com>
The distro packages (deb-pkg, pacman-pkg, rpm-pkg) are generated using
the compressed kernel image, which means that the kernel once installed
can not be booted with systemd-boot.
This differs from the packages generated by the distros themselves,
which uses the uncompressed image.
Use the newly introduced CONFIG_COMPRESSED_INSTALL option to allow
selection of which version of the kernel image should be packaged into
the distro packages.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
Changes in v2:
- Restore the install-specific handling to retain the behavior of
installing the uncompressed "Image" under CONFIG_EFI_ZBOOT=y &&
CONFIG_COMPRESSED_INSTALL=n.
- Link to v1: https://lore.kernel.org/r/20240819-uncompressed-distro-packages-v1-1-c8accc8bc9ea@quicinc.com
---
arch/arm64/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index f6bc3da1ef11..3d9752e56109 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -166,9 +166,13 @@ BOOT_TARGETS := Image vmlinuz.efi image.fit
PHONY += $(BOOT_TARGETS)
ifeq ($(CONFIG_EFI_ZBOOT),)
-KBUILD_IMAGE := $(boot)/Image.gz
+ ifeq ($(CONFIG_COMPRESSED_INSTALL),y)
+ KBUILD_IMAGE := $(boot)/Image.gz
+ else
+ KBUILD_IMAGE := $(boot)/Image
+ endif
else
-KBUILD_IMAGE := $(boot)/vmlinuz.efi
+ KBUILD_IMAGE := $(boot)/vmlinuz.efi
endif
all: $(notdir $(KBUILD_IMAGE))
---
base-commit: 469f1bad3c1c6e268059f78c0eec7e9552b3894c
change-id: 20240819-uncompressed-distro-packages-8da6959ed698
Best regards,
--
Bjorn Andersson <quic_bjorande@quicinc.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] arm64: Allow packing uncompressed images into distro packages
2024-09-11 2:53 [PATCH v2] arm64: Allow packing uncompressed images into distro packages Bjorn Andersson
@ 2024-10-08 12:14 ` Konrad Dybcio
2024-10-16 16:44 ` Marc Zyngier
1 sibling, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2024-10-08 12:14 UTC (permalink / raw)
To: Bjorn Andersson, Catalin Marinas, Will Deacon, Linus Torvalds
Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, Bjorn Andersson
On 11.09.2024 4:53 AM, Bjorn Andersson wrote:
> From: Bjorn Andersson <quic_bjorande@quicinc.com>
>
> The distro packages (deb-pkg, pacman-pkg, rpm-pkg) are generated using
> the compressed kernel image, which means that the kernel once installed
> can not be booted with systemd-boot.
>
> This differs from the packages generated by the distros themselves,
> which uses the uncompressed image.
>
> Use the newly introduced CONFIG_COMPRESSED_INSTALL option to allow
> selection of which version of the kernel image should be packaged into
> the distro packages.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] arm64: Allow packing uncompressed images into distro packages
2024-09-11 2:53 [PATCH v2] arm64: Allow packing uncompressed images into distro packages Bjorn Andersson
2024-10-08 12:14 ` Konrad Dybcio
@ 2024-10-16 16:44 ` Marc Zyngier
2024-11-10 16:47 ` Bjorn Andersson
1 sibling, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2024-10-16 16:44 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Catalin Marinas, Will Deacon, Linus Torvalds, linux-arm-kernel,
linux-kernel, linux-arm-msm, Bjorn Andersson
Hi Bjorn,
On Wed, 11 Sep 2024 03:53:16 +0100,
Bjorn Andersson <andersson@kernel.org> wrote:
>
> From: Bjorn Andersson <quic_bjorande@quicinc.com>
>
> The distro packages (deb-pkg, pacman-pkg, rpm-pkg) are generated using
> the compressed kernel image, which means that the kernel once installed
> can not be booted with systemd-boot.
Are you sure? I just installed a guest with systemd-boot
(252.30-1~deb12u, as shipped in Debian), and it is perfectly able to
boot a compressed kernel.
>
> This differs from the packages generated by the distros themselves,
> which uses the uncompressed image.
>
> Use the newly introduced CONFIG_COMPRESSED_INSTALL option to allow
> selection of which version of the kernel image should be packaged into
> the distro packages.
I'm normally building kernels as Debian packages, without any of
CONFIG_EFI_ZBOOT or CONFIG_COMPRESSED_INSTALL.
As a result, the installed kernel image of a Debian package shoots up
from ~8M to an impressive 25M, since we're not picking the compressed
image anymore. Storage may be cheap, but still.
I really don't think CONFIG_COMPRESSED_INSTALL should change the
existing behaviours, and a new option would be better suited to enable
this new setup if deemed necessary.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] arm64: Allow packing uncompressed images into distro packages
2024-10-16 16:44 ` Marc Zyngier
@ 2024-11-10 16:47 ` Bjorn Andersson
0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2024-11-10 16:47 UTC (permalink / raw)
To: Marc Zyngier
Cc: Catalin Marinas, Will Deacon, Linus Torvalds, linux-arm-kernel,
linux-kernel, linux-arm-msm, Bjorn Andersson
On Wed, Oct 16, 2024 at 05:44:54PM +0100, Marc Zyngier wrote:
> Hi Bjorn,
>
> On Wed, 11 Sep 2024 03:53:16 +0100,
> Bjorn Andersson <andersson@kernel.org> wrote:
> >
> > From: Bjorn Andersson <quic_bjorande@quicinc.com>
> >
> > The distro packages (deb-pkg, pacman-pkg, rpm-pkg) are generated using
> > the compressed kernel image, which means that the kernel once installed
> > can not be booted with systemd-boot.
>
> Are you sure? I just installed a guest with systemd-boot
> (252.30-1~deb12u, as shipped in Debian), and it is perfectly able to
> boot a compressed kernel.
>
Sorry for the late response, to verify I did "make defconfig bindeb-pkg"
and crafted a disk image using mkosi. It contains:
# apt info systemd-boot
Package: systemd-boot
Version: 257~rc1-4
It fails to load my the compressed image:
../src/boot/efi/boot.c:2557@image_start: Error loading \debian\6.12.0-rc6-next-20241108-00003-ga216563e3174-dirty\vmlinuz: Unsupported
Which is expected per per this discussion:
https://github.com/systemd/systemd/issues/23788
> >
> > This differs from the packages generated by the distros themselves,
> > which uses the uncompressed image.
> >
> > Use the newly introduced CONFIG_COMPRESSED_INSTALL option to allow
> > selection of which version of the kernel image should be packaged into
> > the distro packages.
>
> I'm normally building kernels as Debian packages, without any of
> CONFIG_EFI_ZBOOT or CONFIG_COMPRESSED_INSTALL.
>
My goal is to make "make defconfig bindeb-pkg" (and the other -pkg
targets) boot out of the box in a "standard system".
> As a result, the installed kernel image of a Debian package shoots up
> from ~8M to an impressive 25M, since we're not picking the compressed
> image anymore. Storage may be cheap, but still.
>
No argument about this.
> I really don't think CONFIG_COMPRESSED_INSTALL should change the
> existing behaviours, and a new option would be better suited to enable
> this new setup if deemed necessary.
>
My main concern is that the "make *-pkg" targets create packages with
the compressed image, while at least Arch Linux Arm, Debian, and Fedora
are packaging uncompressed images in their official packages.
Regards,
Bjorn
> Thanks,
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-10 16:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 2:53 [PATCH v2] arm64: Allow packing uncompressed images into distro packages Bjorn Andersson
2024-10-08 12:14 ` Konrad Dybcio
2024-10-16 16:44 ` Marc Zyngier
2024-11-10 16:47 ` Bjorn Andersson
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).