From: Raptor Engineering Development Team Date: Wed, 6 Jul 2022 19:06:03 +0000 (+0000) Subject: Add Kestrel install and build scripts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92669ca5d9e2eaa7b25d210d78798f959aaa2d44;p=dev-env-setup.git Add Kestrel install and build scripts --- diff --git a/build_kestrel b/build_kestrel new file mode 100755 index 0000000..5fa50eb --- /dev/null +++ b/build_kestrel @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Copyright 2022 Raptor Engineering, LLC +# Licensed under the terms of the GNU LGPLv3+ +# +# Ensure that the LibreSoC packages and HDL tools +# are installed prior to running this script! + +set -e + +echo "Refreshing Python data files from current LibreSoC sources..." +cd /home/$SUDO_USER/src/soc +python3 src/soc/simple/issuer_verilog.py --fabric-compat --enable-core --enable-mmu --enable-xics --disable-svp64 --disable-pll --debug dmi external_core_top.v +cp -Rp external_core_top.v /home/src/kestrel/pythondata-cpu-libresoc/pythondata_cpu_libresoc/hdl/external_core_top.v + +echo "Building Kestrel..." +cd /home/$SUDO_USER/src/kestrel/litex-boards/litex_boards/targets +./rcs_arctic_tern_bmc_card.py --device=LFE5UM --cpu-type=libresoc --cpu-variant=standard+irq --with-ethernet --with-video --build --nextpnr-seed 1 --sys-clk-freq=50e6 --remote-ip 192.168.1.1 diff --git a/hdl-kestrel-repos b/hdl-kestrel-repos new file mode 100755 index 0000000..c8b6d82 --- /dev/null +++ b/hdl-kestrel-repos @@ -0,0 +1,119 @@ +#!/bin/bash +if [ "$EUID" -ne 0 ] + then echo "Please run as root using 'sudo bash'" + exit +fi + +runuser $SUDO_USER --preserve-environment -c ' +cd /home/$SUDO_USER +mkdir -p src/kestrel +cd src/kestrel +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/litex.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/litex-boards.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/liteiclink.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/liteeth.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/litedram.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-cpu-libresoc.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/tercelspi.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-tercelspi.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/aquilalpc.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-aquilalpc.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/swiftfsi.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-swiftfsi.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/opencoresi2c.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-opencoresi2c.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/simplertc.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-simplertc.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/simplepwm.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-simplepwm.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/arcticterngpio.git +git clone http://gitlab.raptorengineering.com/kestrel-collaboration/kestrel-litex/pythondata-peripheral-arcticterngpio.git +' + +# litex +cd /home/$SUDO_USER/src/kestrel/litex +python3 setup.py develop + +# litex-boards +cd /home/$SUDO_USER/src/kestrel/litex-boards +python3 setup.py develop + +# liteiclink +cd /home/$SUDO_USER/src/kestrel/liteiclink +python3 setup.py develop + +# liteeth +cd /home/$SUDO_USER/src/kestrel/liteeth +python3 setup.py develop + +# litedram +cd /home/$SUDO_USER/src/kestrel/litedram +python3 setup.py develop + +# pythondata-cpu-libresoc +cd /home/$SUDO_USER/src/kestrel/pythondata-cpu-libresoc +python3 setup.py develop + +# tercelspi +cd /home/$SUDO_USER/src/kestrel/tercelspi +python3 setup.py develop + +# pythondata-peripheral-tercelspi +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-tercelspi +python3 setup.py develop + +# aquilalpc +cd /home/$SUDO_USER/src/kestrel/aquilalpc +python3 setup.py develop + +# pythondata-peripheral-aquilalpc +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-aquilalpc +python3 setup.py develop + +# swiftfsi +cd /home/$SUDO_USER/src/kestrel/swiftfsi +python3 setup.py develop + +# pythondata-peripheral-swiftfsi +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-swiftfsi +python3 setup.py develop + +# opencoresi2c +cd /home/$SUDO_USER/src/kestrel/opencoresi2c +python3 setup.py develop + +# pythondata-peripheral-opencoresi2c +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-opencoresi2c +python3 setup.py develop + +# simplertc +cd /home/$SUDO_USER/src/kestrel/simplertc +python3 setup.py develop + +# pythondata-peripheral-simplertc +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-simplertc +python3 setup.py develop + +# simplepwm +cd /home/$SUDO_USER/src/kestrel/simplepwm +python3 setup.py develop + +# pythondata-peripheral-simplepwm +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-simplepwm +python3 setup.py develop + +# arcticterngpio +cd /home/$SUDO_USER/src/kestrel/arcticterngpio +python3 setup.py develop + +# pythondata-peripheral-arcticterngpio +cd /home/$SUDO_USER/src/kestrel/pythondata-peripheral-arcticterngpio +python3 setup.py develop + +cd ../ +chown -R $SUDO_USER . +chgrp -R $SUDO_USER . +echo -e " +\e[1;91mAll Libre-SOC Kestrel dependenices should now be installed.\e[0m +" +