blob: 20e61a069cc3f6a0bfeb2bcb1c1fdc8493b804a2 [file] [log] [blame]
David Brownada28e12017-07-05 13:36:37 -06001#! /bin/bash
2
3# Build the bootloader.
4
5# In order to build successfully, ZEPHYR_SDK_INSTALL_DIR and
6# ZEPHYR_GCC_VARIANT need to be set, as well as zephyr/zephyr-env.sh
7# must be sourced.
8
9die() {
10 echo error: "$@"
11 exit 1
12}
13
14if [ -z "$ZEPHYR_BASE" ]; then
15 die "Please setup for a Zephyr build before running this script."
16fi
17
18if [ -z "$BOARD" ]; then
19 die "Please set BOARD to a valid board before running this script."
20fi
21
22make -C ../.. BOARD=${BOARD} -j$(nproc) || die "Build mcuboot"