kernel.bbclass: add lz4 dependency and fix the call to lz4
PATCH v2 1/1 kernel.bbclass: add lz4 dependency and fix the call to lz4
From: Timon Ulrich <[email protected]>
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.
--- meta/classes/kernel.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +2 -1
@@ -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)
Signature · 1 line
2.17.1
Quoted 17 lines · T. Ulrich
From: Timon Ulrich <[email protected]>
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 <[email protected]>--- meta/classes/kernel.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes/kernel.bbclass +0
-0
meta/classes/kernel.bbclass KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") · line 8
Quoted 4 lines
meta/classes/kernel.bbclass +1
-0@@ -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)}"
Should/Could we do a similar thing for "lzop-native" above ? To me it looks like that would be possible, assuming I interpreted my taskexp correctly.
Jacob
Quoted 14 lines
meta/classes/kernel.bbclass +1
-1PACKAGE_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)
Quoted 13 lines · Jacob Kroon
Quoted 12 lines · T. Ulrich
From: Timon Ulrich <[email protected]>
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 <[email protected]>---
meta/classes/kernel.bbclass | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 13 lines
Quoted 10 lines
meta/classes/kernel.bbclass +0
-0@@ -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)}"Should/Could we do a similar thing for "lzop-native" above ? To me it looks like that would be possible, assuming I interpreted my taskexp correctly.
I took the liberty of doing some more history digging, lzop-native dependency was added in OE-Core commit
ee0640cb0c32b959ffaaac6752d582ed1d76e313
kernel.bbclass: add lzop dependency
and it looks to me it'd be worth doing the same fix.
Jacob
Quoted 33 lines · Jacob Kroon
Quoted 22 lines · Jacob Kroon
Quoted 21 lines · T. Ulrich
From: Timon Ulrich <[email protected]>
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 <[email protected]>--- meta/classes/kernel.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes/kernel.bbclass +0
-0@@ -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}binutilsQuoted 9 lines
Quoted 4 lines
virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
+DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}"Should/Could we do a similar thing for "lzop-native" above ? To me it looks like that would be possible, assuming I interpreted my taskexp correctly.
Quoted 7 lines
I took the liberty of doing some more history digging, lzop-native dependency was added in OE-Core commit
ee0640cb0c32b959ffaaac6752d582ed1d76e313
kernel.bbclass: add lzop dependencyand it looks to me it'd be worth doing the same fix.
Agreed, I was hoping that would be possible for this too.
Cheers,
Richard
Re: [OE-core] [PATCH v2] kernel.bbclass: add lz4 dependency and fixthe call to lz4
I thought so, too.
Didn't swoop it up in the patch i've sent in though to keep things organized. I'll look into it next week and supply another patch if the same principle applies.
Greetings,
Timon