From: Wolfram Sang <wsa@the-dreams.de>
To: ptxdist@pengutronix.de
Cc: Wolfram Sang <wsa@the-dreams.de>
Subject: [ptxdist] [PATCH] images: cpio: add xz packing
Date: Sat, 7 Nov 2015 15:34:45 +0100 [thread overview]
Message-ID: <1446906885-11171-1-git-send-email-wsa@the-dreams.de> (raw)
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
platforms/image_cpio.in | 10 +++++++++-
rules/post/image_cpio.make | 10 ++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/platforms/image_cpio.in b/platforms/image_cpio.in
index afe8a43..b654bba 100644
--- a/platforms/image_cpio.in
+++ b/platforms/image_cpio.in
@@ -13,4 +13,12 @@ config IMAGE_CPIO_GZ
select IMAGE_CPIO
help
Build the traditionally initrd RAM disk to be used
- as initramfs by the kernel.
+ as initramfs by the kernel, packed with gzip.
+
+config IMAGE_CPIO_XZ
+ bool
+ prompt "Generate images/root.cpio.xz"
+ select IMAGE_CPIO
+ help
+ Build the traditionally initrd RAM disk to be used
+ as initramfs by the kernel, packed with xz.
diff --git a/rules/post/image_cpio.make b/rules/post/image_cpio.make
index 573faee..3f20c4e 100644
--- a/rules/post/image_cpio.make
+++ b/rules/post/image_cpio.make
@@ -31,4 +31,14 @@ $(IMAGEDIR)/root.cpio.gz: $(IMAGEDIR)/root.cpio
@echo "done."
endif
+SEL_ROOTFS-$(PTXCONF_IMAGE_CPIO_XZ) += $(IMAGEDIR)/root.cpio.xz
+
+# '--best' is not suitable here. Check xz manpage for details.
+ifdef PTXCONF_IMAGE_CPIO_XZ
+$(IMAGEDIR)/root.cpio.xz: $(IMAGEDIR)/root.cpio
+ @echo -n "Creating '$(notdir $(@))' from '$(notdir $(^))'..."
+ @cat "$(^)" | xz > "$(@)"
+ @echo "done."
+endif
+
# vim: syntax=make
--
2.1.4
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2015-11-07 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-07 14:34 Wolfram Sang [this message]
2015-12-18 11:45 ` Michael Olbrich
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=1446906885-11171-1-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=ptxdist@pengutronix.de \
/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