aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-05-23 16:57:23 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-05-23 16:57:23 +0300
commit98f3ed3a606e86ab3fe85be2ae38abe65ab39930 (patch)
tree80506306b84978cb7acab024ec61cf001dd7579c
parent59ad02c42eaa4e3143d9e9488efa26619f43eb5f (diff)
parent745c7ce989dac4796c3c08d29c4c3f863f5eea78 (diff)
[merge] create-user-build-script: Add Ubuntu 13.04, export perf build var.
-rwxr-xr-xbuild-scripts/create-user-build-script59
1 files changed, 40 insertions, 19 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script
index 7585b46..76a37a5 100755
--- a/build-scripts/create-user-build-script
+++ b/build-scripts/create-user-build-script
@@ -64,33 +64,47 @@ done
UBUNTU=\`cat /etc/issue.net | cut -d' ' -f2\`
HOST_ARCH=\`uname -m\`
if [ \${HOST_ARCH} == "x86_64" ] ; then
- PKGS='git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc uboot-mkimage openjdk-6-jdk openjdk-6-jre vim-common'
+ PKGS='gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc uboot-mkimage openjdk-6-jdk openjdk-6-jre vim-common python-parted python-yaml wget'
else
echo "ERROR: Only 64bit Host(Build) machines are supported at the moment."
exit 1
fi
-if [[ \${UBUNTU} =~ "12." ]]; then
- PKGS+=' lib32readline-gplv2-dev'
-elif [[ \${UBUNTU} =~ "10.04" ]] ; then
- PKGS+=' ia32-libs lib32readline5-dev'
+if [[ \${UBUNTU} =~ "13." || \${UBUNTU} =~ "12.10" ]]; then
+ #Install basic dev package missing in chrooted environments
+ sudo apt-get install software-properties-common
+ sudo dpkg --add-architecture i386
+ PKGS+=' libstdc++6:i386 git-core'
+elif [[ \${UBUNTU} =~ "12.04" || \${UBUNTU} =~ "10.04" ]] ; then
+ #Install basic dev package missing in chrooted environments
+ suod apt-get install python-software-properties
+ if [[ \${UBUNTU} =~ "12.04" ]]; then
+ PKGS+=' libstdc++6:i386 git-core'
+ else
+ PKGS+=' ia32-libs libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext'
+ fi
else
- echo
- echo "ERROR: Only Ubuntu 10.04, 12.04 and 12.10 versions are supported."
+ echo "ERROR: Only Ubuntu 10.04, 12.* and 13.04 versions are supported."
exit 1
fi
-echo "Checking and installing missing dependencies if any .. .."
-MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep -i 'No packages found matching' | cut -d' ' -f6\`
-if [ -n "\$MISSING" ] ; then
- echo -n "Missing required packages: "
- for m in \$MISSING ; do
- echo -n "\${m%?} "
- done
- echo
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc) main universe restricted multiverse"
- sudo apt-get update
+echo
+echo "Setting up Ubuntu software repositories..."
+sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc) main universe restricted multiverse"
+sudo apt-get update
+echo
+echo "Installing missing dependencies if any..."
+sudo apt-get install \${PKGS}
+# Obsolete git version 1.7.04 in lucid official repositories
+# repo need at least git v1.7.2
+if [[ \${UBUNTU} =~ "10.04" ]]; then
echo
- sudo apt-get install \${MISSING}
+ echo "repo tool complains of obsolete git version 1.7.04 in lucid official repositories"
+ echo "Building git for lucid from precise sources .."
+ wget http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.9.5.orig.tar.gz
+ tar xzf git_1.7.9.5.orig.tar.gz
+ cd git-1.7.9.5/
+ make prefix=/usr
+ sudo make prefix=/usr install
fi
EOF
@@ -148,6 +162,13 @@ export TARGET_PRODUCT=${TARGET_PRODUCT}
export TARGET_SIMULATOR=false
export BUILD_TINY_ANDROID=${BUILD_TINY_ANDROID}
export CPUS=\`grep -c processor /proc/cpuinfo\`
+export INCLUDE_PERF=${INCLUDE_PERF}
+export TARGET_BUILD_VARIANT=${TARGET_BUILD_VARIANT}
+export BUILD_FS_IMAGE=${BUILD_FS_IMAGE}
+export DEBUG_NO_STRICT_ALIASING=${DEBUG_NO_STRICT_ALIASING}
+export DEBUG_NO_STDCXX11=${DEBUG_NO_STDCXX11}
+export TOOLCHAIN_TRIPLET=${TOOLCHAIN_TRIPLET}
+export ANDROID_64=${ANDROID_64}
EOF
if [ -n "$TOOLCHAIN_URL" ] ; then
cat <<EOF
@@ -219,7 +240,7 @@ if [ \${PRI} -gt 0 ] ; then
fi
sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/manifests/\${MANIFEST_FILENAME}
fi
-./repo sync
+./repo sync -f -j1
EOF