From: Daniel Cordero <catal...@0xdc.io>

sys-fs/squashfs-tools-ng is keyworded as unstable. Stable squashfs users
can still use mksquashfs to create the squashed image.

Fixes: 23e9ea10 "targets: Use gensquashfs instead of mksquashfs"

Signed-off-by: Daniel Cordero <catal...@0xdc.io>
---

I have not fixed targets/embedded/fs-runscript.sh from the referenced
commit.


 targets/support/target_image_setup.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/targets/support/target_image_setup.sh 
b/targets/support/target_image_setup.sh
index fdc4a234..23150f13 100755
--- a/targets/support/target_image_setup.sh
+++ b/targets/support/target_image_setup.sh
@@ -7,8 +7,13 @@ mkdir -p "${1}"
 echo "Creating ${clst_fstype} filesystem"
 case ${clst_fstype} in
        squashfs)
-               gensquashfs -D "${clst_destpath}" -q ${clst_fsops} 
"${1}/image.squashfs" \
-                       || die "Failed to create squashfs filesystem"
+               if command -v mksquashfs; then
+                       mksquashfs "${clst_destpath}" "$1/image.squashfs" 
${clst_fsops} -noappend \
+                               || die "mksquashfs failed"
+               else
+                       gensquashfs -D "${clst_destpath}" -q ${clst_fsops} 
"${1}/image.squashfs" \
+                               || die "Failed to create squashfs filesystem"
+               fi
        ;;
        jffs2)
                mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" 
"${clst_fsops}" \
-- 
2.26.2


Reply via email to