From df7489ff61b9a450e4df8a2aed2187aafae75c79 Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Thu, 20 Aug 2015 16:20:08 +0200 Subject: [PATCH] travis/conda: add automated builds for kc705 nist_qc2 subtarget --- artiq/frontend/artiq_flash.sh | 20 ++++++++++++++++++-- conda/artiq/build.sh | 17 ++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/artiq/frontend/artiq_flash.sh b/artiq/frontend/artiq_flash.sh index 2ac6163ef..cbe4cca46 100755 --- a/artiq/frontend/artiq_flash.sh +++ b/artiq/frontend/artiq_flash.sh @@ -9,6 +9,8 @@ ARTIQ_PREFIX=$(python3 -c "import artiq; print(artiq.__path__[0])") # Default is kc705 BOARD=kc705 +# Default carrier board is nist_qc1 +CARRIER_BOARD=nist_qc1 while getopts "bBrht:d:f:" opt do @@ -53,17 +55,29 @@ do exit 1 fi ;; + c) + if [ "$OPTARG" == "nist_qc1" ] + then + CARRIER_BOARD=nist_qc1 + elif [ "$OPTARG" == "nist_qc2" ] + then + CARRIER_BOARD=nist_qc2 + else + echo "KC705 carrier board is either nist_qc1 or nist_qc2" + exit 1 + fi *) echo "ARTIQ flashing tool" echo "" echo "To flash everything, do not use any of the -b|-B|-r option." echo "" - echo "usage: $0 [-b] [-B] [-r] [-h] [-t kc705|pipistrello] [-d path]" + echo "usage: $0 [-b] [-B] [-r] [-h] [-c nist_qc1|nist_qc2] [-t kc705|pipistrello] [-d path] [-f path]" echo "-b Flash bitstream" echo "-B Flash BIOS" echo "-r Flash ARTIQ runtime" echo "-h Show this help message" echo "-t Target (kc705, pipistrello, default is: kc705)" + echo "-c Carrier board (nist_qc1, nist_qc2, default is: nist_qc1)" echo "-f Flash storage image generated with artiq_mkfs" echo "-d Directory containing the binaries to be flashed" exit 1 @@ -103,11 +117,12 @@ fi if [ "$BOARD" == "kc705" ] then UDEV_RULES=99-kc705.rules - BITSTREAM=artiq_kc705-nist_qc1-kc705.bit + BITSTREAM=artiq_kc705-${CARRIER_BOARD}-kc705.bit CABLE=jtaghs1_fast PROXY=bscan_spi_kc705.bit BIOS_ADDR=0xaf0000 RUNTIME_ADDR=0xb00000 + RUNTIME_FILENAME=runtime_${CARRIER_BOARD}.fbi FS_ADDR=0xb40000 if [ -z "$BIN_PREFIX" ]; then BIN_PREFIX=$ARTIQ_PREFIX/binaries/kc705; fi search_for_proxy $PROXY @@ -119,6 +134,7 @@ then PROXY=bscan_spi_lx45_csg324.bit BIOS_ADDR=0x170000 RUNTIME_ADDR=0x180000 + RUNTIME_FILENAME=runtime.fbi FS_ADDR=0x1c0000 if [ -z "$BIN_PREFIX" ]; then BIN_PREFIX=$ARTIQ_PREFIX/binaries/pipistrello; fi search_for_proxy $PROXY diff --git a/conda/artiq/build.sh b/conda/artiq/build.sh index b818cdf70..0f30a2453 100755 --- a/conda/artiq/build.sh +++ b/conda/artiq/build.sh @@ -16,15 +16,15 @@ BIN_PREFIX=$ARTIQ_PREFIX/binaries/ mkdir -p $ARTIQ_PREFIX/misc mkdir -p $BIN_PREFIX/kc705 $BIN_PREFIX/pipistrello -# build for KC705 +# build for KC705 NIST_QC1 cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 build-headers build-bios; cd - make -C soc/runtime clean runtime.fbi cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd - -# install KC705 binaries +# install KC705 NIST_QC1 binaries -cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/ +cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/runtime_nist_qc1.fbi cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/kc705/ cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc1-kc705.bit $BIN_PREFIX/kc705/ wget http://sionneau.net/artiq/binaries/kc705/flash_proxy/bscan_spi_kc705.bit @@ -44,6 +44,17 @@ cp $SRC_DIR/misoc/build/artiq_pipistrello-nist_qc1-pipistrello.bit $BIN_PREFIX/p wget http://www.phys.ethz.ch/~robertjo/bscan_spi_lx45_csg324.bit mv bscan_spi_lx45_csg324.bit $BIN_PREFIX/pipistrello/ +# build for KC705 NIST_QC2 + +cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 build-headers; cd - +make -C soc/runtime clean runtime.fbi +cd $SRC_DIR/misoc; $PYTHON make.py -X ../soc -t artiq_kc705 -s NIST_QC2 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd - + +# install KC705 NIST_QC2 binaries + +cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/runtime_nist_qc2.fbi +cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc2-kc705.bit $BIN_PREFIX/kc705/ + cp artiq/frontend/artiq_flash.sh $PREFIX/bin # misc