From 7f2ebbde6bbeccd2ccc907c3e9d78f1a7ec97715 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 1 Jun 2012 21:41:27 -0400 Subject: [PATCH] pass down board info to cros_setup_toolchains If the board we're building includes extra toolchains that aren't part of our official set, we need to make sure cros_setup_toolchains still tries to set them up for us. BUG=None TEST=`cbuildbot chromiumos-sdk` works TEST=`./setup_board --board=x32-generic` installs an extra toolchain Change-Id: I85f70177f82bdf295eb2cd8668a031317a3b6e61 Reviewed-on: https://gerrit.chromium.org/gerrit/24336 Tested-by: Mike Frysinger Reviewed-by: Zdenek Behan Commit-Ready: Mike Frysinger --- setup_board | 6 +++--- update_chroot | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setup_board b/setup_board index 0199a1502c..7c502fc329 100755 --- a/setup_board +++ b/setup_board @@ -342,8 +342,10 @@ if [ -z "$FLAGS_board" ] ; then exit 1 fi +get_board_and_variant $FLAGS_board $FLAGS_variant + # Before we can run any tools, we need to update chroot -UPDATE_ARGS="" +UPDATE_ARGS="--toolchain_boards=${BOARD}" if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then UPDATE_ARGS+=" --fast" else @@ -364,8 +366,6 @@ if [ "${FLAGS_skip_chroot_upgrade}" -eq "${FLAGS_FALSE}" ] ; then "${SRC_ROOT}/scripts"/update_chroot ${UPDATE_ARGS} fi -get_board_and_variant $FLAGS_board $FLAGS_variant - # # Fetch the toolchain from the board overlay. # diff --git a/update_chroot b/update_chroot index 3b7879ca40..817ff40c8f 100755 --- a/update_chroot +++ b/update_chroot @@ -31,6 +31,8 @@ DEFINE_integer jobs -1 \ "How many packages to build in parallel at maximum." DEFINE_boolean skip_toolchain_update $FLAGS_FALSE \ "Don't update the toolchains." +DEFINE_string toolchain_boards "" \ + "Extra toolchains to setup for the specified boards." # Parse command line flags FLAGS "$@" || exit 1 @@ -87,7 +89,7 @@ if [ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_FALSE}" ]; then # First update crossdev. sudo -E ${EMERGE_CMD} ${EMERGE_FLAGS} crossdev - TOOLCHAIN_FLAGS="" + TOOLCHAIN_FLAGS="--include-boards=${FLAGS_toolchain_boards}" # This should really only be skipped while bootstrapping. if [ "${FLAGS_usepkg}" -eq "${FLAGS_FALSE}" ]; then TOOLCHAIN_FLAGS="--nousepkg"