summaryrefslogtreecommitdiffstats
path: root/tools/squisher
diff options
context:
space:
mode:
authorChris Cosby <cosbyc@cisco.com>2010-07-15 15:44:43 -0400
committerSteve Kondik <shade@chemlab.org>2010-07-16 16:38:37 -0400
commit95bc01d57102df4708e328f4ceb9066e325fc2e6 (patch)
treee06a55f38cfe7466149b512f091f024453d3aebd /tools/squisher
parent434f6a27b9f59c97b8f70e12bb66a4e1b75277b0 (diff)
downloadvendor_replicant-95bc01d57102df4708e328f4ceb9066e325fc2e6.zip
vendor_replicant-95bc01d57102df4708e328f4ceb9066e325fc2e6.tar.gz
vendor_replicant-95bc01d57102df4708e328f4ceb9066e325fc2e6.tar.bz2
Force mksquasfs to version 4 (required for kernel-of-the-moment).
squisher will now fail the build instead of failing runtime on Dream/Sapphire.
Diffstat (limited to 'tools/squisher')
-rwxr-xr-xtools/squisher15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/squisher b/tools/squisher
index 57498c4..063b8e0 100755
--- a/tools/squisher
+++ b/tools/squisher
@@ -24,7 +24,15 @@ XBIN=$OUT/system/xbin
OPTICHARGER=$ANDROID_BUILD_TOP/vendor/cyanogen/tools/opticharger
QUIET=-q
DELETE_BINS="applypatch applypatch_static check_prereq recovery updater"
-[ -z "$NO_SQUASHFS" -a `which mksquashfs` = "" ] && NO_SQUASHFS=true
+if [ -z "$NO_SQUASHFS" -a `which mksquashfs` = "" ]; then
+ NO_SQUASHFS=true
+else
+ if mksquashfs -version | grep -q 'version 4'; then :; else
+ echo "mksquashfs must be at least version 4 for this build"
+ exit 1
+ fi
+
+fi
WORK=/tmp/repack
rm -rf $WORK
@@ -34,11 +42,10 @@ if [ "$TARGET_PRODUCT" = "cyanogen_dream_sapphire" ]
then
# Create the xbin squashfs
cp -a $XBIN $WORK/xbin/
- chown -R 1000:1000 $WORK/xbin/*
chmod -R 755 $WORK/xbin/*
- rm $WORK/xbin/su
+ rm -f $WORK/xbin/su
ln -s $WORK/bin/su $WORK/xbin/su
- mksquashfs $WORK/xbin/* $WORK/xbin.sqf
+ mksquashfs $WORK/xbin/* $WORK/xbin.sqf -force-uid 1000 -force-gid 1000
fi
# Unpack the otapackage and opticharge all apks