#!/bin/bash
if [ "$EUID" -ne 0 ]
- then echo "Please run as root"
+ then echo "Please run as root using 'sudo bash'"
exit
fi
apt-get build-dep yosys -y
apt-get remove yosys -y
-cd $SUDO_USER/home
+cd /home/$SUDO_USER/src
mkdir hdl_tools
cd hdl_tools
make -j$(nproc)
make install
-cd $SUDO_USER/home/hdl_tools
+cd /home/$SUDO_USER/src/hdl_tools
chown -R $SUDO_USER hdl_tools
chgrp -R $SUDO_USER hdl_tools
#!/bin/bash
-mkdir -p ~/opt/lsoc_mesa
-cd ~/opt
+
+mkdir -p ~/src/lsoc_mesa
+cd ~/src
git clone https://gitlab.freedesktop.org/mesa/drm.git
+
cd drm
mkdir build && cd build
-meson -Dbuildtype=release -Dprefix=/home/$USER/opt/lsoc_mesa ..
+meson -Dbuildtype=release -Dprefix=/home/$USER/src/lsoc_mesa ..
ninja install
-export PKG_CONFIG_PATH=~/opt/lsoc_mesa/lib/x86_64-linux-gnu/pkgconfig/
-export VK_ICD_FILENAMES=/home/$USER/opt/lsoc_mesa/share/vulkan/icd.d/libresoc_icd.x86_64.json
+
+export PKG_CONFIG_PATH=~/src/lsoc_mesa/lib/x86_64-linux-gnu/pkgconfig/
+export VK_ICD_FILENAMES=/home/$USER/src/lsoc_mesa/share/vulkan/icd.d/libresoc_icd.x86_64.json
export VK_LOADER_DEBUG=warn
export LIBRESOC_TRACE=1
-cd ~/opt
+
+cd ~/src
git clone https://git.libre-soc.org/git/mesa.git
cd mesa
git pull --rebase origin libresoc_dev
git checkout -b libresoc_dev
mkdir build && cd build
-meson -Dbuildtype=debug -Dprefix=/home/$USER/opt/lsoc_mesa -Dvulkan-drivers=libre-soc ..
+
+meson -Dbuildtype=debug -Dprefix=/home/$USER/src/lsoc_mesa \
+ -Dvulkan-drivers=libre-soc ..
ninja install