summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/image_types.bbclass
diff options
context:
space:
mode:
authorMartin Hundeb?ll <martin@geanix.com>2024-05-06 14:24:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-09 09:48:58 +0100
commit70a857b8f3fd3e9b95b903e8313d0014a6ff8c96 (patch)
tree033014af39d1596cbd03638df5024fce6d5be889 /meta/classes-recipe/image_types.bbclass
parentd0f677d1e3bc47efe22f6d69176d9a31b5287931 (diff)
downloadpoky-70a857b8f3fd3e9b95b903e8313d0014a6ff8c96.tar.gz
classes: image_types: apply EXTRA_IMAGECMD:squashfs* in oe_mksquashfs()
Since commit c991f9d6031 ("image_types: Set SOURCE_DATE_EPOCH for squashfs"), I assume, the EXTRA_IMAGECMD:squashfs* variable(s) has been ignored. This is due to the override magic, which isn't applied to functions called by IMAGE_CMD:<type>, but only to the IMAGE_CMD:<type> itself. Other image types (e.g. ext*) works around this by passing the EXTRA_IMAGECMD variable as an argument to the called function. To do the same for oe_mksquashfs(), the number of mandatory arguments is fixed to one (with a little logic to handle the zstd filename). This allows passing ${EXTRA_IMAGECMD} as an argument to oe_mksquashfs(), which makes the variable functional again. (From OE-Core rev: e6c1e3a65c3672473dcd01e4a950f89b70121d6b) Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/image_types.bbclass')
-rw-r--r--meta/classes-recipe/image_types.bbclass20
1 files changed, 12 insertions, 8 deletions
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass
index 913cb8788c..b4a83ae284 100644
--- a/meta/classes-recipe/image_types.bbclass
+++ b/meta/classes-recipe/image_types.bbclass
@@ -112,18 +112,22 @@ IMAGE_CMD:btrfs () {
112} 112}
113 113
114oe_mksquashfs () { 114oe_mksquashfs () {
115 local comp=$1 115 local comp=$1; shift
116 local suffix=$2 116 local extra_imagecmd=$@
117
118 if [ "$comp" = "zstd" ]; then
119 suffix="zst"
120 fi
117 121
118 # Use the bitbake reproducible timestamp instead of the hardcoded squashfs one 122 # Use the bitbake reproducible timestamp instead of the hardcoded squashfs one
119 export SOURCE_DATE_EPOCH=$(stat -c '%Y' ${IMAGE_ROOTFS}) 123 export SOURCE_DATE_EPOCH=$(stat -c '%Y' ${IMAGE_ROOTFS})
120 mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs${comp:+-}${suffix:-$comp} ${EXTRA_IMAGECMD} -noappend ${comp:+-comp }$comp 124 mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs${comp:+-}${suffix:-$comp} -noappend ${comp:+-comp }$comp $extra_imagecmd
121} 125}
122IMAGE_CMD:squashfs = "oe_mksquashfs" 126IMAGE_CMD:squashfs = "oe_mksquashfs '' ${EXTRA_IMAGECMD}"
123IMAGE_CMD:squashfs-xz = "oe_mksquashfs xz" 127IMAGE_CMD:squashfs-xz = "oe_mksquashfs xz ${EXTRA_IMAGECMD}"
124IMAGE_CMD:squashfs-lzo = "oe_mksquashfs lzo" 128IMAGE_CMD:squashfs-lzo = "oe_mksquashfs lzo ${EXTRA_IMAGECMD}"
125IMAGE_CMD:squashfs-lz4 = "oe_mksquashfs lz4" 129IMAGE_CMD:squashfs-lz4 = "oe_mksquashfs lz4 ${EXTRA_IMAGECMD}"
126IMAGE_CMD:squashfs-zst = "oe_mksquashfs zstd zst" 130IMAGE_CMD:squashfs-zst = "oe_mksquashfs zstd ${EXTRA_IMAGECMD}"
127 131
128IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs ${IMAGE_ROOTFS}" 132IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs ${IMAGE_ROOTFS}"
129IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}" 133IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}"