Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: platform_tools/chromeos/bin/chromeos_make

Issue 1926163002: Delete ChromeOS code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/bin/bash
2
3 # This script builds Skia for ChromeOS by mounting the Skia checkout inside a
4 # chroot contained within an existing ChromeOS checkout, entering the chroot,
5 # and running the build_skia_in_chroot script.
6
7 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
8
9 if [ $(uname) != "Linux" ]; then
10 echo "ERROR: Can only build for ChromeOS on Linux."
11 exit 1
12 fi
13
14
15 makeVars=""
16 deviceID=""
17
18 while (( "$#" )); do
19
20 if [[ $(echo "$1" | grep "^-d$") != "" ]];
21 then
22 deviceID="$2"
23 shift
24 else
25 makeVars="$makeVars $1"
26 fi
27
28 shift
29 done
30
31 if [[ -z "${deviceID}" ]]; then
32 echo "You must provide a deviceID with -d."
33 exit 1
34 fi
35
36 CHROMEOS_CHROOT="${SCRIPT_DIR}/../toolchain"
37
38 # Get the required SDK version.
39 # TODO(borenet): Should we instead get the latest from GS?
40 #SDK_VERSION=$(gsutil cat gs://chromeos-image-archive/${deviceID}-release/LATEST -master)
41 #SDK_VERSION=${SDK_VERSION:4}
42 SDK_VERSION="4279.0.0"
43 mkdir -p "${CHROMEOS_CHROOT}/src/chromeos"
44 echo -n ${SDK_VERSION} > "${CHROMEOS_CHROOT}/src/chromeos/CHROMEOS_LKGM"
45
46 # Download the toolchain tarball if needed.
47 # TODO(borenet): Let chrome-sdk take care of this once it works with external
48 # boards.
49 if ! [[ -d "${CHROMEOS_CHROOT}/.cros_cache" ]]; then
50 TARBALL="cros_toolchain.tgz"
51 gsutil cp gs://chromium-skia-gm/chromeos-toolchains/${TARBALL} ${CHROMEOS_CHRO OT}
52 if [ "$?" != "0" ]
53 then
54 exit 1;
55 fi
56 pushd "${CHROMEOS_CHROOT}" > /dev/null
57 tar -zxvf ${TARBALL}
58 popd > /dev/null
59 rm ${CHROMEOS_CHROOT}/${TARBALL}
60 fi
61
62 # Put a fake .gclient file in the toolchain directory so that the cros tool
63 # thinks we're in a Chrome checkout.
64 echo "Delete me!" > "${CHROMEOS_CHROOT}/.gclient"
65
66 # We may also need a .git directory.
67 GIT_DIR="${CHROMEOS_CHROOT}/src/third_party/chromite/.git"
68 if ! [[ -d "${GIT_DIR}" ]]; then
69 mkdir -p ${GIT_DIR}
70 fi
71
72 # Where the Skia code will pretend to live inside the chroot.
73 SKIA_TOP_DIR="${SCRIPT_DIR}/../../.."
74
75 pushd ${CHROMEOS_CHROOT}
76 cros chrome-sdk --nogoma --board ${deviceID} --debug -- /bin/sh -c "cd ${SKIA_TO P_DIR}; platform_tools/chromeos/bin/build_skia_in_chroot ${makeVars}"
77 popd > /dev/null
78
79 # Clean up
80 rm ${CHROMEOS_CHROOT}/.gclient
81
82 if [ -f .cros_build_successful ]; then
83 rm -rf .cros_build_successful
84 exit 0
85 fi
86
87 exit 1
OLDNEW
« no previous file with comments | « platform_tools/chromeos/bin/build_skia_in_chroot ('k') | platform_tools/chromeos/bin/chromeos_setup.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698