improve squashfs compression

pull/65/head
TomasM 2019-01-29 11:51:40 +00:00
parent ca41faea5b
commit 76e0c973c0
4 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ fi
if [ "$P2" = "" ]; then if [ "$P2" = "" ]; then
TARGET="$P1".sb TARGET="$P1".sb
while [ -e "$TARGET" ]; do TARGET="$TARGET"x; done while [ -e "$TARGET" ]; do TARGET="$TARGET"x; done
mksquashfs "$P1" "$TARGET" -comp xz -b 512K $KEEP >/dev/null || exit 3 mksquashfs "$P1" "$TARGET" -comp xz -b 1024K -always-use-fragments $KEEP >/dev/null || exit 3
umount "$P1" 2>/dev/null umount "$P1" 2>/dev/null
rm -Rf "$P1" rm -Rf "$P1"
mv "$TARGET" "$P1" mv "$TARGET" "$P1"
@ -54,5 +54,5 @@ else
exit 4 exit 4
fi fi
mksquashfs "$P1" "$P2" -comp xz -b 512K $KEEP >/dev/null mksquashfs "$P1" "$P2" -comp xz -b 1024K -always-use-fragments $KEEP >/dev/null
fi fi

View File

@ -40,7 +40,7 @@ done
cd $CWD cd $CWD
mksquashfs $TMP "$1" -comp xz -b 512k -noappend mksquashfs $TMP "$1" -comp xz -b 1024K -always-use-fragments -noappend
umount $TMP umount $TMP
rmdir $TMP rmdir $TMP

2
build
View File

@ -61,7 +61,7 @@ for i in $MKMOD; do
COREFS="$COREFS /$i" COREFS="$COREFS /$i"
fi fi
done done
mksquashfs $COREFS $LIVEKITDATA/$LIVEKITNAME/01-core.$BEXT -comp xz -b 512k -keep-as-directory || exit mksquashfs $COREFS $LIVEKITDATA/$LIVEKITNAME/01-core.$BEXT -comp xz -b 1024K -always-use-fragments -keep-as-directory || exit
cd "$LIVEKITDATA" cd "$LIVEKITDATA"
ARCH=$(uname -m) ARCH=$(uname -m)

View File

@ -118,7 +118,7 @@ create_bundle()
{ {
debug_log "create_module" "$*" debug_log "create_module" "$*"
rm -f "$2" # overwrite, never append to existing file rm -f "$2" # overwrite, never append to existing file
mksquashfs "$1" "$2" -comp xz -b 512K $3 $4 $5 $6 $7 $8 $9>/dev/null mksquashfs "$1" "$2" -comp xz -b 1024K -always-use-fragments $3 $4 $5 $6 $7 $8 $9>/dev/null
} }