# Add convenience variable to chroot user .bash_profile
echo -e 'export PATH=/usr/lib/ccache:"\044PATH"\nexport DISPLAY=:0.0\nexport ALLIANCE_TOP=/home/$SUDO_USER/alliance/install\nexport YOSYS_TOP=/home/$SUDO_USER/yosys\nexport LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib:\044{LD_LIBRARY_PATH}\nexport LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib64:\044{LD_LIBRARY_PATH}' > /home/$SUDO_USER/.bash_profile
-chown $SUDO_USER /home/$SUDO_USER/.bash_profile
-chgrp $SUDO_USER /home/$SUDO_USER/.bash_profile
+sudo chown $SUDO_USER /home/$SUDO_USER/.bash_profile
+sudo chgrp $SUDO_USER /home/$SUDO_USER/.bash_profile
echo -e "Added 'export PATH=/usr/lib/ccache:\"\044PATH\"\nexport DISPLAY=:0.0' to /home/$SUDO_USER/.bash_profile to speed up rebuilds"
cd yosys
git checkout 049e3abf9baf795e69b9ecb9c4f19de6131f8418
make config-clang
-# WAY too heavy a load - make -j$(nproc)
+# WAY too heavy a load (18+) - make -j$(nproc)
make
cd /home/$SUDO_USER/yosys
"
make cgt
-cd /home/$SUDO_USER/src/nextpnr
-chown -R $SUDO_USER .
-chgrp -R $SUDO_USER .
+cd /home/$SUDO_USER/
+sudo chown -R $SUDO_USER *
+sudo chgrp -R $SUDO_USER *