From 5bbf1d52609f9a8ead746e3e2cef78e6648f8b65 Mon Sep 17 00:00:00 2001 From: "borenet@google.com" Date: Mon, 24 Jun 2013 19:31:58 +0000 Subject: [PATCH] Use a single cros_toolchain tarball for ChromeOS build It's stored in our GS bucket, so we won't need two sets of credentials. (SkipBuildbotRuns) since this isn't in use. Review URL: https://codereview.chromium.org/17608003 git-svn-id: http://skia.googlecode.com/svn/trunk@9743 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gyp/common.gypi | 6 ++--- platform_tools/chromeos/bin/chromeos_make | 44 +++++++++++-------------------- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/gyp/common.gypi b/gyp/common.gypi index 54c14cd..2173d90 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -22,7 +22,8 @@ 'variables': { 'conditions': [ [ 'skia_os != OS and not ((skia_os == "ios" and OS == "mac") or \ - (skia_os == "nacl" and OS == "linux"))', { + (skia_os == "nacl" and OS == "linux") or \ + (skia_os == "chromeos" and OS == "linux"))', { 'error': ' /dev/null - tar -zxvf cros_toolchain.tgz - if [[ "$?" != "0" ]]; then - exit 1 - fi - rm cros_toolchain.tgz - popd > /dev/null -fi - -# If a boto file was provided, use that instead of the default. -if [[ -n "$crosBotoFile" ]]; then - export AWS_CREDENTIAL_FILE="$crosBotoFile" - export BOTO_CONFIG="$crosBotoFile" -fi - # Get the required SDK version. # TODO(borenet): Should we instead get the latest from GS? #SDK_VERSION=$(gsutil cat gs://chromeos-image-archive/${deviceID}-release/LATEST-master) @@ -71,6 +43,22 @@ SDK_VERSION="4279.0.0" mkdir -p "${CHROMEOS_CHROOT}/src/chromeos" echo -n ${SDK_VERSION} > "${CHROMEOS_CHROOT}/src/chromeos/CHROMEOS_LKGM" +# Download the toolchain tarball if needed. +# TODO(borenet): Let chrome-sdk take care of this once it works with external +# boards. +if ! [[ -d "${CHROMEOS_CHROOT}/.cros_cache" ]]; then + TARBALL="cros_toolchain.tgz" + gsutil cp gs://chromium-skia-gm/chromeos-toolchains/${TARBALL} ${CHROMEOS_CHROOT} + if [ "$?" != "0" ] + then + exit 1; + fi + pushd "${CHROMEOS_CHROOT}" > /dev/null + tar -zxvf ${TARBALL} + popd > /dev/null + rm ${CHROMEOS_CHROOT}/${TARBALL} +fi + # Put a fake .gclient file in the toolchain directory so that the cros tool # thinks we're in a Chrome checkout. echo "Delete me!" > "${CHROMEOS_CHROOT}/.gclient" -- 2.7.4