Skip to content
Snippets Groups Projects

Resolve L2SDP-794

Merged Reinier van der Walle requested to merge L2SDP-794 into master
3 unresolved threads
Files
5
+ 39
10
@@ -37,16 +37,38 @@ exit_with_error() {
cat <<@EndOfHelp@
Usage: $(basename $0) file
Arguments: file Name of the file containing buildset, the project and revison names to build.
Options: --out=* Path of directory to place bitstream files (default is in build directory).
The file should contain the buildset, project name followed by the revision name on each line.
Ex.
unb2b lofar2_unb2b_sdp_station lofar2_unb2b_sdp_station_full_wg
unb2c lofar2_unb2c_sdp_station lofar2_unb2c_sdp_station_full
@EndOfHelp@
exit 1
}
# parse cmdline
POSITIONAL=()
out=
while [[ $# -gt 0 ]]
do
case $1 in
--out=*)
out=${1#*=}
;;
-*|--*)
exit_with_error "Unknown option: "$1
;;
*) POSITIONAL+=("$1")
;;
esac
shift
done
if [ ${#POSITIONAL[@]} -gt 0 ]; then
set -- "${POSITIONAL[@]}"
fi
# check the positional parameters
if [ $# -lt 1 ]; then
exit_with_error "Wrong number of arguments specified."
@@ -57,13 +79,20 @@ readarray lines < <(sed -r '/^\s*$/d' $1)
# Build image for each line
for line in "${lines[@]}"
do
BUILDSET=$(echo $line | cut -d " " -f1)
PROJECT=$(echo $line | cut -d " " -f2)
REVISION=$(echo $line | cut -d " " -f3)
if [ -z ${REVISION} ]; then
build_image ${BUILDSET} ${PROJECT}
else
build_image ${BUILDSET} ${PROJECT} --rev=${REVISION}
do
BUILDSET=$(echo $line | cut -d " " -f1)
PROJECT=$(echo $line | cut -d " " -f2)
REVISION=$(echo $line | cut -d " " -f3)
if [ -z ${REVISION} ]; then
build_image ${BUILDSET} ${PROJECT}
else
build_image ${BUILDSET} ${PROJECT} --rev=${REVISION}
fi
# Copy resulting bitstream to $out directory
if [ ! -z "${out}" ]; then
if [ ! -d "${out}" ]; then
mkdir "${out}"
fi
done
cp "${RADIOHDL_BUILD_DIR}"/"${BUILDSET}"/quartus/"${REVISION}"/"${REVISION}"-* "${out}"
fi
done
Loading