blob: 72ee96fc9da631aa3d27396c796a5fea9836efb6 [file] [log] [blame]
Ricardo Salveti3a2c1242017-01-19 10:22:35 -02001#!/bin/sh
David Brown5153bd62017-01-06 11:16:53 -07002
Ricardo Salveti3a2c1242017-01-19 10:22:35 -02003# Assume first argument is the board name (as defined in Zephyr)
4BOARD=$1
David Brown5153bd62017-01-06 11:16:53 -07005
Ricardo Salveti3a2c1242017-01-19 10:22:35 -02006if [ -z "$BOARD" ]; then
7 echo "Please specify the board name (as in Zephyr) as first argument."
8 exit 1;
9fi
10
11if [ ! -f "$(dirname $0)/boot/zephyr/targets/${BOARD}.h" ]; then
12 echo "Board $BOARD not yet supported, please use a supported target."
13 exit 1;
14fi
15
16# Check if there is a valid Zephyr environment available
17if [ -z "$ZEPHYR_BASE" ]; then
18 echo "ZEPHYR_BASE not provided by the environment."
19 exit 1;
20fi
21
22make BOARD=$BOARD