mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
For all scripts, --build_root defaults to /build and is never used. To remove option clutter, I've deleted this option. The only script which still references build_root in src/scripts is mod_image_for_pyauto.sh, which seems to support it for grabbing pyauto dependencies from a location other than /build/*. This might conceivably be useful, so I haven't touched that script. BUG=chromium-os:27364 TEST=Remote trybot run. git grep for references to build_root. Change-Id: I502f7df0123a598fc62a4ef4ed847ceb182f65b8 Reviewed-on: https://gerrit.chromium.org/gerrit/18283 Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: David James <davidjames@chromium.org> Commit-Ready: David James <davidjames@chromium.org>
33 lines
746 B
Bash
33 lines
746 B
Bash
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
if [ -z "${FLAGS_board}" ]; then
|
|
error "--board is required."
|
|
exit 1
|
|
fi
|
|
|
|
BOARD="${FLAGS_board}"
|
|
BOARD_ROOT="/build/${BOARD}"
|
|
|
|
# What cross-build are we targeting?
|
|
. "${BOARD_ROOT}/etc/make.conf.board_setup"
|
|
|
|
# Figure out ARCH from the given toolchain.
|
|
# TODO(jrbarnette): There's a copy of this code in setup_board;
|
|
# it should be shared.
|
|
case "$(echo "${CHOST}" | awk -F'-' '{ print $1 }')" in
|
|
arm*)
|
|
ARCH="arm"
|
|
;;
|
|
*86)
|
|
ARCH="x86"
|
|
;;
|
|
*x86_64)
|
|
ARCH="amd64"
|
|
;;
|
|
*)
|
|
error "Unable to determine ARCH from toolchain: ${CHOST}"
|
|
exit 1
|
|
esac
|