- Burn the Raspberry Pi OS Lite Buster on an SD Card. Use Raspberry Pi Imager to turn on SSH and specify own username and password. If Buster isn't showing in the imager then old images could be found at here.
- Put in the SD card and let it expand the file system and reboot to login.
Buster is needed because it has the libraries in expected location, i.e., /opt/vc
.
-
Edit
/etc/network/interfaces
auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp
-
Edit
/etc/wpa_supplicant/wpa_supplicant.conf
network={ ssid="YOUR_NETWORK_NAME" psk="YOUR_NETWORK_PASSWORD" key_mgmt=WPA-PSK }
-
Reboot
Launch sudo raspi-config
and then select Performance Options > Overclock > Turbo
Or these are working settings to put on /boot/config.txt
:
arm_freq=950
core_freq=250
sdram_freq=450
force_turbo=0
over_voltage=6
over_voltage_sdram=0
gpu_freq=250
sudo dphys-swapfile swapoff
sudo vi /etc/dphys-swapfile
> CONF_SWAPSIZE=1024
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
sudo apt update
sudo apt upgrade
sudo apt install build-essential libasound2-dev libudev-dev libusb-1.0-0-dev
- Download source:
curl -LO 'https://github.com/libretro/RetroArch/archive/v1.12.0.tar.gz'
- Unpack:
tar -zxvf v1.12.0.tar.gz
- Change to source folder:
cd RetroArch-1.12.0
- Export flags:
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux"
- Configure:
./configure --disable-vg --disable-al --disable-cg --disable-sdl --disable-sdl2 --disable-ssl --disable-x11 --enable-opengles --disable-kms --disable-x11 --enable-floathard --enable-zlib --enable-freetype --enable-translate --enable-cdrom --enable-hid --enable-libusb --disable-discord --disable-langextra
- Compile:
make
- Install:
make install
- Launch:
retroarch
It should launch without any errors. Although, it is missing assets (images, fonts, etc.), controller configurations, and cores.
Navigate to Online Updater, then:
- Update Autoconfig Profiles
- Download Assets
Cores are individual system libraries that are also built as binaries. The official link no longer has Armv6 binaries, which are required for RPi1. So we use prebuilt cores extracted from Lakka. Download them from this repo's cores. And move them to ~/.config/retroarch/cores
.
The only way until now is to scp
roms to the ~/.config/retroarch/downloads
. Then scan for the new roms and play!
For me, unfortunately, the 8bitdo SN30 Pro doesn't work via USB. It is detected but no buttons work. So I went for configuring bluetooth. The USB bluetooth module works out of the box.
-
Install bluetooth package to fix issue where paired devices do not pair after getting disconnected:
sudo apt install bluetooth
-
Pair and connect devices using
bluetoothctl
.> scan on > scan off > trust <device MAC> > pair <device MAC> > connect <device MAC>
-
There is an efficient native API for video rendering on Raspberry Pi called DispmanX, but seems like RetroArch no longer supports it. So have to use OpenGL.
-
Neon (
--enable-neon
) is not supported by Raspberry Pi Model B. So it should not be enabled during./configure
. See https://bugs.launchpad.net/raspbian/+bug/1734592.
vcgencmd measure_temp
vcgencmd measure_clock arm|core
vcgencmd get_mem arm|gpu
free -h
- Full list of
vcgencmd
: https://forums.raspberrypi.com/viewtopic.php?t=158157#p1029332 ldd binary
to see all modulesreadelf -A file
for details of filelsmod
for all loaded modulesmodprobe modulename
to load a module
- https://pimylifeup.com/raspberry-pi-overclock/
- https://www.mobilefish.com/developer/raspberry_pi/raspberry_pi_quickguide_overclock_manually.html
- https://www.tomshardware.com/how-to/overclock-any-raspberry-pi
- https://www.cyberciti.biz/faq/linux-find-out-raspberry-pi-gpu-and-arm-cpu-temperature-command/
- https://gist.github.com/AlexMax/32e5d038a66ce57253e740ea75736805
- https://www.reddit.com/r/RetroArch/comments/l158qt/best_performing_retroarch_build_on_a_raspberry_pi/
- https://github.com/libretro/Lakka-LibreELEC/blob/Lakka-v3.x/packages/libretro/retroarch/package.mk
- https://github.com/libretro/Lakka-LibreELEC/blob/Lakka-v5.x/packages/lakka/retroarch_base/retroarch/package.mk