Skip to content

Commit 13eeb46

Browse files
Fix SquashFS options in profiledef.sh for better compression and add verification step in build.yaml
1 parent c641706 commit 13eeb46

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ jobs:
8585
rm -rf workdir/ out/
8686
mkdir -p out/
8787
88+
# Fix the profiledef.sh file to ensure correct SquashFS options
89+
sed -i 's/-threads/-Xcompression-threads/' profiledef.sh || true
90+
91+
# Verify SquashFS options
92+
echo '=== Checking SquashFS options in profiledef.sh ==='
93+
grep 'airootfs_image_tool_options' profiledef.sh
94+
8895
# Build the ISO with verbose output
8996
mkarchiso -v -w workdir/ -o out/ . 2>&1 | tee build.log || {
9097
echo '::error::ISO build failed!'

profiledef.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
1414
arch="x86_64"
1515
pacman_conf="pacman.conf"
1616
airootfs_image_type="squashfs"
17-
# Use better compression options based on available CPU cores
17+
# Use better compression options correctly formatted for mksquashfs
1818
if [ "$(nproc)" -gt 2 ]; then
19-
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M' '-threads' "$(nproc)")
19+
# For multi-core systems: use XZ with bcj x86 filter and multi-threaded compression
20+
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M' '-Xcompression-level' '9')
2021
else
22+
# For single/dual-core systems: use faster but less effective compression
2123
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
2224
fi
2325
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')

0 commit comments

Comments
 (0)