diff --git a/target/share/squashfs/build.sh b/target/share/squashfs/build.sh index d5b21b9..7cb1d55 100644 --- a/target/share/squashfs/build.sh +++ b/target/share/squashfs/build.sh @@ -139,6 +139,6 @@ done echo_status "Expanded size: $( du -sh "$rootfs" | cut -f1)." echo_status "Creating ${rootfs#$base/}.sqx ..." -( mksquashfs $rootfs $image -comp gzip ) +( mksquashfs $rootfs $image -comp $SDECFG_IMAGE_SQUASHFS_COMP ) echo_status "Image size: $( du -sh "$rootfs.sqx" | cut -f1)." diff --git a/target/share/squashfs/config.in b/target/share/squashfs/config.in new file mode 100644 index 0000000..5da04ff --- /dev/null +++ b/target/share/squashfs/config.in @@ -0,0 +1,31 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: target/share/squashfs/config.in +# Copyright (C) 2011 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +complist= +compdefault= + +# generate a list of available compressors and choose the default +for compressor in gzip lzo xz; do + if pkgcheck "$compressor" X ; then + var_append complist ' ' "$compressor Create_${compressor}_compressed_SquashFS" + compdefault="$compressor" + fi +done + +if [ ! -z "$complist" ]; then + choice SDECFG_IMAGE_SQUASHFS_COMP $compdefault $complist +fi + +unset complist +unset compdefault