mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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: 39fc503036312e38ff0b9d8fb90b4c929b5ca7df)
Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
b79fbd4a0f
commit
9980bf64cc
@@ -112,18 +112,22 @@ IMAGE_CMD:btrfs () {
|
||||
}
|
||||
|
||||
oe_mksquashfs () {
|
||||
local comp=$1
|
||||
local suffix=$2
|
||||
local comp=$1; shift
|
||||
local extra_imagecmd=$@
|
||||
|
||||
if [ "$comp" = "zstd" ]; then
|
||||
suffix="zst"
|
||||
fi
|
||||
|
||||
# Use the bitbake reproducible timestamp instead of the hardcoded squashfs one
|
||||
export SOURCE_DATE_EPOCH=$(stat -c '%Y' ${IMAGE_ROOTFS})
|
||||
mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs${comp:+-}${suffix:-$comp} ${EXTRA_IMAGECMD} -noappend ${comp:+-comp }$comp
|
||||
mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs${comp:+-}${suffix:-$comp} -noappend ${comp:+-comp }$comp $extra_imagecmd
|
||||
}
|
||||
IMAGE_CMD:squashfs = "oe_mksquashfs"
|
||||
IMAGE_CMD:squashfs-xz = "oe_mksquashfs xz"
|
||||
IMAGE_CMD:squashfs-lzo = "oe_mksquashfs lzo"
|
||||
IMAGE_CMD:squashfs-lz4 = "oe_mksquashfs lz4"
|
||||
IMAGE_CMD:squashfs-zst = "oe_mksquashfs zstd zst"
|
||||
IMAGE_CMD:squashfs = "oe_mksquashfs '' ${EXTRA_IMAGECMD}"
|
||||
IMAGE_CMD:squashfs-xz = "oe_mksquashfs xz ${EXTRA_IMAGECMD}"
|
||||
IMAGE_CMD:squashfs-lzo = "oe_mksquashfs lzo ${EXTRA_IMAGECMD}"
|
||||
IMAGE_CMD:squashfs-lz4 = "oe_mksquashfs lz4 ${EXTRA_IMAGECMD}"
|
||||
IMAGE_CMD:squashfs-zst = "oe_mksquashfs zstd ${EXTRA_IMAGECMD}"
|
||||
|
||||
IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs ${IMAGE_ROOTFS}"
|
||||
IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}"
|
||||
|
||||
Reference in New Issue
Block a user