From: Luke Kenneth Casson Leighton Date: Fri, 12 Mar 2021 10:37:49 +0000 (+0000) Subject: clean up build scripts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59c5c55075f888d7bfbf6d4c194980a0a1dd34d2;p=dev-env-setup.git clean up build scripts --- diff --git a/hdl-dev-repos b/hdl-dev-repos index 4116609..a85d82b 100755 --- a/hdl-dev-repos +++ b/hdl-dev-repos @@ -1,6 +1,6 @@ #!/bin/bash if [ "$EUID" -ne 0 ] - then echo "Please run as root" + then echo "Please run as root using 'sudo bash'" exit fi diff --git a/hdl-tools-yosys b/hdl-tools-yosys index 6946aed..0446f0b 100755 --- a/hdl-tools-yosys +++ b/hdl-tools-yosys @@ -1,6 +1,6 @@ #!/bin/bash if [ "$EUID" -ne 0 ] - then echo "Please run as root" + then echo "Please run as root using 'sudo bash'" exit fi @@ -11,7 +11,7 @@ apt-get update -y 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 @@ -40,6 +40,6 @@ cd build 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 diff --git a/lsoc-mesa-dev-env-setup b/lsoc-mesa-dev-env-setup index 2439580..f40bb6a 100755 --- a/lsoc-mesa-dev-env-setup +++ b/lsoc-mesa-dev-env-setup @@ -1,20 +1,26 @@ #!/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