diff options
author | Mohan Srinivasan <srmohan@google.com> | 2016-07-26 15:10:29 -0700 |
---|---|---|
committer | Mohan Srinivasan <srmohan@google.com> | 2016-07-26 15:10:29 -0700 |
commit | eb717052b0e632e3338f09174efbf448942ef802 (patch) | |
tree | 06908d10bbac3779646f400752ca83029bcddd53 /squashfs_utils | |
parent | 28b3a27905b8ae50e4f03634faa75bb3b1565844 (diff) | |
download | extras-eb717052b0e632e3338f09174efbf448942ef802.tar.gz |
SquashFS whitelist support.
Support for specifying a (whole file) whitelist to mksquashfs, so that
frequently read in files will not be compressed.
Bug: 28605313
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Change-Id: I07c848266ed656b7df3daf7f0e3569f5c9012280
Diffstat (limited to 'squashfs_utils')
-rwxr-xr-x | squashfs_utils/mksquashfsimage.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/squashfs_utils/mksquashfsimage.sh b/squashfs_utils/mksquashfsimage.sh index 6a2ec1c7..83574157 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_MAP_FILE] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] [-t COMPRESS_THRESHOLD] [-a] +${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] [-t COMPRESS_THRESHOLD] [-w WHITELIST_FILE] [-a] EOT } @@ -85,6 +85,11 @@ if [[ "$1" == "-t" ]]; then shift; shift fi +WHITELIST_FILE= +if [[ "$1" == "-w" ]]; then + WHITELIST_FILE=$2 + shift; shift +fi DISABLE_4K_ALIGN=false if [[ "$1" == "-a" ]]; then @@ -117,6 +122,9 @@ fi if [ "$DISABLE_4K_ALIGN" = true ]; then OPT="$OPT -disable-4k-align" fi +if [ -n "$WHITELIST_FILE" ]; then + OPT="$OPT -whitelist $WHITELIST_FILE" +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 |