From: Yann Collet <cyan@meta.com>
To: Ping Li <leeonion.muyu@gmail.com>
Cc: <catalin.marinas@arm.com>, <will@kernel.org>,
<palmer@dabbelt.com>, <pjw@kernel.org>, <mark.rutland@arm.com>,
<alex@ghiti.fr>, <emil.renner.berthing@canonical.com>,
<masahiroy@kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<u-boot@lists.denx.de>
Subject: Re: [PATCH 0/2] arm64,riscv: boot: emit standard LZ4 frame for Image.lz4
Date: Wed, 25 Nov 2026 16:19:20 -0800 [thread overview]
Message-ID: <20261126001920.3185323-1-cyan@meta.com> (raw)
In-Reply-To: <20261124065650.1968930-1-leeonion.muyu@gmail.com>
On Tue, Nov 24, 2026 at 02:56:48PM +0800, Ping Li wrote:
> arm64 and riscv also build Image.lz4 with the plain cmd_lz4, but a
> compressed boot image on these two architectures is not decompressed
> by the kernel itself - it is handed to the bootloader. U-Boot, which
> implements this via the 'booti' compressed-kernel path (boot/image.c
> image_decomp -> lib/lz4_wrapper.c ulz4fn), only accepts the standard
> LZ4 frame (magic 0x184D2204) and returns -EPROTONOSUPPORT for
> anything else.
U-Boot's decoder has a second requirement: independent blocks. It
rejects frames with linked blocks, and the new rules rely on
independent blocks being the default of the lz4 CLI. lz4 is considering
linked blocks by default in a future version. U-Boot can learn to
accept them, but bootloaders already deployed won't.
Passing -BI makes the output independent of that default:
cmd_lz4_std = cat $(real-prereqs) | $(LZ4) -9 -BI - - > $@
With current lz4 versions, the output is unchanged. One caveat: -BI
exists since lz4 v1.9.0 (2019). Older versions, still found on some
build hosts (lz4 1.8.3 on RHEL 8), reject it, but they produce
independent blocks by default anyway. So the rule can pass -BI only
when lz4 accepts it: 'lz4 -BI -V' fails on these older versions.
Yann
next prev parent reply other threads:[~2026-11-26 0:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 6:56 [PATCH 0/2] arm64,riscv: boot: emit standard LZ4 frame for Image.lz4 Ping Li
2026-11-24 6:56 ` [PATCH 1/2] arm64: " Ping Li
2026-11-24 6:56 ` [PATCH 2/2] riscv: " Ping Li
2026-11-26 0:19 ` Yann Collet [this message]
2026-11-26 3:01 ` [PATCH 0/2] arm64,riscv: " Ping Li
2026-11-26 3:02 ` [PATCH v2 " Ping Li
2026-11-26 3:02 ` [PATCH v2 1/2] arm64: " Ping Li
2026-11-26 3:02 ` [PATCH v2 2/2] riscv: " Ping Li
2026-11-26 5:13 ` [PATCH v2 0/2] arm64,riscv: " Yann Collet
2026-11-26 6:39 ` Ping Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126001920.3185323-1-cyan@meta.com \
--to=cyan@meta.com \
--cc=alex@ghiti.fr \
--cc=catalin.marinas@arm.com \
--cc=emil.renner.berthing@canonical.com \
--cc=leeonion.muyu@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=u-boot@lists.denx.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox