diff options
author | Mohamad Ayyash <mkayyash@google.com> | 2016-06-06 15:37:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-06-06 15:37:44 +0000 |
commit | f6b999e7c8153c7f0615f302b2010c5510efe6f3 (patch) | |
tree | b9dffd53e8dd0df5f58305ad4ab966abc55e4f45 | |
parent | 319c10a631845898c19141d27f21fc4d918839eb (diff) | |
parent | 921ef8f6dc103d5a7fffeffd659506ee5a4aec58 (diff) | |
download | extras-f6b999e7c8153c7f0615f302b2010c5510efe6f3.tar.gz |
Merge "Introduce squashfs compression threshold" into nyc-mr1-dev
-rwxr-xr-x | squashfs_utils/mksquashfsimage.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/squashfs_utils/mksquashfsimage.sh b/squashfs_utils/mksquashfsimage.sh index 0079f6ef..9dae51b8 100755 --- a/squashfs_utils/mksquashfsimage.sh +++ b/squashfs_utils/mksquashfsimage.sh @@ -5,7 +5,7 @@ function usage() { cat<<EOT Usage: -${0##*/} SRC_DIR OUTPUT_FILE [-s] [-m MOUNT_POINT] [-d PRODUCT_OUT] [-C FS_CONFIG ] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] +${0##*/} SRC_DIR OUTPUT_FILE [-s] [-m MOUNT_POINT] [-d PRODUCT_OUT] [-C FS_CONFIG ] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] [-t COMPRESS_THRESHOLD] EOT } @@ -73,6 +73,13 @@ if [[ "$1" == "-zo" ]]; then shift; shift fi +COMPRESS_THRESHOLD=0 +if [[ "$1" == "-t" ]]; then + COMPRESS_THRESHOLD=$2 + shift; shift +fi + + OPT="" if [ -n "$MOUNT_POINT" ]; then OPT="$OPT -mount-point $MOUNT_POINT" @@ -89,6 +96,9 @@ fi if [ -n "$BLOCK_SIZE" ]; then OPT="$OPT -b $BLOCK_SIZE" fi +if [ -n "$COMPRESS_THRESHOLD" ]; then + OPT="$OPT -t $COMPRESS_THRESHOLD" +fi MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR/ $OUTPUT_FILE -no-progress -comp $COMPRESSOR $COMPRESSOR_OPT -no-exports -noappend -no-recovery -android-fs-config -no-fragments $OPT" echo $MAKE_SQUASHFS_CMD |