Skip to content

Instantly share code, notes, and snippets.

@vyn20
Last active October 14, 2021 09:53
Show Gist options
  • Save vyn20/8f8b0cd40e95ac18c539cd29ecd4c3d2 to your computer and use it in GitHub Desktop.
Save vyn20/8f8b0cd40e95ac18c539cd29ecd4c3d2 to your computer and use it in GitHub Desktop.
How to create a modern desktop with the lowest RAM consumption and test the GPU performance with Panfrost.
#!/bin/bash
user=$(whoami)
#This script is based on NicoD (installPanfrost.sh) https://forum.armbian.com/profile/8801-nicod/
echo "----------------------------------------------------------------------------------------------------------"
echo "How to create a modern desktop with the lowest RAM consumption and test the GPU performance with Panfrost."
echo "----------------------------------------------------------------------------------------------------------"
echo "Update and Upgrade Armbian"
echo "----------------------------------------------------------------------------------------------------------"
apt -y update && apt -y upgrade
echo "----------------------------------------------------------------------------------------------------------"
echo "Tweak Armbian to enable Panfrost"
echo "----------------------------------------------------------------------------------------------------------"
rm /etc/X11/xorg.conf.d/02-driver.conf
echo "----------------------------------------------------------------------------------------------------------"
echo "Install dependencies"
echo "----------------------------------------------------------------------------------------------------------"
apt -y install libxcb-shm0-dev flex bison python3-mako libwayland-egl-backend-dev libxcb-dri3-dev libxcb-dri2-0-dev libxcb-glx0-dev libx11-xcb-dev libxcb-present-dev libxcb-sync-dev libxxf86vm-dev libxshmfence-dev libxrandr-dev libwayland-dev libxdamage-dev libxext-dev libxfixes-dev x11proto-dri2-dev x11proto-dri3-dev x11proto-present-dev x11proto-gl-dev x11proto-xf86vidmode-dev libexpat1-dev libudev-dev gettext glmark2 glmark2-es2 mesa-utils xutils-dev libpthread-stubs0-dev ninja-build bc flex bison cmake git valgrind llvm llvm-8-dev python3-pip pkg-config zlib1g-dev wayland-protocols
echo "----------------------------------------------------------------------------------------------------------"
echo "Install meson"
echo "----------------------------------------------------------------------------------------------------------"
wget http://ftp.de.debian.org/debian/pool/main/m/meson/meson_0.57.1-1_all.deb
dpkg -i meson_0.57.1-1_all.deb
echo "----------------------------------------------------------------------------------------------------------"
echo "Install mesa DRM"
echo "----------------------------------------------------------------------------------------------------------"
git clone "https://gitlab.freedesktop.org/mesa/drm.git"
cd drm
meson build --prefix=/usr
ninja -C build
ninja -C build install
cd ..
echo "----------------------------------------------------------------------------------------------------------"
echo "Install mesa"
echo "----------------------------------------------------------------------------------------------------------"
git clone -b 21.0 "https://gitlab.freedesktop.org/mesa/mesa.git"
cd mesa
meson -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dllvm=false -Dprefix=/usr build/
ninja -C build/
ninja -C build/ install
cd ..
echo "----------------------------------------------------------------------------------------------------------"
echo "Install Lubuntu Desktop and apps"
echo "----------------------------------------------------------------------------------------------------------"
apt install -y lubuntu-desktop firefox vlc
echo "----------------------------------------------------------------------------------------------------------"
echo "Cheers!, please reboot."
echo "----------------------------------------------------------------------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment