Hi Petr,

On 2026-10-10T14:24:46, Petr Hodina via B4 Relay
<[email protected]> wrote:
> rockchip: LZMA-compress the FDT image in the FIT based on FIT_FDT_COMP
>
> Adds FIT_FDT_COMP alongside the existing FIT_UBOOT_COMP gated on
> CONFIG_SPL_LZMA only. Applies it to the @fdt-SEQ template's compression
> property.

Please start with a paragraph giving the motivation (and imperative
mood while you are there): which board needs this, and how much space
does it save in the FIT? Compressing the FDT also adds decompression
time in SPL, so before/after numbers for size and boot time would
help. Please mention the target board in the cover letter too.

Please also explain why only LZMA is used. I assume it is because
patch 1 only implements 'lzma' in binman. If so, say so, since a
reader will compare this with FIT_UBOOT_COMP just above, which prefers
gzip.

>
> Signed-off-by: Petr Hodina <[email protected]>
>
> arch/arm/dts/rockchip-u-boot.dtsi | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

> diff --git a/arch/arm/dts/rockchip-u-boot.dtsi 
> b/arch/arm/dts/rockchip-u-boot.dtsi
> @@ -19,6 +19,12 @@
> +#if defined(CONFIG_SPL_LZMA)
> +#define FIT_FDT_COMP         "lzma"
> +#else
> +#define FIT_FDT_COMP         "none"
> +#endif

Just to check: as far as I can tell, no in-tree Rockchip defconfig
enables CONFIG_SPL_LZMA, so this has no effect on any current board.
That is fine, but please mention it in the commit message so people
know it is opt-in.

This also ties FDT compression to CONFIG_SPL_LZMA. Someone who enables
LZMA in SPL for another reason, e.g. a compressed kernel in Falcon
mode, will find their FDT compressed without asking for it. If both
CONFIG_SPL_GZIP and CONFIG_SPL_LZMA are enabled, U-Boot is
gzip-compressed and the FDT is LZMA-compressed. That works, but it may
not be what people expect. I wonder if a separate option would be
clearer, or just a comment here saying that FDT compression follows
CONFIG_SPL_LZMA and why. What do you think?

BTW I checked spl_load_fit_image(): the hash is verified on the
compressed data before decompression, and mkimage hashes what binman
stores, so signed and hashed FITs should be fine. Did you boot-test
this with CONFIG_SPL_FIT_SIGNATURE enabled? It would be worth
mentioning in the commit message.

Regards,
Simon

Reply via email to