2013-04-25, 11:29
I've seen the topic of XMBC/RetroPlayer on RaspberryPi come up a few times. I spent a little bit of time building and testing this based on Raspbmc and I ran into many of the issues that I pointed out early on in this thread (speed and lack of sound). I'm not sure that the raspberry pi will ever be capable of running xbmc w/retroplayer at playable speeds for any emulator, but for anybody who is looking to test the same, here are the exact steps that I used to build on my 32-bit x86 Ubuntu 10.04 system:
Grab the Raspbmc root file system, untar it, and chroot to it:
sudo su
(enter password for root access)
mkdir -p /opt/rpi_raspbmc/rootfs
cd /opt/rpi_raspbmc
wget http://download.raspbmc.com/downloads/so...dfp.tar.gz
tar -xzf buildfs-bcm_rootfs-raspbmc* -C rootfs/
cp /etc/network/interfaces /opt/rpi_raspbmc/rootfs/etc/network/interfaces
cp /etc/resolv.conf /opt/rpi_raspbmc/rootfs/etc/resolv.conf
mount proc -t proc /opt/rpi_raspbmc/rootfs/proc
chroot /opt/rpi_raspbmc/rootfs
(you are now in the root file system that we will use for cross compiling for the Raspberry Pi)
Grab the XBMC/retroplayer branch, selectively patch it, fix libbson, and build it:
mkdir -p /src/retroplayer
cd /src/retroplayer
git clone https://github.com/garbear/xbmc.git
cd xbmc
wget http://svn.stmlabs.com/svn/raspbmc/patch...ends.patch
wget http://svn.stmlabs.com/svn/raspbmc/patch...-sdk.patch
wget http://svn.stmlabs.com/svn/raspbmc/patch...ings.patch
patch -p1 < depends.patch
patch -p1 < setup-sdk.patch
patch -p1 < GUISettings.patch
sh tools/rbp/setup-sdk.sh
cd tools/rbp/depends/xbmc/
make
(ignore any errors about locales during this step)
cd ../../../..
echo "Fixing cross-compiler for libbson..."
sed -i 's/^CC:=.*/CC:=\/toolchain\/arm-bcm2708hardfp-linux-gnueabi\/bin\/arm-bcm2708hardfp-linux-gnueabi-gcc/g' lib/bson/Makefile
make
Create a tarball of the build and copy it over to your running Raspbmc system:
wget http://svn.stmlabs.com/svn/raspbmc/patch...tarball.sh
make install
sh create_tarball.sh
cd /opt
apt-get install ftp
ftp <raspbmc IP address>
(username = pi)
(password = raspberry)
mput xbmc-rbp-*.tar.gz
Untar the new build on your Raspbmc system:
(ssh to your raspbmc system)
sudo initctl stop xbmc
sudo tar -xzf xbmc-rbp*.tar.gz -C /opt
rm ~/.xbmc-current
sudo initctl start xbmc
Setup an emulator in Raspbmc (NES in this example):
Install the FCEU-Next emulator
The install will complain that this is an "Incompatible DLL" due to the addon being compiled for x86 and proceed to disable the addon
(ssh to your raspbmc system)
wget -O binariesDownload.tar.bz2 http://blog.petrockblock.com/?wpdmdl=3
sudo apt-get install bzip2
tar -jxvf binariesDownload.tar.bz2
cp RetroPie/emulatorcores/fceu-next/fceumm-code/fceumm_libretro.so .xbmc/addons/gameclient.fceu-next/libretro-fceu.so
(reenable the addon)
At this point, you can select an NES ROM from the file manager and see it run on the Pi!
For those of you who don't feel like compiling, you can get my compiled version from:
http://www.filedropper.com/xbmc-rbp-20130425-3e346f5tar
You will still need to go through the "Untar the new build on your Raspbmc system" and "Setup an emulator in Raspbmc" steps.
This was just a fun project to see how the pi performs. I don't really have the skills necessary to see if it is possible to speed this up, or fix the sound. Maybe garbear is willing to look into this, but if I was him, I would spend my time getting things working well on more capable platforms well before I even considered working on performance on a $35 device.
Thanks again for your work on this garbear! If you look at my steps above, you will see that there is an issue with the makefile for libbson. The line above is nothing more than a dirty hack, so you may want to investigate a proper fix.
Grab the Raspbmc root file system, untar it, and chroot to it:
sudo su
(enter password for root access)
mkdir -p /opt/rpi_raspbmc/rootfs
cd /opt/rpi_raspbmc
wget http://download.raspbmc.com/downloads/so...dfp.tar.gz
tar -xzf buildfs-bcm_rootfs-raspbmc* -C rootfs/
cp /etc/network/interfaces /opt/rpi_raspbmc/rootfs/etc/network/interfaces
cp /etc/resolv.conf /opt/rpi_raspbmc/rootfs/etc/resolv.conf
mount proc -t proc /opt/rpi_raspbmc/rootfs/proc
chroot /opt/rpi_raspbmc/rootfs
(you are now in the root file system that we will use for cross compiling for the Raspberry Pi)
Grab the XBMC/retroplayer branch, selectively patch it, fix libbson, and build it:
mkdir -p /src/retroplayer
cd /src/retroplayer
git clone https://github.com/garbear/xbmc.git
cd xbmc
wget http://svn.stmlabs.com/svn/raspbmc/patch...ends.patch
wget http://svn.stmlabs.com/svn/raspbmc/patch...-sdk.patch
wget http://svn.stmlabs.com/svn/raspbmc/patch...ings.patch
patch -p1 < depends.patch
patch -p1 < setup-sdk.patch
patch -p1 < GUISettings.patch
sh tools/rbp/setup-sdk.sh
cd tools/rbp/depends/xbmc/
make
(ignore any errors about locales during this step)
cd ../../../..
echo "Fixing cross-compiler for libbson..."
sed -i 's/^CC:=.*/CC:=\/toolchain\/arm-bcm2708hardfp-linux-gnueabi\/bin\/arm-bcm2708hardfp-linux-gnueabi-gcc/g' lib/bson/Makefile
make
Create a tarball of the build and copy it over to your running Raspbmc system:
wget http://svn.stmlabs.com/svn/raspbmc/patch...tarball.sh
make install
sh create_tarball.sh
cd /opt
apt-get install ftp
ftp <raspbmc IP address>
(username = pi)
(password = raspberry)
mput xbmc-rbp-*.tar.gz
Untar the new build on your Raspbmc system:
(ssh to your raspbmc system)
sudo initctl stop xbmc
sudo tar -xzf xbmc-rbp*.tar.gz -C /opt
rm ~/.xbmc-current
sudo initctl start xbmc
Setup an emulator in Raspbmc (NES in this example):
Install the FCEU-Next emulator
The install will complain that this is an "Incompatible DLL" due to the addon being compiled for x86 and proceed to disable the addon
(ssh to your raspbmc system)
wget -O binariesDownload.tar.bz2 http://blog.petrockblock.com/?wpdmdl=3
sudo apt-get install bzip2
tar -jxvf binariesDownload.tar.bz2
cp RetroPie/emulatorcores/fceu-next/fceumm-code/fceumm_libretro.so .xbmc/addons/gameclient.fceu-next/libretro-fceu.so
(reenable the addon)
At this point, you can select an NES ROM from the file manager and see it run on the Pi!
For those of you who don't feel like compiling, you can get my compiled version from:
http://www.filedropper.com/xbmc-rbp-20130425-3e346f5tar
You will still need to go through the "Untar the new build on your Raspbmc system" and "Setup an emulator in Raspbmc" steps.
This was just a fun project to see how the pi performs. I don't really have the skills necessary to see if it is possible to speed this up, or fix the sound. Maybe garbear is willing to look into this, but if I was him, I would spend my time getting things working well on more capable platforms well before I even considered working on performance on a $35 device.
Thanks again for your work on this garbear! If you look at my steps above, you will see that there is an issue with the makefile for libbson. The line above is nothing more than a dirty hack, so you may want to investigate a proper fix.