Chromium Code Reviews| Index: tools/trusted_cross_toolchains/trusted-toolchain-creator.armhf.trusty.sh |
| diff --git a/tools/trusted_cross_toolchains/trusted-toolchain-creator.armhf.trusty.sh b/tools/trusted_cross_toolchains/trusted-toolchain-creator.armhf.trusty.sh |
| index f3873ddbcaaed2c3fbe2ab49654fdba01c38837f..9480d53202e0211cf14721aac0ae3e9d86db1047 100755 |
| --- a/tools/trusted_cross_toolchains/trusted-toolchain-creator.armhf.trusty.sh |
| +++ b/tools/trusted_cross_toolchains/trusted-toolchain-creator.armhf.trusty.sh |
| @@ -406,26 +406,44 @@ CleanupJailSymlinks() { |
| # So instead we chose to build 32bit shared images. |
| # |
| -readonly QEMU_TARBALL=$(readlink -f ../third_party/qemu/qemu-1.0.1.tar.gz) |
| -readonly QEMU_PATCH=$(readlink -f ../third_party/qemu/qemu-1.0.1.patch_arm) |
| +readonly QEMU_TARBALL=qemu-1.0.1.tar.gz |
| +readonly QEMU_SHA=4d08b5a83538fcd7b222bec6f1c584da8d12497a |
| readonly QEMU_DIR=qemu-1.0.1 |
| +# TODO(sbc): update to version 2.3.0 |
| +#readonly QEMU_TARBALL=qemu-2.3.0.tar.bz2 |
| +#readonly QEMU_SHA=373d74bfafce1ca45f85195190d0a5e22b29299e |
| +#readonly QEMU_DIR=qemu-2.3.0 |
| + |
| +readonly QEMU_URL=http://wiki.qemu-project.org/download/${QEMU_TARBALL} |
| +readonly QEMU_PATCH=$(readlink -f ../third_party/qemu/${QEMU_DIR}.patch_arm) |
| + |
| + |
| BuildAndInstallQemu() { |
| local saved_dir=$(pwd) |
| local tmpdir="${TMP}/qemu.nacl" |
| + set -x |
| Banner "Building qemu in ${tmpdir}" |
| - if [[ -z "$QEMU_TARBALL" ]] ; then |
| - echo "ERROR: missing qemu tarball: ../third_party/qemu/qemu-1.0.1.tar.gz" |
| - exit 1 |
| + if [ -n "${QEMU_URL}" ]; then |
| + if [[ ! -f ${TMP}/${QEMU_TARBALL} ]]; then |
| + wget -O ${TMP}/${QEMU_TARBALL} $QEMU_URL |
|
bradn
2015/04/28 20:46:16
curl?
Sam Clegg
2015/04/28 21:08:32
Any reason why thats better?
bradn
2015/04/28 21:11:08
consistency, I thought we use curl in most places.
|
| + fi |
| + |
| + echo "${QEMU_SHA} ${TMP}/${QEMU_TARBALL}" | sha1sum --check - |
| + else |
| + if [[ ! -f "$QEMU_TARBALL" ]] ; then |
| + echo "ERROR: missing qemu tarball: $QEMU_TARBALL" |
| + exit 1 |
| + fi |
| fi |
| rm -rf ${tmpdir} |
| mkdir ${tmpdir} |
| cd ${tmpdir} |
| SubBanner "Untaring ${QEMU_TARBALL}" |
| - tar zxf ${QEMU_TARBALL} |
| + tar xf ${TMP}/${QEMU_TARBALL} |
| cd ${QEMU_DIR} |
| SubBanner "Patching ${QEMU_PATCH}" |
| @@ -435,11 +453,9 @@ BuildAndInstallQemu() { |
| env -i PATH=/usr/bin/:/bin LIBS=-lrt \ |
| ./configure \ |
| --extra-cflags="-m32" \ |
| - --extra-ldflags="-Wl,-rpath=/lib32" \ |
| --disable-system \ |
| --disable-docs \ |
| --enable-linux-user \ |
| - --disable-darwin-user \ |
| --disable-bsd-user \ |
| --target-list=arm-linux-user \ |
| --disable-smartcard-nss \ |
| @@ -449,8 +465,7 @@ BuildAndInstallQemu() { |
| # --static |
| SubBanner "Make" |
| - env -i PATH=/usr/bin/:/bin \ |
| - V=99 make MAKE_OPTS=${MAKE_OPTS} |
| + env -i PATH=/usr/bin/:/bin V=99 make MAKE_OPTS=${MAKE_OPTS} |
| SubBanner "Install ${INSTALL_ROOT}" |
| cp arm-linux-user/qemu-arm ${INSTALL_ROOT} |