Patchwork [4/5] kernel.bbclass: add support for LZ4 initramfs files

login
register
mail settings
Submitter Koen Kooi
Date Jan. 14, 2014, 11 a.m.
Message ID <1389697249-4062-4-git-send-email-koen.kooi@linaro.org>
Download mbox | patch
Permalink /patch/64713/
State Accepted
Commit 2fa4364a7d851305d87a49db8a326f035d05942d
Headers show

Comments

Koen Kooi - Jan. 14, 2014, 11 a.m.
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
 meta/classes/kernel.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 5fef446..f2a5ec5 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -87,7 +87,7 @@  copy_initramfs() {
 	mkdir -p ${B}/usr
 	# Find and use the first initramfs image archive type we find
 	rm -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
-	for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do
+	for img in cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do
 		if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
 			cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img ${B}/usr/.
 			case $img in
@@ -96,6 +96,11 @@  copy_initramfs() {
 				gunzip -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
 				break
 				;;
+			*lz4)
+				echo "lz4 decompressing image"
+				lz4 -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img
+				break
+				;;
 			*lzo)
 				echo "lzo decompressing image"
 				lzop -df ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.$img