mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
BUG=None TEST=build regular, test, and recovery images Change-Id: I2d7d073c27d14fb88be6a63953dcc77fc76a0807 Reviewed-on: http://gerrit.chromium.org/gerrit/5512 Tested-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Reviewed-by: David James <davidjames@chromium.org>
33 lines
759 B
Bash
33 lines
759 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="${FLAGS_build_root}/${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
|