46e83228c6c1c14872df722d51deec66e8601852
[dev-env-setup.git] / build_kestrel
1 #!/bin/bash
2 #
3 # Copyright 2022 Raptor Engineering, LLC
4 # Licensed under the terms of the GNU LGPLv3+
5 #
6 # Ensure that the LibreSoC packages and HDL tools
7 # are installed prior to running this script,
8 # as well as the kestrel repos
9 #
10 # ./install-hdl-apt-reqs
11 # ./hdl-dev-repos
12 # ./hdl-tools-yosys
13 # ./ppc64-gdb-gcc
14 # ./nextpnr-ecp5
15 # ./hdl-kestrel-repos
16
17 set -e
18
19 export KESTREL=/home/$SUDO_USER/src/kestrel
20 echo "Refreshing Python data files from current LibreSoC sources..."
21 cd /home/$SUDO_USER/src/soc
22 python3 src/soc/simple/issuer_verilog.py --fabric-compat --enable-core \
23 --enable-mmu --enable-xics \
24 --disable-svp64 --disable-pll \
25 --debug dmi external_core_top.v
26 cp -Rp external_core_top.v \
27 $KESTREL/pythondata-cpu-libresoc/pythondata_cpu_libresoc/hdl/external_core_top.v
28
29 echo "Building Kestrel..."
30 cd $KESTREL/litex-boards/litex_boards/targets
31 ./rcs_arctic_tern_bmc_card.py --device=LFE5UM --cpu-type=libresoc \
32 --cpu-variant=standard+irq \
33 --with-ethernet --with-video \
34 --build --nextpnr-seed 1 \
35 --sys-clk-freq=50e6 --remote-ip 192.168.1.1