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

Unified Diff: chrome-setup.sh

Issue 8967004: FYI: DO NOT CHECK IN (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome-setup.sh
===================================================================
--- chrome-setup.sh (revision 0)
+++ chrome-setup.sh (revision 0)
@@ -0,0 +1,118 @@
+
+#!/bin/bash
+set -o nounset
+set -o errexit
+
+
+readonly SYSROOT=$(pwd)/arm_jail
+
+readonly TC_URL_PREFIX=https://commondatastorage.googleapis.com/nativeclient-archive2/toolchain
+readonly TC_REV=7000
+
+
+
+readonly CROSS_ARM_TC_PACKAGES="\
+ gcc-4.5-arm-linux-gnueabi-base \
+ libc6-armel-cross \
+ libc6-dev-armel-cross \
+ libgcc1-armel-cross \
+ libgomp1-armel-cross \
+ linux-libc-dev-armel-cross \
+ libgcc1-dbg-armel-cross \
+ libgomp1-dbg-armel-cross \
+ libstdc++6-4.4-dev-armel-cross \
+ binutils-arm-linux-gnueabi \
+ gcc-4.5-locales \
+ cpp-4.5-arm-linux-gnueabi \
+ cpp-arm-linux-gnueabi \
+ gcc-4.5-arm-linux-gnueabi \
+ libmudflap0-4.5-dev-armel-cross \
+ libmudflap0-dbg-armel-cross
+ "
+
+readonly GYP_DEFINES="\
+ target_arch=arm \
+ armv7=1 \
+ sysroot=${SYSROOT} \
+ remoting=0 \
+ linux_breakpad=0 \
+ disable_nacl_untrusted=1 \
+ linux_use_tcmalloc=0
+"
+
+
+######################################################################
+export GYP_DEFINES
+export SYSROOT
+
+######################################################################
+
+
+#@ run this once on your system to install necessary crosstoolchain
+#@ binaries - NOTE: sudo required
+#@
+install-cross-toolchain-base() {
+ sudo apt-get install ${CROSS_ARM_TC_PACKAGES}
+}
+
+
+#@ run this once for each chrome checkout inside src/
+#@ (this could be shared across chrome checkouts as well)
+#@
+install-cross-toolchain-jail() {
+ local tarball=$(pwd)/jail.tgz
+
+ curl -L \
+ ${TC_URL_PREFIX}/${TC_REV}/naclsdk_linux_arm-trusted.tgz \
+ -o ${tarball}
+
+
+ rm -rf ${SYSROOT}
+ mkdir -p ${SYSROOT}
+ tar zxf ${tarball} -C ${SYSROOT}
+}
+
+
+#@
+#@
+configure-chrome() {
+ # note this reads GYP_DEFINES
+ gclient runhooks
+}
+
+
+#@
+#@
+make-chrome() {
+ make V=99 BUILDTYPE=Release CC=${SYSROOT}/chrome.cc.arm.sh CXX=${SYSROOT}/chrome.c++.arm.sh CC.host=${SYSROOT}/chrome.cc.host.sh CXX.host=${SYSROOT}/chrome.c++.host.sh -j 16 chrome
+}
+
+package-chrome() {
+ tar cfvz chrome-arm.tgz out/Release/chrome \
+ out/Release/lib*.so \
+ out/Release/chrome.pak \
+ out/Release/resources.pak \
+ out/Release/locales
+}
+
+######################################################################
+# DISPATCH
+######################################################################
+Usage() {
+ egrep "^#@" $0 | cut --bytes=3-
+}
+
+
+if [[ $# -eq 0 ]] ; then
+ echo "you must specify a mode on the commandline:"
+ echo
+ Usage
+ exit -1
+elif [[ "$(type -t $1)" != "function" ]]; then
+ echo "ERROR: unknown function '$1'." >&2
+ echo "For help, try:"
+ echo " $0 help"
+ exit 1
+else
+ "$@"
+fi
Property changes on: chrome-setup.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698