2017-01-19 20:22:35 +08:00
|
|
|
#!/bin/sh
|
2017-01-07 02:16:53 +08:00
|
|
|
|
2017-01-19 20:22:35 +08:00
|
|
|
# Assume first argument is the board name (as defined in Zephyr)
|
|
|
|
BOARD=$1
|
2017-01-07 02:16:53 +08:00
|
|
|
|
2017-01-19 20:22:35 +08:00
|
|
|
if [ -z "$BOARD" ]; then
|
|
|
|
echo "Please specify the board name (as in Zephyr) as first argument."
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "$(dirname $0)/boot/zephyr/targets/${BOARD}.h" ]; then
|
|
|
|
echo "Board $BOARD not yet supported, please use a supported target."
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check if there is a valid Zephyr environment available
|
|
|
|
if [ -z "$ZEPHYR_BASE" ]; then
|
|
|
|
echo "ZEPHYR_BASE not provided by the environment."
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
make BOARD=$BOARD
|