mirror of
https://github.com/Tomas-M/linux-live.git
synced 2025-10-14 02:59:53 +08:00
add bcj x86 filter to mksquashfs calls to make smaller modules
This commit is contained in:
@@ -11,10 +11,10 @@ where 'sb' means 'slax bundle'.
|
||||
|
||||
How to create bundle:
|
||||
|
||||
# mksquashfs bundle_rootfs wholefs.sb -comp xz -bs 512k
|
||||
# mksquashfs bundle_rootfs wholefs.sb -comp xz -bs 1024k -Xbcj x86
|
||||
|
||||
or
|
||||
# mksquashfs /usr /usr.sb --keep-as-directory -comp xz -bs 512k
|
||||
# mksquashfs /usr /usr.sb --keep-as-directory -comp xz -bs 1024k -Xbcj x86
|
||||
|
||||
or use function in livekitlib:
|
||||
# . livekitlib; make_bundle bundle_rootfs wholefs.sb
|
||||
|
@@ -44,7 +44,7 @@ fi
|
||||
if [ "$P2" = "" ]; then
|
||||
TARGET="$P1".sb
|
||||
while [ -e "$TARGET" ]; do TARGET="$TARGET"x; done
|
||||
mksquashfs "$P1" "$TARGET" -comp xz -b 1024K -always-use-fragments $KEEP >/dev/null || exit 3
|
||||
mksquashfs "$P1" "$TARGET" -comp xz -b 1024K -Xbcj x86 -always-use-fragments $KEEP >/dev/null || exit 3
|
||||
umount "$P1" 2>/dev/null
|
||||
rm -Rf "$P1"
|
||||
mv "$TARGET" "$P1"
|
||||
@@ -54,5 +54,5 @@ else
|
||||
exit 4
|
||||
fi
|
||||
|
||||
mksquashfs "$P1" "$P2" -comp xz -b 1024K -always-use-fragments $KEEP >/dev/null
|
||||
mksquashfs "$P1" "$P2" -comp xz -b 1024K -Xbcj x86 -always-use-fragments $KEEP >/dev/null
|
||||
fi
|
||||
|
@@ -51,7 +51,7 @@ done
|
||||
|
||||
cd $CWD
|
||||
|
||||
mksquashfs $TMP "$1" -comp xz -b 1024K -always-use-fragments -noappend
|
||||
mksquashfs $TMP "$1" -comp xz -b 1024K -Xbcj x86 -always-use-fragments -noappend
|
||||
|
||||
umount $TMP
|
||||
rmdir $TMP
|
||||
|
@@ -44,7 +44,7 @@ fi
|
||||
if [ "$P2" = "" ]; then
|
||||
TARGET="$P1".sb
|
||||
while [ -e "$TARGET" ]; do TARGET="$TARGET"x; done
|
||||
mksquashfs "$P1" "$TARGET" -comp xz -b 1024K -always-use-fragments $KEEP >/dev/null || exit 3
|
||||
mksquashfs "$P1" "$TARGET" -comp xz -b 1024K -Xbcj x86 -always-use-fragments $KEEP >/dev/null || exit 3
|
||||
umount "$P1" 2>/dev/null
|
||||
rm -Rf "$P1"
|
||||
mv "$TARGET" "$P1"
|
||||
@@ -54,5 +54,5 @@ else
|
||||
exit 4
|
||||
fi
|
||||
|
||||
mksquashfs "$P1" "$P2" -comp xz -b 1024K -always-use-fragments $KEEP >/dev/null
|
||||
mksquashfs "$P1" "$P2" -comp xz -b 1024K -Xbcj x86 -always-use-fragments $KEEP >/dev/null
|
||||
fi
|
||||
|
@@ -51,7 +51,7 @@ done
|
||||
|
||||
cd $CWD
|
||||
|
||||
mksquashfs $TMP "$1" -comp xz -b 1024K -always-use-fragments -noappend
|
||||
mksquashfs $TMP "$1" -comp xz -b 1024K -Xbcj x86 -always-use-fragments -noappend
|
||||
|
||||
umount $TMP
|
||||
rmdir $TMP
|
||||
|
2
build
2
build
@@ -69,7 +69,7 @@ for i in $MKMOD; do
|
||||
fi
|
||||
done
|
||||
if [ "$SKIPCOREMOD" = "" ]; then
|
||||
mksquashfs $COREFS $LIVEKITDATA/$LIVEKITNAME/01-core.$BEXT -comp xz -b 1024K -always-use-fragments -keep-as-directory || exit
|
||||
mksquashfs $COREFS $LIVEKITDATA/$LIVEKITNAME/01-core.$BEXT -comp xz -b 1024K -Xbcj x86 -always-use-fragments -keep-as-directory || exit
|
||||
fi
|
||||
|
||||
cd "$LIVEKITDATA"
|
||||
|
@@ -118,7 +118,7 @@ create_bundle()
|
||||
{
|
||||
debug_log "create_module" "$*"
|
||||
rm -f "$2" # overwrite, never append to existing file
|
||||
mksquashfs "$1" "$2" -comp xz -b 1024K -always-use-fragments $3 $4 $5 $6 $7 $8 $9>/dev/null
|
||||
mksquashfs "$1" "$2" -comp xz -b 1024K -Xbcj x86 -always-use-fragments $3 $4 $5 $6 $7 $8 $9>/dev/null
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user