[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7974cbe-41b3-4994-8982-30c8f660e65f@t-8ch.de>
Date: Sat, 9 Aug 2025 14:29:09 +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
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@...ssschuh.net> wrote:
> > Splitting the vmlinux.tmp creation into a dedicated target would make
> > all the compressor targets simpler. It will need a bit more disk space,
> > but there are a bunch of vmlinux copies already in any case.
> >
>
> That's true. I think a target for vmlinux.stripped and then use that
> in the compressed image targets.
>
> How about this?:
>
> vmlinux.stripped: vmlinux
> cp $< $@
> $(STRIP) $@
>
> vmlinux.gz: vmlinux.stripped
>
> ifndef CONFIG_KGDB
> $(KGZIP) -9c vmlinux.stripped >vmlinux.gz
> else
> $(KGZIP) -9c vmlinux >vmlinux.gz
> endif
>
> <snip>
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)
And for the compressor invocations we already have predefined commands:
vmlinux.gz: vmlinux.tmp FORCE
$(call if_changed,gzip)
targets += vmlinux.gz
> > > +
> > > CLEAN_FILES += vmlinux.gz vmlinux.bz2
> >
> > CLEAN_FILES also needs to be updated.
>
> Noted. Will fix for v2.
If you use $(call if_changed) as explained above, the "targets += ..."
will make the CLEAN_FILES unnecessary.
Powered by blists - more mailing lists