I wanted to share my build of Lakka for the Banana Pi M1.
The last version of Lakka to officially support the Banana Pi was 2.1-rc5 and it is not available for download anymore, so I added support for the current development version of Lakka (v3.x).
All credit goes to the original creators of Lakka - I am just making this build available for download again.
You can download the images on my GitHub page:
Releases · asdf288/Lakka-LibreELEC (github.com) (latest: v3.7 from December 2021)
Source code: asdf288/Lakka-LibreELEC legacy branch (github.com) (build instructions see below)
If you need composite TV output, download the script.bin file from here and replace the one on the SD card with it. This is for PAL, but I could upload an NTSC version if anyone is interested.
To change the screen resolution and refresh rate (default is 1280x1024), open the file “uEnv.txt” on the first SD card partition and add your resolution setting to the kernel command line. Example:
console=ttyS0,115200 console=tty0 boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 rootwait quiet loglevel=2 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x1024p60
If you need analog audio output, connect over SSH and type the following commands:
cp /etc/asound.conf /storage/.config/asound.conf nano /storage/.config/asound.conf
Use the text editor to replace sunxisndhdmi with sunxicodec, press CTRL+X to save, then reboot.
If you have a controller connected over USB (or a wireless controller with USB receiver) and it doesn’t seem to work, try to reconnect it after Retroarch has started. The kernel seems to have a bug where USB devices are not properly recognized if connected at boot time, especially when connected over a hub. But it usually works if they are reconnected after the boot has completed.
All cores from the current development version of Lakka are available, except for those that do not run on the Banana Pi due to hardware limitations (the GPU does not support OpenGL ES 3.x). I also added the 2019 version of Mupen64plus-next as a separate core in Retroarch because this older version runs much faster on older devices. Together with overclocking, this is enough to play some easier to emulate N64 games such as Super Mario 64.
You can overclock the Banana Pi for much better performance. Some of the more demanding cores such as Snes9x2010 and Genesis Plus GX do have some minor dips here and there (from 60 to 55 FPS), especially in more demanding games. With overclocking they should be running at full speed. N64 performance is also greatly improved.
Connect to the BPi over SSH and issue the following commands:
echo 1152000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo 1152000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
1152000 means 1152 MHz. This usually works well. The default clock is 960 MHz. If the system freezes at any point, try a lower clock value.
These changes will be reset after a reboot. To make it permanent, you can add these commands to the autostart.sh script:
echo "echo 1152000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" >> ~/.config/autostart.sh echo "echo 1152000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq" >> ~/.config/autostart.sh
You could also create the autostart.sh file on another computer and copy it over using Samba (put it into the folder named Configfiles). This will also work if you cannot access the command line for some reason.
If you want to create your own Lakka image to modify the configuration or add updates, here’s how:
git clone https://github.com/asdf288/Lakka-LibreELEC.git cd Lakka-LibreELEC git checkout legacy DISTRO=Lakka PROJECT=Allwinner-legacy DEVICE=A20 UBOOT_SYSTEM=bananapi ARCH=arm make image