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

Side by Side Diff: build/linux/install-arm-sysroot.py

Issue 27197011: Support cross compiling for armhf variant ARM/linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« build/common.gypi ('K') | « build/install-build-deps.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script to install ARM root image for cross building of ARM chrome on linux. 6 """Script to install ARM root image for cross building of ARM chrome on linux.
7 This script can be run manually but is more often run as part of gclient 7 This script can be run manually but is more often run as part of gclient
8 hooks. When run from hooks this script should be a no-op on non-linux 8 hooks. When run from hooks this script should be a no-op on non-linux
9 platforms. 9 platforms.
10 10
11 The sysroot image could be constructed from scratch based on the current 11 The sysroot image could be constructed from scratch based on the current
12 state or precise/arm but for consistency we currently use a pre-built root 12 state or precise/arm but for consistency we currently use a pre-built root
13 image which was originally designed for building trusted NaCl code. The image 13 image which was originally designed for building trusted NaCl code. The image
14 will normally need to be rebuilt every time chrome's build dependancies are 14 will normally need to be rebuilt every time chrome's build dependancies are
15 changed. 15 changed.
16 16
17 Steps to rebuild the arm sysroot image: 17 Steps to rebuild the arm sysroot image:
18 18
19 - cd $SRC/native_client 19 - cd $SRC/native_client
20 - ./tools/trusted_cross_toolchains/trusted-toolchain-creator.armel.precise.sh \ 20 - ./tools/trusted_cross_toolchains/trusted-toolchain-creator.armel.precise.sh \
21 UpdatePackageLists 21 UpdatePackageLists
22 - ./tools/trusted_cross_toolchains/trusted-toolchain-creator.armel.precise.sh \ 22 - ./tools/trusted_cross_toolchains/trusted-toolchain-creator.armel.precise.sh \
23 BuildJail $SRC/out/arm-sysroot.tar.gz 23 BuildJail $SRC/out/arm-sysroot.tar.gz
24 - gsutil cp -a public-read $SRC/out/arm-sysroot.tar.gz \ 24 - gsutil cp -a public-read $SRC/out/arm-sysroot.tar.gz \
25 nativeclient-archive2/toolchain/$NACL_REV/naclsdk_linux_arm-trusted.tgz 25 nativeclient-archive2/toolchain/$NACL_REV/sysroot-arm-trusted.tgz
ghost stip (do not use) 2013/10/28 18:17:02 why are we changing the name of the tgz?
Sam Clegg 2013/10/28 18:21:02 I changed this on the nacl side since the old name
26 """ 26 """
27 27
28 import os 28 import os
29 import shutil 29 import shutil
30 import subprocess 30 import subprocess
31 import sys 31 import sys
32 32
33 33
34 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) 34 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
35 URL_PREFIX = 'https://commondatastorage.googleapis.com' 35 URL_PREFIX = 'https://commondatastorage.googleapis.com'
36 URL_PATH = 'nativeclient-archive2/toolchain' 36 URL_PATH = 'nativeclient-archive2/toolchain'
37 REVISION = 12203 37 REVISION = 12292
38 TARBALL = 'naclsdk_linux_arm-trusted.tgz' 38 TARBALL = 'sysroot-arm-trusted.tgz'
39 39
40 40
41 def main(args): 41 def main(args):
42 if '--linux-only' in args: 42 if '--linux-only' in args:
43 # This argument is passed when run from the gclient hooks. 43 # This argument is passed when run from the gclient hooks.
44 # In this case we return early on non-linux platforms 44 # In this case we return early on non-linux platforms
45 # or if GYP_DEFINES doesn't include target_arch=arm 45 # or if GYP_DEFINES doesn't include target_arch=arm
46 if not sys.platform.startswith('linux'): 46 if not sys.platform.startswith('linux'):
47 return 0 47 return 0
48 48
(...skipping 20 matching lines...) Expand all
69 subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot]) 69 subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot])
70 os.remove(tarball) 70 os.remove(tarball)
71 71
72 with open(stamp, 'w') as s: 72 with open(stamp, 'w') as s:
73 s.write(url) 73 s.write(url)
74 return 0 74 return 0
75 75
76 76
77 if __name__ == '__main__': 77 if __name__ == '__main__':
78 sys.exit(main(sys.argv[1:])) 78 sys.exit(main(sys.argv[1:]))
OLDNEW
« build/common.gypi ('K') | « build/install-build-deps.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698