1 |
From: Daniel Cordero <catalyst@××××.io> |
2 |
|
3 |
Users using catalyst outside of the portage tree, or on other |
4 |
distributions, may not have the gensquashfs tool. mksquashfs still |
5 |
creates compatible squashfs images for this purpose. |
6 |
|
7 |
Signed-off-by: Daniel Cordero <catalyst@××××.io> |
8 |
--- |
9 |
targets/support/target_image_setup.sh | 9 +++++++-- |
10 |
1 file changed, 7 insertions(+), 2 deletions(-) |
11 |
|
12 |
diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh |
13 |
index f9427eaf..045b80b3 100755 |
14 |
--- a/targets/support/target_image_setup.sh |
15 |
+++ b/targets/support/target_image_setup.sh |
16 |
@@ -7,8 +7,13 @@ mkdir -p "${1}" |
17 |
echo "Creating ${clst_fstype} filesystem" |
18 |
case ${clst_fstype} in |
19 |
squashfs) |
20 |
- gensquashfs -D "${clst_stage_path}" -q ${clst_fsops} "${1}/image.squashfs" \ |
21 |
- || die "Failed to create squashfs filesystem" |
22 |
+ if command -v mksquashfs; then |
23 |
+ mksquashfs "${clst_stage_path}" "${1}/image.squashfs" ${clst_fsops} -noappend \ |
24 |
+ || die "mksquashfs failed" |
25 |
+ else |
26 |
+ gensquashfs -D "${clst_stage_path}" -q ${clst_fsops} "${1}/image.squashfs" \ |
27 |
+ || die "Failed to create squashfs filesystem" |
28 |
+ fi |
29 |
;; |
30 |
jffs2) |
31 |
mkfs.jffs2 --root="${clst_stage_path}" --output="${1}/image.jffs" "${clst_fsops}" \ |
32 |
-- |
33 |
2.26.2 |