]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: add lz4 dependency and fix the call to lz4
authorTimon Ulrich <t.ulrich@anapur.de>
Fri, 3 Jul 2020 12:39:40 +0000 (14:39 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Jul 2020 14:04:00 +0000 (15:04 +0100)
If the initramfs image is type lz4, then a native lz4 is needed.

Additionally an output filename needs to be specified when calling lz4,
otherwise STDOUT will be used implicitly.

Signed-off-by: Timon Ulrich <t.ulrich@anapur.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 301e3b86b29f1bb9aa98dc34bf162f43997050a1..c9044befbeab98978755e94fb483954398c1e2e5 100644 (file)
@@ -5,6 +5,7 @@ KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel")
 
 PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
 DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
+DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}"
 PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
 
 do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
@@ -210,7 +211,7 @@ copy_initramfs() {
                                ;;
                        *lz4)
                                echo "lz4 decompressing image"
-                               lz4 -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
+                               lz4 -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
                                break
                                ;;
                        *lzo)