OSDN Git Service

mksquashfsimage.sh: Make disable-4k-align a paramter
authorMohamad Ayyash <mkayyash@google.com>
Wed, 15 Jun 2016 22:53:55 +0000 (15:53 -0700)
committerMohamad Ayyash <mkayyash@google.com>
Wed, 15 Jun 2016 22:53:55 +0000 (15:53 -0700)
BUG: 29388879
Change-Id: I6ede2273419ba986d08decc0540741c54ed736b1
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
squashfs_utils/mksquashfsimage.sh

index 05ca4e0..5f45a64 100755 (executable)
@@ -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_MAP_FILE] [-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_MAP_FILE] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] [-a ]
 EOT
 }
 
@@ -79,6 +79,12 @@ if [[ "$1" == "-zo" ]]; then
     shift; shift
 fi
 
+DISABLE_4K_ALIGN=false
+if [[ "$1" == "-a" ]]; then
+    DISABLE_4K_ALIGN=true
+    shift;
+fi
+
 OPT=""
 if [ -n "$MOUNT_POINT" ]; then
   OPT="$OPT -mount-point $MOUNT_POINT"
@@ -98,6 +104,9 @@ fi
 if [ -n "$BLOCK_SIZE" ]; then
   OPT="$OPT -b $BLOCK_SIZE"
 fi
+if [ "$DISABLE_4K_ALIGN" = true ]; then
+  OPT="$OPT -disable-4k-align"
+fi
 
 MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR/ $OUTPUT_FILE -no-progress -comp $COMPRESSOR $COMPRESSOR_OPT -no-exports -noappend -no-recovery -no-fragments -no-duplicates -android-fs-config $OPT"
 echo $MAKE_SQUASHFS_CMD