Skip to content

Commit

Permalink
travis/conda: add automated builds for kc705 nist_qc2 subtarget
Browse files Browse the repository at this point in the history
  • Loading branch information
fallen committed Aug 20, 2015
1 parent c6bba4d commit df7489f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
20 changes: 18 additions & 2 deletions artiq/frontend/artiq_flash.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 14 additions & 3 deletions conda/artiq/build.sh
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit df7489f

Please sign in to comment.