Re: [PATCH] m68k: Add target for lz4 compressed vmlinux
From: Daniel Palmer
Date: Sun Aug 10 2025 - 05:08:38 EST
Hi Thomas,
On Sat, 9 Aug 2025 at 21:29, Thomas Weißschuh <linux@xxxxxxxxxxxxxx> wrote:
>
> Hi Daniel,
>
> On 2025-08-09 20:35:39+0900, Daniel Palmer wrote:
> > On Sat, 9 Aug 2025 at 16:50, Thomas Weißschuh <linux@xxxxxxxxxxxxxx> wrote:
> I would continue with vmlinux.tmp. It might not actually be stripped.
>
> quiet_cmd_precompress = PRECOMPRESS $@
> ifndef CONFIG_KGDB
> cmd_precompress = cp $< $@
> else
> cmd_precompress = $(STRIP) $< -o $@
> endif
>
> vmlinux.tmp: vmlinux FORCE
> $(call if_changed,precompress)
>
> targets += vmlinux.tmp
>
> This will also correctly handle CONFIG_KGDB changing.
>
> (Maybe the naming can be improved)
Nice, that's a lot better and I've reworked my patch to do that.
> And for the compressor invocations we already have predefined commands:
>
> vmlinux.gz: vmlinux.tmp FORCE
> $(call if_changed,gzip)
I also did this for all of the targets and $(call if_changed,lz4)
results in an lz4 file with the old header format[0] and 8MB block
size which is not what I need.
So v2 will have a patch to add a helper to generate that style of lz4
in scripts/Makefile.lib
Thanks!,
Daniel
0 - https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md#legacy-frame