summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-10-05 15:39:12 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-10-05 15:39:12 +0200
commit7e95fab159bdbe5329339fa546b57c8b614cca01 (patch)
treeb28911a5db896bdd5f572a04491dc500d60a2e20
parent3fa83a4a6aa33330a44a5ee0603f81048d2566bb (diff)
downloadptxdist-7e95fab159bdbe5329339fa546b57c8b614cca01.tar.gz
ptxdist-7e95fab159bdbe5329339fa546b57c8b614cca01.tar.xz
kernel: add support for lzo compressed kernel images
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--platforms/image_kernel.in10
-rw-r--r--rules/post/image_kernel.make7
2 files changed, 16 insertions, 1 deletions
diff --git a/platforms/image_kernel.in b/platforms/image_kernel.in
index dceabc4e8..1f325766d 100644
--- a/platforms/image_kernel.in
+++ b/platforms/image_kernel.in
@@ -34,4 +34,14 @@ config IMAGE_KERNEL_INSTALL_LATE
help
Install kernel image during "images".
+config IMAGE_KERNEL_LZOP
+ bool
+ select KERNEL_LZOP
+ prompt "Generate a lzop compressed kernel image"
+
+config IMAGE_KERNEL_LZOP_EXTRA_ARGS
+ depends on IMAGE_KERNEL_LZOP
+ string
+ prompt "extra arguments passed to the lzop command"
+
endif
diff --git a/rules/post/image_kernel.make b/rules/post/image_kernel.make
index 7e6a99f30..f268a7a3b 100644
--- a/rules/post/image_kernel.make
+++ b/rules/post/image_kernel.make
@@ -9,7 +9,7 @@
#
SEL_ROOTFS-$(PTXCONF_IMAGE_KERNEL) += $(IMAGEDIR)/linuximage
-
+SEL_ROOTFS_$(PTXCONF_IMAGE_KERNEL_LZOP) += $(IMAGEDIR)/linuximage.lzo
ifdef PTXCONF_IMAGE_KERNEL_INITRAMFS
$(IMAGEDIR)/linuximage: $(STATEDIR)/image_kernel.compile
@@ -28,4 +28,9 @@ $(IMAGEDIR)/linuximage: $(KERNEL_IMAGE_PATH_y) $(STATEDIR)/kernel.targetinstall
@install -m 644 "$(<)" "$(@)"
@echo "done."
+$(IMAGEDIR)/linuximage.lzo: $(IMAGEDIR)/linuximage
+ @echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))'..."
+ @lzop -f $(call remove_quotes,$(PTXCONF_IMAGE_KERNEL_LZOP_EXTRA_ARGS)) -o "$(@)" "$(<)"
+ @echo "done."
+
# vim: syntax=make