OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to install everything needed to build chromium (well, ideally, anyway) | 7 # Script to install everything needed to build chromium (well, ideally, anyway) |
8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions | 8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions |
9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit | 9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit |
10 | 10 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 echo "The following command failed: " ${new_list_cmd} | 242 echo "The following command failed: " ${new_list_cmd} |
243 echo | 243 echo |
244 echo "It produces the following output:" | 244 echo "It produces the following output:" |
245 yes n | $new_list_cmd || true | 245 yes n | $new_list_cmd || true |
246 echo | 246 echo |
247 echo "You will have to install the above packages yourself." | 247 echo "You will have to install the above packages yourself." |
248 echo | 248 echo |
249 exit 100 | 249 exit 100 |
250 fi | 250 fi |
251 | 251 |
| 252 # Install arm root image |
| 253 if test "$do_inst_arm" = "1"; then |
| 254 # As well as the arm toolchain packages we also need a recent arm root |
| 255 # image to build against (using --sysroot). We could construct this |
| 256 # from scratch based on the current state or precise/arm but for |
| 257 # consistency we currently use a pre-built root image which was constructed |
| 258 # for building trusted NaCl code. |
| 259 CHROME_ROOT="$(dirname ${BASH_SOURCE[0]})" |
| 260 CHROME_ROOT="$(dirname ${CHROME_ROOT})" |
| 261 SYSROOT="${CHROME_ROOT}/arm-sysroot" |
| 262 TC_URL_PREFIX=https://commondatastorage.googleapis.com/nativeclient-archive2/t
oolchain |
| 263 TC_REV=8001 |
| 264 TC_URL=${TC_URL_PREFIX}/${TC_REV}/naclsdk_linux_arm-trusted.tgz |
| 265 |
| 266 INSTALL_ROOT="yes" |
| 267 STAMP="${SYSROOT}/.stamp" |
| 268 if [ -f "${STAMP}" ]; then |
| 269 if [ "${TC_URL}" = $(cat ${STAMP}) ]; then |
| 270 INSTALL_ROOT="no" |
| 271 fi |
| 272 fi |
| 273 |
| 274 if [ $INSTALL_ROOT = "no" ]; then |
| 275 echo "ARM root image already up-to-date." |
| 276 else |
| 277 echo "Installing ARM root image." |
| 278 mkdir -p ${SYSROOT} |
| 279 tarball=${SYSROOT}/naclsdk_linux_arm-trusted.tgz |
| 280 set -x |
| 281 curl -L ${TC_URL} -o ${tarball} |
| 282 tar xf ${tarball} -C ${SYSROOT} |
| 283 rm ${tarball} |
| 284 echo -n "${TC_URL}" > "${STAMP}" |
| 285 fi |
| 286 fi |
| 287 |
252 # Install 32bit backwards compatibility support for 64bit systems | 288 # Install 32bit backwards compatibility support for 64bit systems |
253 if [ "$(uname -m)" = "x86_64" ]; then | 289 if [ "$(uname -m)" = "x86_64" ]; then |
254 if test "$do_inst_lib32" != "1" | 290 if test "$do_inst_lib32" != "1" |
255 then | 291 then |
256 echo "NOTE: If you were expecting the option to install 32bit libs," | 292 echo "NOTE: If you were expecting the option to install 32bit libs," |
257 echo "please run with the --lib32 flag." | 293 echo "please run with the --lib32 flag." |
258 echo | 294 echo |
259 echo "Installation complete." | 295 echo "Installation complete." |
260 exit 0 | 296 exit 0 |
261 fi | 297 fi |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 sed -e 's/[.]so[.][0-9].*/.so/' | | 471 sed -e 's/[.]so[.][0-9].*/.so/' | |
436 sort -u); do | 472 sort -u); do |
437 [ "x${i##*/}" = "xld-linux.so" ] && continue | 473 [ "x${i##*/}" = "xld-linux.so" ] && continue |
438 [ -r "$i" ] && continue | 474 [ -r "$i" ] && continue |
439 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 475 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
440 sort -n | tail -n 1)" | 476 sort -n | tail -n 1)" |
441 [ -r "$i.$j" ] || continue | 477 [ -r "$i.$j" ] || continue |
442 sudo ln -s "${i##*/}.$j" "$i" | 478 sudo ln -s "${i##*/}.$j" "$i" |
443 done | 479 done |
444 fi | 480 fi |
OLD | NEW |