From 8ac3ad1c206ffea37fb24d678951505a2b289aa4 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 2 Mar 2015 10:16:08 +0000 Subject: Add 'shrink' configure extension Just a bit of a hack to reduce image sizes, in the absence of debug stripping. --- shrink.configure | 26 ++++++++++++++++++++++++++ systems/build-system-armv7lhf-jetson.morph | 1 + 2 files changed, 27 insertions(+) create mode 100644 shrink.configure diff --git a/shrink.configure b/shrink.configure new file mode 100644 index 00000000..6574f651 --- /dev/null +++ b/shrink.configure @@ -0,0 +1,26 @@ +# Shrink images a bit. + +# If you're not deploying on ARM, you need to have a cross 'strip' available... +# you can use the armv7lhf-cross-toolchain stratum. +STRIP=arm-none-eabi-strip + +root=$1 + +gcc_libexec=$1/usr/libexec/gcc/armv7-unknown-linux-gnueabihf/4.9.2/ +# Just delete Fortan +rm $gcc_libexec/f951 + +$STRIP $gcc_libexec/cc1 +$STRIP $gcc_libexec/cc1plus +$STRIP $gcc_libexec/collect2 +$STRIP $gcc_libexec/lto1 +$STRIP $gcc_libexec/plugins/gengtype + +$STRIP $1/usr/libexec/git-core +$STRIP $1/bin/* +$STRIP $1/usr/bin/* +$STRIP $1/lib/*.so +$STRIP $1/usr/lib/*.so + +rm -R $1/usr/share/doc +rm -R $1/usr/share/man diff --git a/systems/build-system-armv7lhf-jetson.morph b/systems/build-system-armv7lhf-jetson.morph index cc4c9bf9..c8c3d02b 100644 --- a/systems/build-system-armv7lhf-jetson.morph +++ b/systems/build-system-armv7lhf-jetson.morph @@ -38,3 +38,4 @@ configuration-extensions: - fstab - mason - cloud-init +- shrink -- cgit v1.2.1