* [ptxdist] [PATCH] kernel-fit: specify kernel compression
@ 2025-09-18 9:54 Holger Assmann
2025-09-22 11:04 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Holger Assmann @ 2025-09-18 9:54 UTC (permalink / raw)
To: ptxdist; +Cc: Holger Assmann
On AArch64, the bootloader is responsible for unpacking the kernel image
prior loading it. This has to be specified within the FIT image.
Signed-off-by: Holger Assmann <h.assmann@pengutronix.de>
---
platforms/kernel-fit.in | 6 ++++++
rules/kernel-fit.make | 1 +
rules/post/ptxd_make_image_fit.make | 13 +++++++------
scripts/lib/ptxd_make_fit_image.sh | 2 +-
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in
index 5b160c57d..3ed69f3f2 100644
--- a/platforms/kernel-fit.in
+++ b/platforms/kernel-fit.in
@@ -17,6 +17,12 @@ menuconfig KERNEL_FIT
if KERNEL_FIT
+config KERNEL_FIT_KERNEL_COMPRESSION
+ string
+ # Keep in sync with KERNEL_IMAGE
+ default "gzip" if KERNEL_IMAGE_Z && (ARCH_ARM64 || ARCH_RISCV)
+ default "none"
+
config KERNEL_FIT_NOLOAD
bool
prompt "Sub-image type 'kernel_noload'"
diff --git a/rules/kernel-fit.make b/rules/kernel-fit.make
index 64e82042f..87250c648 100644
--- a/rules/kernel-fit.make
+++ b/rules/kernel-fit.make
@@ -25,6 +25,7 @@ KERNEL_FIT_SIGN_ROLE := image-kernel-fit
KERNEL_FIT_KEY_NAME_HINT := image-kernel-fit
endif
KERNEL_FIT_KERNEL = $(KERNEL_IMAGE_PATH_y)
+KERNEL_FIT_KERNEL_COMPRESSION := $(call remove_quotes,$(PTXCONF_KERNEL_FIT_KERNEL_COMPRESSION))
ifdef PTXCONF_KERNEL_FIT_INITRAMFS
KERNEL_FIT_INITRAMFS := $(IMAGEDIR)/root.cpio
endif
diff --git a/rules/post/ptxd_make_image_fit.make b/rules/post/ptxd_make_image_fit.make
index 2dd5bce9e..b363f1f13 100644
--- a/rules/post/ptxd_make_image_fit.make
+++ b/rules/post/ptxd_make_image_fit.make
@@ -7,12 +7,13 @@
#
world/image-fit/env/impl = \
- $(call world/image/env, $(1)) \
- $(CODE_SIGNING_ENV) \
- image_sign_role="$(call ptx/escape,$($(1)_SIGN_ROLE))" \
- image_key_name_hint="$(call ptx/escape,$($(1)_KEY_NAME_HINT))" \
- image_kernel="$(call ptx/escape,$($(1)_KERNEL))" \
- image_initramfs="$(call ptx/escape,$($(1)_INITRAMFS))" \
+ $(call world/image/env, $(1)) \
+ $(CODE_SIGNING_ENV) \
+ image_sign_role="$(call ptx/escape,$($(1)_SIGN_ROLE))" \
+ image_key_name_hint="$(call ptx/escape,$($(1)_KEY_NAME_HINT))" \
+ image_kernel="$(call ptx/escape,$($(1)_KERNEL))" \
+ image_kernel_compression="$(call ptx/escape,$($(1)_KERNEL_COMPRESSION))"\
+ image_initramfs="$(call ptx/escape,$($(1)_INITRAMFS))" \
image_dtb="$(call ptx/escape,$($(1)_DTB))"
world/image-fit/env = \
diff --git a/scripts/lib/ptxd_make_fit_image.sh b/scripts/lib/ptxd_make_fit_image.sh
index ad9e5bdd3..f5b7755ea 100644
--- a/scripts/lib/ptxd_make_fit_image.sh
+++ b/scripts/lib/ptxd_make_fit_image.sh
@@ -21,7 +21,7 @@ ptxd_make_image_fit_its() {
data = /incbin/("${image_kernel}");
arch = "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)";
os = "linux";
- compression = "none";
+ compression = "${image_kernel_compression}";
EOF
if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_NOLOAD)" ]; then
cat << EOF
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] kernel-fit: specify kernel compression
2025-09-18 9:54 [ptxdist] [PATCH] kernel-fit: specify kernel compression Holger Assmann
@ 2025-09-22 11:04 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2025-09-22 11:04 UTC (permalink / raw)
To: ptxdist; +Cc: Holger Assmann
Thanks, applied as 6247f78668b22b0e6ce248cf155abdf73517b231.
Michael
[sent from post-receive hook]
On Mon, 22 Sep 2025 13:04:21 +0200, Holger Assmann <h.assmann@pengutronix.de> wrote:
> On AArch64, the bootloader is responsible for unpacking the kernel image
> prior loading it. This has to be specified within the FIT image.
>
> Signed-off-by: Holger Assmann <h.assmann@pengutronix.de>
> Message-Id: <20250918095401.1271190-1-h.assmann@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in
> index 5b160c57ddf6..3ed69f3f213a 100644
> --- a/platforms/kernel-fit.in
> +++ b/platforms/kernel-fit.in
> @@ -17,6 +17,12 @@ menuconfig KERNEL_FIT
>
> if KERNEL_FIT
>
> +config KERNEL_FIT_KERNEL_COMPRESSION
> + string
> + # Keep in sync with KERNEL_IMAGE
> + default "gzip" if KERNEL_IMAGE_Z && (ARCH_ARM64 || ARCH_RISCV)
> + default "none"
> +
> config KERNEL_FIT_NOLOAD
> bool
> prompt "Sub-image type 'kernel_noload'"
> diff --git a/rules/kernel-fit.make b/rules/kernel-fit.make
> index 64e82042f979..87250c64820a 100644
> --- a/rules/kernel-fit.make
> +++ b/rules/kernel-fit.make
> @@ -25,6 +25,7 @@ KERNEL_FIT_SIGN_ROLE := image-kernel-fit
> KERNEL_FIT_KEY_NAME_HINT := image-kernel-fit
> endif
> KERNEL_FIT_KERNEL = $(KERNEL_IMAGE_PATH_y)
> +KERNEL_FIT_KERNEL_COMPRESSION := $(call remove_quotes,$(PTXCONF_KERNEL_FIT_KERNEL_COMPRESSION))
> ifdef PTXCONF_KERNEL_FIT_INITRAMFS
> KERNEL_FIT_INITRAMFS := $(IMAGEDIR)/root.cpio
> endif
> diff --git a/rules/post/ptxd_make_image_fit.make b/rules/post/ptxd_make_image_fit.make
> index 2dd5bce9e432..b363f1f13af5 100644
> --- a/rules/post/ptxd_make_image_fit.make
> +++ b/rules/post/ptxd_make_image_fit.make
> @@ -7,12 +7,13 @@
> #
>
> world/image-fit/env/impl = \
> - $(call world/image/env, $(1)) \
> - $(CODE_SIGNING_ENV) \
> - image_sign_role="$(call ptx/escape,$($(1)_SIGN_ROLE))" \
> - image_key_name_hint="$(call ptx/escape,$($(1)_KEY_NAME_HINT))" \
> - image_kernel="$(call ptx/escape,$($(1)_KERNEL))" \
> - image_initramfs="$(call ptx/escape,$($(1)_INITRAMFS))" \
> + $(call world/image/env, $(1)) \
> + $(CODE_SIGNING_ENV) \
> + image_sign_role="$(call ptx/escape,$($(1)_SIGN_ROLE))" \
> + image_key_name_hint="$(call ptx/escape,$($(1)_KEY_NAME_HINT))" \
> + image_kernel="$(call ptx/escape,$($(1)_KERNEL))" \
> + image_kernel_compression="$(call ptx/escape,$($(1)_KERNEL_COMPRESSION))"\
> + image_initramfs="$(call ptx/escape,$($(1)_INITRAMFS))" \
> image_dtb="$(call ptx/escape,$($(1)_DTB))"
>
> world/image-fit/env = \
> diff --git a/scripts/lib/ptxd_make_fit_image.sh b/scripts/lib/ptxd_make_fit_image.sh
> index ad9e5bdd380a..f5b7755ea9c8 100644
> --- a/scripts/lib/ptxd_make_fit_image.sh
> +++ b/scripts/lib/ptxd_make_fit_image.sh
> @@ -21,7 +21,7 @@ ptxd_make_image_fit_its() {
> data = /incbin/("${image_kernel}");
> arch = "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)";
> os = "linux";
> - compression = "none";
> + compression = "${image_kernel_compression}";
> EOF
> if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_NOLOAD)" ]; then
> cat << EOF
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-22 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-18 9:54 [ptxdist] [PATCH] kernel-fit: specify kernel compression Holger Assmann
2025-09-22 11:04 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox