This small repository contains a couple helpers, scripts and documentation around the Retrostone 2 Pro.
It represents also how I set up my Retrostone 2 Pro and will be the foundation for my next installation.
The Retrostone 2 Pro can be purchased on http://8bcraft.com.
-
Download from http://www.retrorangepi.org/download/
-
Flash SD Card
-
Run Installation
-
Setup wifi
-
Upload SSH keys for simpler login
Default password for userpi
ispi
.
Default password forroot
isorangepi
.ssh root@rs2 "mkdir ~/.ssh" scp ~/.ssh/id_rsa.pub root@rs2:~/.ssh/authorized_keys ssh pi@rs2 "mkdir ~/.ssh" scp ~/.ssh/id_rsa.pub pi@rs2:~/.ssh/authorized_keys
-
Change the user passwords
Default password for userpi
ispi
.
Default password forroot
isorangepi
.ssh root@rs2 passwd ssh pi@rs2 passwd
-
Format eMMC storage for the home directory
(This step is only necessary on the very first setup of the Retrostone. If it was done before, please skip)ssh pi@rs2 sudo fdisk /dev/mmcblk1
p
to list all partitions, thend
and a number to delete all existing partitions, thenw
to write the changesn
to create a new partition, then use all the defaults, thenw
to write the changes.Format disk and copy home directory (you have to ensure that you are not in a directory under /home)
sudo mkfs.ext4 -L "emmc" /dev/mmcblk1p1 sudo mount /dev/mmcblk1p1 /mnt sudo mv /home /mnt sudo umount /mnt
-
Add disk to the fstab so it is mounted on boot
sudo cat >>/etc/fstab /dev/mmcblk1p1 /home ext4 defaults 0 0
A small shell script which observes the battery state. If < 3% of capacity is left, it will beep 5 times and afterwards call shutdown -h 3
so you have 3 minutes to save all game state before it is going to be shutdown.
sudo cp src/autoshutdown.service /etc/systemd/system/
sudo cp src/autoshutdown.sh /usr/bin/
sudo chmod 755 /usr/bin/autoshutdown.sh
sudo systemctl enable autoshutdown.service
sudo systemctl start autoshutdown.service
Adding the Enable WiFi switch dirctly into the Retropie Menu as it is annoying always having to open a submenu to do so.
ln -s ~/RetroPie/retropiemenu/RetrOrangePi/Wifi/Enable.sh ~/RetroPie/retropiemenu/Enable\ Wifi.sh
After a long period of intense playing on a device without mounted joystick it happened that the character moves non-stop to the left. Only a restart of the device could fix it, but only for a very limited timeframe. I updated the GPIO controller and disabled the joystick code. To install and use the updated code:
cp src/tz_gpio_controller.py /home/pi/RetrOrangePi/GPIO/drivers/tz_gpio_controller.py
ps aux | grep tz_gpio | grep sudo | awk '{ printf("sudo kill -9 %s\n", $2); }' | /bin/bash
sudo python /home/pi/RetrOrangePi/GPIO/drivers/tz_gpio_controller.py &
No additional action required after restart of the Retrostone.