From 001b250dc962d7b13aa13d6e32b177b558fee084 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 13 Feb 2012 00:56:32 +0100 Subject: [PATCH] scripts/image: add support to choice the compression method for squashing the SYSTEM file Signed-off-by: Stephan Raue --- projects/ATV/options | 3 +++ projects/Fusion/options | 3 +++ projects/Generic/options | 3 +++ projects/Generic_OSS/options | 3 +++ projects/ION/options | 3 +++ projects/Intel/options | 3 +++ projects/Ultra/options | 3 +++ scripts/image | 7 +++++-- 8 files changed, 26 insertions(+), 2 deletions(-) diff --git a/projects/ATV/options b/projects/ATV/options index 36567f5739..115edb0ba0 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/projects/Fusion/options b/projects/Fusion/options index b06c45c4b6..57115788ed 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/projects/Generic/options b/projects/Generic/options index 173be2ffbe..2002b84dd3 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 101a051d12..56c380e130 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/projects/ION/options b/projects/ION/options index e76a8da5a4..117d43a77e 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/projects/Intel/options b/projects/Intel/options index 1e67c5427b..651d82b5ae 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/projects/Ultra/options b/projects/Ultra/options index 5e843cb426..1ff8f2cb66 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -107,6 +107,9 @@ # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + # Mediacenter to use (xbmc / no) if [ "$PVR" = yes ]; then MEDIACENTER="xbmc-pvr" diff --git a/scripts/image b/scripts/image index 59af405527..36c376a502 100755 --- a/scripts/image +++ b/scripts/image @@ -185,9 +185,12 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" fi # create squashfs file + if [ -z "$SQUASHFS_COMPRESSION" ]; then + SQUASHFS_COMPRESSION="gzip" + fi + echo "rm -rf $TARGET_IMG/$IMAGE_NAME.system" >> $FAKEROOT_SCRIPT -# echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$IMAGE_NAME.system -noappend -comp xz" >> $FAKEROOT_SCRIPT - echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$IMAGE_NAME.system -noappend" >> $FAKEROOT_SCRIPT + echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$IMAGE_NAME.system -noappend -comp $SQUASHFS_COMPRESSION" >> $FAKEROOT_SCRIPT # run fakeroot $ROOT/$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT