[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e4ac35a6-f521-47fa-b949-b827197ca537@t-8ch.de>
Date: Sun, 10 Aug 2025 11:21:32 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Daniel Palmer <daniel@...f.com>
Cc: geert@...ux-m68k.org, linux-m68k@...ts.linux-m68k.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: Add target for lz4 compressed vmlinux
On 2025-08-10 18:08:15+0900, Daniel Palmer wrote:
> On Sat, 9 Aug 2025 at 21:29, Thomas Weißschuh <linux@...ssschuh.net> wrote:
> > On 2025-08-09 20:35:39+0900, Daniel Palmer wrote:
> > > On Sat, 9 Aug 2025 at 16:50, Thomas Weißschuh <linux@...ssschuh.net> 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.
If you also modify the existing code, you should split up the changes
over multiple patches. First split out the rule for vmlinux.tmp, then
switch over the compressors. Each patch should do a single step and
explain why it is done.
And I am still not happy about the naming in my example :-/
> > 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
Modifying generic files in scripts/ will be more effort to argue for.
Also that change should be its own patch again.
I am wondering a bit why the legacy header format does not work.
The manpage of lz4 specifically mentions that it is commonly used for
Linux kernel images. Which is exactly what we are doing here.
Does your usecase work not work with the legacy header? If not, please
mention this in the patches.
Thomas
Powered by blists - more mailing lists