diff options
author | the great greene arkleseizure <root@e6230.(none)> | 2013-10-10 10:59:48 +0100 |
---|---|---|
committer | the great greene arkleseizure <root@e6230.(none)> | 2013-10-10 10:59:48 +0100 |
commit | ba36b7b03e8b03600e4342f3fa7ed60dc3d61352 (patch) | |
tree | df3b6cefc4276abd0a7fbf50795651e77179ca81 /software/pong3_bsp/create-this-bsp | |
parent | 4ca3e92e5896b1b8fec43c73e14c9c7ec72a8324 (diff) | |
download | pong-ba36b7b03e8b03600e4342f3fa7ed60dc3d61352.tar.gz pong-ba36b7b03e8b03600e4342f3fa7ed60dc3d61352.tar.bz2 pong-ba36b7b03e8b03600e4342f3fa7ed60dc3d61352.zip |
software-1
Diffstat (limited to 'software/pong3_bsp/create-this-bsp')
-rwxr-xr-x | software/pong3_bsp/create-this-bsp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/software/pong3_bsp/create-this-bsp b/software/pong3_bsp/create-this-bsp new file mode 100755 index 0000000..637cc72 --- /dev/null +++ b/software/pong3_bsp/create-this-bsp @@ -0,0 +1,49 @@ +#!/bin/bash +# +# This script creates the ucosii_net_zipfs Board Support Package (BSP). + +BSP_TYPE=hal +BSP_DIR=. +SOPC_DIR=/root/projects/pong3/hardware/ +SOPC_FILE=/root/projects/pong3/hardware/my_sys.sopcinfo +NIOS2_BSP_ARGS="" +CPU_NAME= + + +# Don't run make if create-this-app script is called with --no-make arg +SKIP_MAKE= +while [ $# -gt 0 ] +do + case "$1" in + --no-make) + SKIP_MAKE=1 + ;; + *) + NIOS2_BSP_ARGS="$NIOS2_BSP_ARGS $1" + ;; + esac + shift +done + + +# Run nios2-bsp utility to create a hal BSP in this directory +# for the system with a .sopc file in $SOPC_FILE. +# Deprecating $SOPC_DIR in 10.1. Multiple .sopcinfo files in a directory may exist. + +if [ -z "$SOPC_FILE" ]; then + echo "WARNING: Use of a directory for locating a .sopcinfo file is deprecated in 10.1. Multiple .sopcinfo files may exist. You must specify the full .sopcinfo path." + cmd="nios2-bsp $BSP_TYPE $BSP_DIR $SOPC_DIR $NIOS2_BSP_ARGS $CPU_NAME" +else + cmd="nios2-bsp $BSP_TYPE $BSP_DIR $SOPC_FILE $NIOS2_BSP_ARGS $CPU_NAME" +fi + + +echo "create-this-bsp: Running \"$cmd\"" +$cmd || { + echo "$cmd failed" + exit 1 +} +if [ -z "$SKIP_MAKE" ]; then + echo "create-this-bsp: Running make" + make +fi |