From: Daniel Palmer <daniel@0x0f.com>
To: geert@linux-m68k.org, linux-m68k@lists.linux-m68k.org
Cc: linux-kernel@vger.kernel.org, Daniel Palmer <daniel@0x0f.com>
Subject: [PATCH] m68k: Add target for lz4 compressed vmlinux
Date: Sat, 9 Aug 2025 10:55:29 +0900 [thread overview]
Message-ID: <20250809015529.373693-1-daniel@0x0f.com> (raw)
Traditionally gzip (/bzip?) has been the compressed image format
but its a pain to decompress because its very hard to load and
decompress it in chunks which you need to do if you don't
have enough memory to load the whole kernel image and decompress
it somewhere else.
With lz4 you can set a block size, read it from the header,
and then you only need memory for a single block and the
decompressed kernel.
I use lz4 compressed images on 68000 with 8MB of ram
and MVME147 with 16MB. I want to use lz4 in my fork of EMILE
to boot m68k macs because streaming decompress of gzip is painful.
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
arch/m68k/Makefile | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 0abcf994ce55..a56e853037c0 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -124,6 +124,17 @@ else
$(KBZIP2) -1c vmlinux >vmlinux.bz2
endif
+vmlinux.lz4: vmlinux
+
+ifndef CONFIG_KGDB
+ cp vmlinux vmlinux.tmp
+ $(STRIP) vmlinux.tmp
+ $(LZ4) -z9f vmlinux.tmp vmlinux.lz4
+ rm vmlinux.tmp
+else
+ $(LZ4) -z9f vmlinux vmlinux.lz4
+endif
+
CLEAN_FILES += vmlinux.gz vmlinux.bz2
archheaders:
--
2.50.0
next reply other threads:[~2025-08-09 1:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-09 1:55 Daniel Palmer [this message]
2025-08-09 7:50 ` Thomas Weißschuh
2025-08-09 11:35 ` Daniel Palmer
2025-08-09 12:29 ` Thomas Weißschuh
2025-08-10 9:08 ` Daniel Palmer
2025-08-10 9:21 ` Thomas Weißschuh
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=20250809015529.373693-1-daniel@0x0f.com \
--to=daniel@0x0f.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.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
all inboxes | Powered by JetHome®