diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2014-11-12 21:35:00 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2014-11-12 21:35:00 +0530 |
commit | f7b8d4bace4b399a8cbb1aab326182eb5f0b1989 (patch) | |
tree | 9dd50f8d264c1ef24bf0c8cf50b96401b6f5ac94 | |
parent | b11ef94075b01a62012f4a7798c364ccad7651b7 (diff) | |
parent | 6fe0c360b8e53897a133c93f8d5bc3e589a0d551 (diff) |
Merge remote-tracking branch 'remotes/upstream/master'
-rw-r--r-- | build-scripts/build-android | 21 | ||||
-rw-r--r-- | build-scripts/build-android-toolchain-linaro | 2 | ||||
-rwxr-xr-x | build-scripts/create-user-build-script | 58 | ||||
-rw-r--r-- | build-scripts/helpers | 21 | ||||
-rwxr-xr-x | build-scripts/post-build-lava.py | 6 | ||||
-rwxr-xr-x | build-scripts/repo_project_info.py | 4 | ||||
-rwxr-xr-x | node/build | 2 | ||||
-rwxr-xr-x | node/prepare_build_config.py | 2 | ||||
-rwxr-xr-x | node/setup-build-android | 13 | ||||
-rwxr-xr-x | utils/manifest-descriptions/make.sh | 2 |
10 files changed, 98 insertions, 33 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android index 5b3a4b0..935beeb 100644 --- a/build-scripts/build-android +++ b/build-scripts/build-android @@ -25,8 +25,11 @@ source "${BUILD_SCRIPT_ROOT}"/helpers trap infrastructure_error ERR -# Set TARGET_OUT_DIR since few TARGET_PRODUCT include "full_" keyword as well -export TARGET_OUT_DIR=`echo $TARGET_PRODUCT | sed 's/_/\n/;s/.*\n//'` +if [ -z "${TARGET_OUT_DIR}" ]; then + # only set TARGET_OUT_DIR when it is not set + # Set TARGET_OUT_DIR since few TARGET_PRODUCT include "full_" keyword as well + export TARGET_OUT_DIR=`echo $TARGET_PRODUCT | sed 's/_/\n/;s/.*\n//'` +fi if [ -n "$BUILD_COPYCAT" ]; then @@ -61,6 +64,12 @@ else repo-sync-from-mirror "${1}" fi + if [ -n "$PATCHSETS" ]; then + git clone git://android.git.linaro.org/android-patchsets.git + for i in $PATCHSETS; do + sh ./android-patchsets/$i + done + fi if [ -n "$POST_CHECKOUT_HOOK" ]; then # if echo "$POST_CHECKOUT_HOOK" | grep -F / >/dev/null; then # echo "Invalid POST_CHECKOUT_HOOK: $POST_CHECKOUT_HOOK" @@ -73,6 +82,8 @@ else . build/envsetup.sh trap infrastructure_error ERR + [ -n "$LUNCH" ] && lunch "$LUNCH" + # We evaluate the configuration again because envsetup.sh might well # have stomped on some of the values in it. @@ -121,7 +132,7 @@ else cp $toolchain_filename fingerprints/ fi - if test -z "$TARGET_ARCH_VARIANT"; then + if test -z "$TARGET_ARCH_VARIANT" -a -z "$LUNCH"; then TARGET_ARCH_VARIANT=armv7-a-neon fi if test -z "$WITH_HOST_DALVIK"; then @@ -151,7 +162,7 @@ else trap - ERR export TIMEFORMAT="TIME: Compilation: %lR" - time $MAKE $MAKE_OPTS -j$MAKE_JOBS $MAKE_TARGETS $SHOWCOMMANDS WITH_HOST_DALVIK="$WITH_HOST_DALVIK" + time $MAKE $MAKE_OPTS -j$MAKE_JOBS $MAKE_TARGETS $SHOWCOMMANDS WITH_HOST_DALVIK="$WITH_HOST_DALVIK" USE_CLANG_PLATFORM_BUILD="$USE_CLANG_PLATFORM_BUILD" unset TIMEFORMAT trap infrastructure_error ERR @@ -189,7 +200,7 @@ elif [ -f "out/target/product/$TARGET_OUT_DIR/obj/kernel/.config" ]; then cp "out/target/product/$TARGET_OUT_DIR/obj/kernel/.config" out/kernel_config fi # Create md5sums file for platform artifacts -(cd out/target/product/*/; md5sum *.tar.bz2 *.img >MD5SUMS) || true +(cd out/target/product/${TARGET_OUT_DIR}/; md5sum *.tar.bz2 *.img >MD5SUMS) || true (cd out/; ${BUILD_SCRIPT_ROOT}/create-user-build-script) if [ -f out/kernel_config ]; then diff --git a/build-scripts/build-android-toolchain-linaro b/build-scripts/build-android-toolchain-linaro index 0d05216..d37ae49 100644 --- a/build-scripts/build-android-toolchain-linaro +++ b/build-scripts/build-android-toolchain-linaro @@ -91,6 +91,8 @@ if [ -n "$GCC_PATCH_URL" ]; then IFS="$ifs_save" fi +sudo update-java-alternatives --set java-1.7.0-openjdk-amd64 || true + mkdir -p objdir cd objdir diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script index ffafe0e..c7d5b04 100755 --- a/build-scripts/create-user-build-script +++ b/build-scripts/create-user-build-script @@ -30,11 +30,11 @@ header() set -e -EXACT=1 +EXACT=0 INTERACTIVE=1 DIR=android if [ -z "\${LINARO_ANDROID_ACCESS_ID}" ] ; then - LINARO_ANDROID_ACCESS_ID=default-bot + LINARO_ANDROID_ACCESS_ID=\${USER} fi SOURCE_OVERLAY_OPTIONAL=1 @@ -50,6 +50,7 @@ usage() echo " If in doubt, please contact Linaro Android mailing list for details" echo " Default: \${LINARO_ANDROID_ACCESS_ID}" echo " -y Assume answer 'YES' for all questions. Non-interactive mode. Requires -l" + echo " -h Will show this message." exit 1 } @@ -61,26 +62,30 @@ while getopts "${USAGE_OPTOVERLAY}d:l:hty" optn; do t ) EXACT=0;; y ) INTERACTIVE=0;; h ) usage; exit 1;; + \? ) usage; exit 1;; esac done -if [ "\${LINARO_ANDROID_ACCESS_ID}" == "default-bot" -a \${INTERACTIVE} -eq 0 ] ; then - usage -fi - UBUNTU=\`cat /etc/issue.net | cut -d' ' -f2\` HOST_ARCH=\`uname -m\` if [ \${HOST_ARCH} == "x86_64" ] ; then - 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 uuid-dev acpica-tools' + 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 vim-common python-parted python-yaml wget uuid-dev' else echo "ERROR: Only 64bit Host(Build) machines are supported at the moment." exit 1 fi -if [[ \${UBUNTU} =~ "13." || \${UBUNTU} =~ "12.10" ]]; then +if [[ \${UBUNTU} =~ "14.04" || \${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' + if [[ \${UBUNTU} =~ "14.04" ]]; then + PKGS+=' u-boot-tools bc acpica-tools' + elif [[ \${UBUNTU} =~ "13.10" ]]; then + PKGS+=' u-boot-tools bc iasl' + else + PKGS+=' uboot-mkimage acpica-tools' + fi elif [[ \${UBUNTU} =~ "12.04" || \${UBUNTU} =~ "10.04" ]] ; then #Install basic dev package missing in chrooted environments sudo apt-get install python-software-properties @@ -90,7 +95,7 @@ elif [[ \${UBUNTU} =~ "12.04" || \${UBUNTU} =~ "10.04" ]] ; then PKGS+=' ia32-libs libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext' fi else - echo "ERROR: Only Ubuntu 10.04, 12.* and 13.04 versions are supported." + echo "ERROR: Only Ubuntu 10.04, 12.*, 13.* and 14.04 versions are supported." exit 1 fi @@ -100,6 +105,21 @@ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc sudo add-apt-repository ppa:linaro-maintainers/tools sudo apt-get update echo +echo "Install OpenJDK v1.7?" +echo "*** If you are building AOSP master based builds then you should install OpenJDK v1.7. ***" +echo "*** But if you are building Android 4.4.4 or earlier Android releases then OpenJDK v1.6 is OK to use. ***" +echo "Press "y" to install OpenJDK v1.7, OR" +echo "Press "n" to install OpenJDK v1.6, OR" +echo "Press any other key to continue with the existing JDK installation." +read JDK +if [ \${JDK} == y ] ; then + PKGS+=' openjdk-7-jdk openjdk-7-jre' +elif [ \${JDK} == n ] ; then + PKGS+=' openjdk-6-jdk openjdk-6-jre' +else + echo "Continue with the existing JDK installation .." +fi +echo echo "Installing missing dependencies if any..." if [ \$INTERACTIVE -eq 1 ] ; then sudo apt-get install \${PKGS} @@ -159,10 +179,10 @@ jenkins_configs_method() # check for linaro private manifests PM=\`echo ${MANIFEST_REPO} | grep -i "linaro-private" | wc -l\` if [ \${PM} -gt 0 -a \${INTERACTIVE} -eq 1 ] ; then - if [ "\${LINARO_ANDROID_ACCESS_ID}" == "default-bot" ] ; then + if [ "\${LINARO_ANDROID_ACCESS_ID}" == "\${USER}" ] ; then echo "You must specify valid login/access-id to clone from linaro-private manifest repositories." - echo "Press "y" to continue (which may result in incomplete build or failure), OR" - echo "Press "n" to enter login details, OR" + echo "Press "y" to continue with login: \${USER}, OR" + echo "Press "n" to enter new login details, OR" echo "Press "h" for help." read NEXT if [ \${NEXT} == n ] ; then @@ -194,6 +214,8 @@ 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} +export WITH_HOST_DALVIK=${WITH_HOST_DALVIK} +export USE_LINARO_TOOLCHAIN=${USE_LINARO_TOOLCHAIN} EOF if [ -n "$TOOLCHAIN_URL" ] ; then cat <<EOF @@ -238,7 +260,7 @@ sync_commands() fi cat <<EOF # download the repo tool for android -curl "http://android.git.linaro.org/gitweb?p=tools/repo.git;a=blob_plain;f=repo;hb=refs/heads/stable" > repo +curl "https://android.git.linaro.org/gitweb?p=tools/repo.git;a=blob_plain;f=repo;hb=refs/heads/stable" > repo chmod +x repo # download the android code @@ -248,12 +270,12 @@ if [ \${EXACT} -eq 1 ] ; then $CP_CMD fi # check for linaro private git repositories -PRI=\`grep -i "linaro-private" .repo/manifests/\${MANIFEST_FILENAME} | wc -l\` +PRI=\`grep -i "linaro-private" .repo/manifest.xml | wc -l\` if [ \${PRI} -gt 0 -a \${INTERACTIVE} -eq 1 ] ; then - if [ "\${LINARO_ANDROID_ACCESS_ID}" == "default-bot" ] ; then + if [ "\${LINARO_ANDROID_ACCESS_ID}" == "\${USER}" ] ; then echo "You must specify valid login/access-id to clone from linaro-private git repositories." - echo "Press "y" to continue (which may result in incomplete build), OR" - echo "Press "n" to enter login details, OR" + echo "Press "y" to continue with login: \${USER}, OR" + echo "Press "n" to enter new login details, OR" echo "Press "h" for help." read NEXT if [ \${NEXT} == n ] ; then @@ -263,7 +285,7 @@ if [ \${PRI} -gt 0 -a \${INTERACTIVE} -eq 1 ] ; then usage fi fi - sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/manifests/\${MANIFEST_FILENAME} + sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/manifest.xml fi ./repo sync -f -j1 diff --git a/build-scripts/helpers b/build-scripts/helpers index 9eb2b0d..fb3e29c 100644 --- a/build-scripts/helpers +++ b/build-scripts/helpers @@ -42,9 +42,17 @@ repo-sync-from-mirror () { mkdir -p out cp .repo/manifest.xml out/source-manifest.xml - echo Replace Linaro git URLs with lightweight http git URLs. - ${BUILD_SCRIPT_ROOT}/rewrite-manifest.py .repo/manifest.xml -o processed-manifest.xml -u "${MANIFEST_REPO}" - cp processed-manifest.xml .repo/manifest.xml + if [ -n "$LOCAL_MANIFEST" ]; then + cd .repo/ + git clone $LOCAL_MANIFEST + cd - + fi + + if [ "$REWRITE_MANIFEST" != "0" ]; then + echo Replace Linaro git URLs with lightweight http git URLs. + ${BUILD_SCRIPT_ROOT}/rewrite-manifest.py .repo/manifest.xml -o processed-manifest.xml -u "${MANIFEST_REPO}" + cp processed-manifest.xml .repo/manifest.xml + fi echo ---------------------------- repo-sync-stubborn @@ -134,6 +142,13 @@ download_another_build () { wget -nv --no-check-certificate "$baseurl/source-manifest.xml" || true wget -nv --no-check-certificate "$baseurl/pinned-manifest.xml" || true popd + cat >out/BUILD-INFO.txt <<EOF +Format-Version: 0.5 + +Files-Pattern: * +License-Type: open +EOF + } flatten_artifacts () { diff --git a/build-scripts/post-build-lava.py b/build-scripts/post-build-lava.py index 61633b9..ad88824 100755 --- a/build-scripts/post-build-lava.py +++ b/build-scripts/post-build-lava.py @@ -42,6 +42,12 @@ PRODUCT_MAP = { "test_device_type": "wg", "test_stream": "/private/team/wg/wg-private/", }, + "juice": { + "test_device_type": "rtsm_fvp_base-aemv8a", + }, + "aosp_maguro": { + "test_device_type": "nexus", + }, "full_maguro": { "test_device_type": "nexus", }, diff --git a/build-scripts/repo_project_info.py b/build-scripts/repo_project_info.py index f748005..8784c06 100755 --- a/build-scripts/repo_project_info.py +++ b/build-scripts/repo_project_info.py @@ -8,8 +8,8 @@ def get_kernel_info(repodir, projpath): projpath = projpath.rstrip("/") m = manifest_xml.XmlManifest(repodir) for p in m.projects: - if m.projects[p].relpath == projpath: - proj = m.projects[p] + if p.relpath == projpath: + proj = p return (proj.remote.url, proj.revisionExpr) return None @@ -12,7 +12,7 @@ # $2 = build CONFIG, base64-encoded # -REPO_TOOL_URL="http://android.git.linaro.org/gitweb?p=tools/repo.git;a=blob_plain;f=repo;hb=refs/heads/stable" +REPO_TOOL_URL="https://android.git.linaro.org/gitweb?p=tools/repo.git;a=blob_plain;f=repo;hb=refs/heads/stable" # Dump system release to build log echo diff --git a/node/prepare_build_config.py b/node/prepare_build_config.py index bcb5a5a..5615983 100755 --- a/node/prepare_build_config.py +++ b/node/prepare_build_config.py @@ -53,7 +53,7 @@ def validate_config(config, slave_type): else: slave_type_cat = "normal" - if owner.endswith("-restricted"): + if owner == "projectara-software-dev" or owner.endswith("-restricted"): owner_cat = "restricted" else: owner_cat = "normal" diff --git a/node/setup-build-android b/node/setup-build-android index 5ea87e4..100537e 100755 --- a/node/setup-build-android +++ b/node/setup-build-android @@ -107,8 +107,10 @@ apt-get-retry install -y \ libxml2-utils \ subversion \ libmpfr-dev \ - openjdk-7-jdk \ - openjdk-7-jre + openjdk-7-jdk \ + openjdk-7-jre \ + python-mako \ + # uuid-dev, acpica-tools are UEFI bootloader requirement @@ -137,7 +139,14 @@ sudo apt-get install -y linaro-image-tools # Install recent version of iasl/acpica-tools from linaro-maintainers ppa. sudo apt-get install -y acpica-tools +# Install recent version of tar (with --selinux) from linaro-maintainers ppa. +sudo apt-get install -y tar + # Allow 'jenkins-build' user to run linaro-android-media-create via sudo echo "jenkins-build ALL = NOPASSWD: /usr/bin/linaro-android-media-create" >>/etc/sudoers # Allow 'jenkins-build' user to set java version used to build Android echo "jenkins-build ALL = NOPASSWD: /usr/sbin/update-java-alternatives" >>/etc/sudoers +# Allow 'jenkins-build' user to mount, umount img files as well as tar the same with --selinux option. +echo "jenkins-build ALL = NOPASSWD: /bin/mount" >>/etc/sudoers +echo "jenkins-build ALL = NOPASSWD: /bin/umount" >>/etc/sudoers +echo "jenkins-build ALL = NOPASSWD: /bin/tar" >>/etc/sudoers diff --git a/utils/manifest-descriptions/make.sh b/utils/manifest-descriptions/make.sh index 4054a85..d78ae12 100755 --- a/utils/manifest-descriptions/make.sh +++ b/utils/manifest-descriptions/make.sh @@ -9,7 +9,7 @@ if [ -d $dir ]; then git pull cd .. else - git clone http://android.git.linaro.org/git-ro/platform/manifest-descriptions.git + git clone http://android.git.linaro.org/git/platform/manifest-descriptions.git fi $(dirname $0)/manifest-annotate $* |