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"