aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2014-04-22 19:06:56 +1200
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2014-04-22 19:06:56 +1200
commitc6e15d65878fb2e8395fa0144292659d34f465df (patch)
tree7d3dcfcf0b2c2bc693b0256599f0587677a2c40f
parentdd22baebf0b08fc5ea27dc202c5725060dc94c86 (diff)
Add install support (including building SPEC tools) for SPEC2006
-rwxr-xr-xspec2xxx-install49
1 files changed, 38 insertions, 11 deletions
diff --git a/spec2xxx-install b/spec2xxx-install
index 8449a95..aca542a 100755
--- a/spec2xxx-install
+++ b/spec2xxx-install
@@ -10,6 +10,15 @@ target=$TARGET
spec=$SPEC
tar=$1
+case "$tar" in
+ *"cpu2000"*|*"CPU2000"*) specver="cpu2000" ;;
+ *"cpu2006"*|*"CPU2006"*) specver="cpu2006" ;;
+ *)
+ echo UNKNOWN SPEC VERSION TAR: $tar
+ exit 1
+ ;;
+esac
+
if [ "$host" != "$target" ]; then
local=false
else
@@ -34,32 +43,50 @@ cat $tar | ssh $target "cd $spec && tar --strip-components=1 -xJ && chmod -R +w
install_env=""
case "$(ssh $target uname -p)" in
- "x86_64") arch=linux-glibc22-x86_64 ;;
+ "x86_64")
+ case "$specver" in
+ "cpu2000") arch=linux-glibc22-x86_64 ;;
+ "cpu2006") arch=linux-suse101-AMD64 ;;
+ esac
+ ;;
"ia32") arch=linux-redhat62-ia32 ;;
"armv7l")
- cat $(dirname $0)/armv7l-linux-122.tar.bz2 | ssh $target "cd $spec && tar -xj && chmod -R +w ./"
+ case "$specver" in
+ "cpu2000") cat $(dirname $0)/armv7l-linux-122.tar.bz2 | ssh $target "cd $spec && tar -xj && chmod -R +w ./" ;;
+ "cpu2006") cat $(dirname $0)/armv7l-linux-111.tar | ssh $target "cd $spec && tar -x && chmod -R +w ./" ;;
+ esac
+
arch=armv7l-linux
;;
*)
# Build tools
- arch=yes
+ arch="$(ssh $target uname -p)-linux"
# Make sure bash is used for building perl
echo "/bin/bash \$@" > $spec/bin/sh
chmod +x $spec/bin/sh
# Patch up perl sources
- sed -i -e "s#command line#command\.line#" $spec/tools/src/perl-5.8.7/makedepend.SH
- sed -i -e "/asm\/page.h/d" $spec/tools/src/perl-5.8.7/ext/IPC/SysV/SysV.xs
+ case "$specver" in
+ "cpu2000") perl=$spec/tools/src/perl-5.8.7 ;;
+ "cpu2006") perl=$spec/tools/src/perl-5.8.8 ;;
+ esac
+ sed -i -e "s#command line#command\.line#" $perl/makedepend.SH
+ sed -i -e "/asm\/page.h/d" $perl/ext/IPC/SysV/SysV.xs
- install_env="PATH=$spec/bin:\$PATH PERLFLAGS='-A libs=-lm -A libs=-ldl'"
+ libpth=$(ssh $target find /usr -name libm.so | sed -e "s#/libm.so##")
+
+ ssh $target "cd $spec && PATH=$spec/bin:\$PATH PERLFLAGS='-A libs=-lm -A libs=-ldl -Dlibpth=$libpth' $spec/tools/src/buildtools && . shrc && packagetools $arch"
+
+ rm $spec/bin/sh
+
+ cp $spec/$arch-*.tar* $(dirname $0)/
;;
esac
-ssh $target "cd $spec && echo $arch | $install_env ./install.sh"
-
-if [ "$arch" == "yes" ]; then
- rm $spec/bin/sh
-fi
+case "$specver" in
+ "cpu2000") ssh $target "cd $spec && ./install.sh $arch" ;;
+ "cpu2006") ssh $target "cd $spec && ./install.sh -f -u $arch" ;;
+esac
$local || fusermount -uz $spec