silas
Posts: 28
Joined: Sat Jan 14, 2012 11:02 am

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 4:27 pm

I will not be available for about a week, and also no new images until then :(

I nearly have a new image ready, but this will just be for those who like experimenting, because it isn't finished, and it's not tested.

Experimental images:
Changelog:
Fixed restart/shutdown
Fixed exit from xbmc
A tiny bit smoother UI (running at about 40fps)
Added usbmount package (automounts usb drives)
A even smaller 4GB image (untested)

Download:

The files are not fully uploaded yet, but will be available in about 30 minutes from now.

The normal image:
http://silenz.se/download/raspbian-xbmc ... img.tar.gz
The small one, now at 3.9GB (experimental):
http://silenz.se/download/raspbian-xbmc ... img.tar.gz

I have had some problems with my computer lately (most likely a halfway broken hard drive ;) ), so this time they are in tar.gz instead of 7zip, so they are about 1.1GB to download instead. If someone would like to upload them in 7zip, thats ok for me.

See you in a week! :D
romprod wrote:silas I have tried your raspbian-xbmc-2012-07-19-small.img 4GB image but I'm unable to write it to my card. I get an error message back saying "Not enough space on disk: Size 7744512 secotrs Available: 7626752 sectors Sector size: 512"

I'm using Win32 Disk Imager

Am I doing anything wrong or is there anything that I can do to make it fit on my "4GB" card?

Thanks.
Seems like your card was even smaller then tomaz's. It should work with this image

Alvin Spangles
Posts: 3
Joined: Fri Jul 20, 2012 3:31 pm

Re: Is my Pi faulty?

Fri Jul 20, 2012 4:37 pm

dom wrote:
Alvin Spangles wrote:Hello everyone,

I've had my Pi for a while now and it's been good as gold with various different OSs and roles I've tried it at (desktop computer running Citrix sessions, headless web server etc) so I'm pretty happy with the way it performs so far. The trouble is I've tried three different implementations of XBMC, including compiling my own OpenELEC and lastly the Raspian based image posted here, and they all seem to instantly freeze my Pi once the menu screen has loaded and all the status lights except for the power one go out. Only way to reset is to yank the power. I've got no overclocking set, a good power supply and have tried a variety of SD cards to help rule out these factors. If, using the Silas build posted here, I skip XBMC at startup and load Raspian then everything works perfectly.

Any ideas would be appreciated.
Does hello_triangle2 work? (from /opt/vc/src/hello_pi). That uses OpenGL ES2 and consumes quite a lot of power (like XBMC).
It does sound like a power supply problem. Can you measure voltage between TP1 and TP2 when launching XBMC.

Hello_triangle and hello_triangle2 both work with about 4.6V across the test points. I'll need to reimage an SD card to get it to fail and in the mean time I'll go and see if I can dig up (or make) another power supply with the necessary oomph if that's the problem, which I'm now suspecting it might be...

Thanks for the help.

jmg123
Posts: 21
Joined: Thu Sep 22, 2011 6:39 pm

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 4:45 pm

Tavalin wrote: Does the audio only streaming work on this?
Video streaming works, (tried via youtube app on my iphone)
Audio dosen't (tried via iplayer website, and itunes on my macbook)
DGreenMan wrote: That is great any chance you creat a end user image


Thank you ever so much for you work and more to he point thank you for sharing it :)
I will be able to create a full user image, but my setup is a little complicated, as I use a usb stick for the kernel and filesystem, and only use the sd card to first boot from. Unfortunately I won't be able to create a proper fresh end user image today or tomorrow.

In the meantime though, I have bzipped up the compiled libraries and binaries, and put it on my dropbox account.

xbmc.tbz contains the xbmc stuff from:
/usr/lib
/usr/bin
/usr/share
/usr/share/doc

Installed is a text file containing all the packages installed on my system

Hopefully this is enough for people to get it working until I can package it into a proper SD card image

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 4:49 pm

Hi, Thanks Silas for the XBMC image. It works well.

For anyone wanting to use a Harmony remote to control XBMC on the Pi the Flirc infrared USB adapter (http://flirc.tv) works really well. Setting up a Flirc for use with a Harmony remote is described here: http://forum.flirc.tv/index.php?/topic/ ... y-remotes/

I've got the Flirc adapter plugged directly into the Pi with no other USB peripherals attached and it doesn't appear to be causing any power issues.

I used the Windows Flirc App to configure the buttons for XBMC and then just plugged the Flirc into the Pi.

payneardo
Posts: 18
Joined: Wed Jul 18, 2012 5:28 pm

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 4:55 pm

Thanks to MKV21 that's great will have a play with that later, I nearly got there just not quite but thanks for sharing your code :)

and also massive thanks to silas for another image, will have another play with that as well :)

Just a quick question I hope somebody can clarify for them :)

to backup my library from one image to another is it just the Database & Thumbnails directories within the .xbmc/userdata directory and the sources.xml file from within the .xbmc/userdata directory ??

basil
Posts: 1
Joined: Thu Jan 12, 2012 2:17 pm

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 6:17 pm

Hi all,

I built XBMC overnight, took about 13 hours and worked perfectly first time 8-) With a bit of overclocking ([email protected]) it plays really nicely.

I'm using the iPlayer plugin which works mostly but seems to time out before playing half the shows and always times out on HD programmes. There doesn't seem to a log file where it should be (~/.xbmc/temp).

I tried creating that folder and giving it write permissions (0777) and create an advancedsettings.xml file to set the debug level to 2 but I have no idea if it is even reading that file. Any tips on finding or enabling the log file so I can get more info on what is causing the iPlayer problems?

Thanks

DGreenMan
Posts: 13
Joined: Tue Jul 10, 2012 3:44 pm

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 8:49 pm

jmg123 wrote:
Tavalin wrote: Does the audio only streaming work on this?
Video streaming works, (tried via youtube app on my iphone)
Audio dosen't (tried via iplayer website, and itunes on my macbook)
DGreenMan wrote: That is great any chance you creat a end user image


Thank you ever so much for you work and more to he point thank you for sharing it :)


I will be able to create a full user image, but my setup is a little complicated, as I use a usb stick for the kernel and filesystem, and only use the sd card to first boot from. Unfortunately I won't be able to create a proper fresh end user image today or tomorrow.

In the meantime though, I have bzipped up the compiled libraries and binaries, and put it on my dropbox account.

xbmc.tbz contains the xbmc stuff from:
/usr/lib
/usr/bin
/usr/share
/usr/share/doc

Installed is a text file containing all the packages installed on my system

Hopefully this is enough for people to get it working until I can package it into a proper SD card image

That's great I mainly want it for video shame audio don't work but oh we'll beggars can't be choosers

I'm not to clued up on using it from compiled libraries etc so I think I will have to wait for the image

Thanks again and can't wait for the airplay image

jmg123
Posts: 21
Joined: Thu Sep 22, 2011 6:39 pm

Re: Instructions for building XBMC for Raspbian

Fri Jul 20, 2012 10:27 pm

DGreenMan wrote: That's great I mainly want it for video shame audio don't work but oh we'll beggars can't be choosers

I'm not to clued up on using it from compiled libraries etc so I think I will have to wait for the image

Thanks again and can't wait for the airplay image
Airplay audio support is easy to get working, just not via xbmc

Here are the instructions for making Airplay audio work using shairport

Code: Select all

sudo apt-get install build-essential libssl-dev libcrypt-openssl-rsa-perl libao-dev \
libio-socket-inet6-perl libwww-perl avahi-utils pkg-config
git clone https://github.com/albertz/shairport.git
cd shairport
make
sudo make install
And then to run it

Code: Select all

/usr/local/bin/shairport.pl 

payneardo
Posts: 18
Joined: Wed Jul 18, 2012 5:28 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 8:47 am

MKV21 wrote:I got the remote control via HDMI-CEC working (thx to payneardos links):

Code: Select all

git clone https://github.com/olajep/rpi-cecd.git
cd rpi-cecd/
make
./rpi-cecd
The input from the remote control is recognized by rpi-cecd and also by XBMC. My init-script (based on the XMBC init-script) can be found here: http://pastebin.com/U6bRbFLE (you may need to change the path to rpi-cecd based on were you built it)
Cheers MKV21 for the init script and how to get the script working that is spot on :)

For those who are still learning linux (like me) here is How I got it working from start up. I am using windows 7 and winscp and extra putty (and plink) to connect to my pi and I use a program called textpad for my text files.

Using the init code produced by MKV21 copy and paste into a text file and save to a file called runcec (that is the file name for this example but you can call it what you want :) ) Make sure it has no extension set (i.e. save using the " " marks so it doesn't put the .txt at the end)

I have already set a root password so I can connect by root

(to do this connect to your pi via putty, login using the pi username and type sudo passwd root; It should then prompt you to set the password)

Connect to your pi via winscp using the root username and password and copy the runcec file you have created to the folder /etc/init.d/

Log on via putty and then type the following commands (again thanks to MKV21) :)

This creates the code from the repository
cd /home/pi
git clone https://github.com/olajep/rpi-cecd.git
cd rpi-cecd/
make
./rpi-cecd

To make the file you created previously an executable you then type
chmod 755 /etc/init.d/runcec

and to make it code run on start up type
sudo update-rc.d runcec defaults

Then to reboot type

sudo shutdown -r now

Also got a shortcut on my desktop with a batch file to reboot my pi if needed the batch file is as follows

cd "c:\program files\extraputty\bin"
plink [email protected] IP address -pw rootpassword reboot

Hope this helps and again if somebody with more knowledge sees a mistake or a short cut let us know but mine is working using this method :)

jose1711_
Posts: 58
Joined: Sat Jul 21, 2012 10:03 am

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 10:17 am

i tried jmg123's xbmc tarball. it runs, however i am getting 'xbmc needs hardware accelerated opengl rendering' window and the console output looks as follows:

Code: Select all

DISPLAY=:0 xbmc-standalone
Error: couldn't find RGB GLX visual or fbconfig
any idea?

thank you, jose

skooby
Posts: 23
Joined: Sun Feb 12, 2012 1:50 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 10:22 am

Hopefully one of you linux gurus can help a noob. I have installed the image from earlier in this post and everything appears to be great, except one thing. In all the other images I have used when you go to add video sources in xbmc there is an nfs option but its not in this one. Can anyone show me how to add it please.

thanks
skooby

MKV21
Posts: 3
Joined: Fri Jul 20, 2012 2:55 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 2:45 pm

skooby wrote:Hopefully one of you linux gurus can help a noob. I have installed the image from earlier in this post and everything appears to be great, except one thing. In all the other images I have used when you go to add video sources in xbmc there is an nfs option but its not in this one. Can anyone show me how to add it please.

thanks
skooby
I think you have to compile xbmc by yourself, because in the tutorial from mpthompson he compiles xbmc without nfs support (note the --disable-nfs in the ./configure step) and my guess is the image you use also compiled it without.

You would have to start with step 7 from here: http://www.raspbian.org/RaspbianXBMC
If not all tools are installed you may need to begin from step 1 ;) Don't forget to change --disable-nfs to --enable-nfs in step 10. The compilation itself takes some time, about 12 hours for me.

But may be there is another way to activate NFS in the precompiled image, I am not sure (via the Addons?).

masterluke
Posts: 200
Joined: Tue Apr 17, 2012 4:10 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 2:51 pm

No reason you cant manually mount a NFS share before starting XBMC. It should show up in the "files" section after this.

mcscruff
Posts: 34
Joined: Thu Sep 22, 2011 5:41 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 2:56 pm

I have been using silas's image for over 48 hours now (not his latest experimental) an so far i have not had an issue.

Thank you Silas :)

romprod
Posts: 20
Joined: Sat Jun 09, 2012 6:31 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 3:45 pm

silas wrote:Seems like your card was even smaller then tomaz's. It should work with this image
Works perfectly thanks.

By far the best XBMC version on my RPi!

Thanks.

skooby
Posts: 23
Joined: Sun Feb 12, 2012 1:50 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 4:43 pm

masterluke wrote:No reason you cant manually mount a NFS share before starting XBMC. It should show up in the "files" section after this.
Thanks for that. With a little help from google managed to get it working.

workshy
Posts: 3
Joined: Tue Jul 17, 2012 3:15 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 6:49 pm

Silas, i notice you have used dirty regions in the latest image and with the settings;

<algorithmdirtyregions>1</algorithmdirtyregions>
<nofliptimeout>1000</nofliptimeout>

The following settings are commonly used on the apple tv 2 to speed things up and work better on the pi too;

<algorithmdirtyregions>3</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>

jmg123
Posts: 21
Joined: Thu Sep 22, 2011 6:39 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 7:22 pm

jose1711_ wrote:i tried jmg123's xbmc tarball. it runs, however i am getting 'xbmc needs hardware accelerated opengl rendering' window and the console output looks as follows:

Code: Select all

DISPLAY=:0 xbmc-standalone
Error: couldn't find RGB GLX visual or fbconfig
any idea?

thank you, jose

try it with

Code: Select all

clear ; sudo /usr/lib/xbmc/xbmc.bin
You shouldn't need to call startx to run it

I got the "xbmc needs.." but not the second part. You might need to do this:

Code: Select all

sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/libEGL.so
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1
sudo ln -fs /opt/vc/lib/libEGL_static.a /usr/lib/libEGL_static.a
sudo ln -fs /opt/vc/lib/libEGL_static.a /usr/lib/arm-linux-gnueabihf/libEGL_static.a
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/libGLESv2.so
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
sudo ln -fs /opt/vc/lib/libGLESv2_static.a /usr/lib/libGLESv2_static.a
sudo ln -fs /opt/vc/lib/libGLESv2_static.a /usr/lib/arm-linux-gnueabihf/libGLESv2_static.a
sudo ln -fs /opt/vc/lib/libbcm_host.so /usr/lib/libbcm_host.so
sudo ln -fs /opt/vc/lib/libbcm_host.so /usr/lib/arm-linux-gnueabihf/libbcm_host.so
sudo ln -fs /opt/vc/lib/libvchiq_arm.a /usr/lib/libvchiq_arm.a
sudo ln -fs /opt/vc/lib/libvchiq_arm.a /usr/lib/arm-linux-gnueabihf/libvchiq_arm.a
sudo ln -fs /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so
sudo ln -fs /opt/vc/lib/libvchiq_arm.so /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so
sudo ln -fs /opt/vc/lib/libvcos.a /usr/lib/libvcos.a
sudo ln -fs /opt/vc/lib/libvcos.a /usr/lib/arm-linux-gnueabihf/libvcos.a
sudo ln -fs /opt/vc/lib/libvcos.so /usr/lib/libvcos.so
sudo ln -fs /opt/vc/lib/libvcos.so /usr/lib/arm-linux-gnueabihf/libvcos.so
The other thing is you will probably need to install the packages I have installed (part of the installed file in dropbox). Also it might be necessary to make sure libshairport.so.* is in /usr/ilb


This morning I copied a fresh copy of stock raspbian onto my sd card, and copied over the xbmc files, and checked it all worked ok. When I get back home tomorrow evening, I'll zip it up and put it somewhere as a full sd card image.

payneardo
Posts: 18
Joined: Wed Jul 18, 2012 5:28 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 21, 2012 10:29 pm

Apologies I have just done a rebuild and spent an hour wondering why I cant get it to work again using these instructions and it seems a wierd and wonderful world of windows and linux

When I said to rename the file from a .txt in windows before you copy DONT, you need to copy the file to the pi and then remove the extension or it wont work
payneardo wrote:
MKV21 wrote:I got the remote control via HDMI-CEC working (thx to payneardos links):

Code: Select all

git clone https://github.com/olajep/rpi-cecd.git
cd rpi-cecd/
make
./rpi-cecd
The input from the remote control is recognized by rpi-cecd and also by XBMC. My init-script (based on the XMBC init-script) can be found here: http://pastebin.com/U6bRbFLE (you may need to change the path to rpi-cecd based on were you built it)
Cheers MKV21 for the init script and how to get the script working that is spot on :)

For those who are still learning linux (like me) here is How I got it working from start up. I am using windows 7 and winscp and extra putty (and plink) to connect to my pi and I use a program called textpad for my text files

*** UPDATED INSTRUCTIONS ***
Using the init code produced by MKV21 copy and paste into a text file and save to a file called runcec.txt (that is the file name for this example but you can call it what you want )

Copy this file to the /home/pi directory and then rename it on the pi so there is no extension set (i.e. so when its on the pi it is just called runcec)

Then log on to the pi using putty using the standard pi username and password

Then we need to type the following commands (again thanks to MKV21) :)

This creates the code from the repository
cd /home/pi
git clone https://github.com/olajep/rpi-cecd.git
cd rpi-cecd/
make

then type cd /home/pi
You will then be back in the home directory and then we can copy the file you created for the init script to the init.d folder by typing the following command

sudo cp runcec /etc/init.d

To make the file you created previously an executable you then type
sudo chmod 755 /etc/init.d/runcec

and to make it run on start up type
sudo update-rc.d runcec defaults

Then to reboot type

sudo shutdown -r now

Also got a shortcut on my desktop with a batch file to reboot my pi if needed the batch file is as follows

cd "c:\program files\extraputty\bin"
plink [email protected] -pw raspberry sudo reboot

Hope this helps and again if somebody with more knowledge sees a mistake or a short cut let us know but mine is working using this method :)

dmpalmer
Posts: 6
Joined: Wed Jul 04, 2012 6:02 pm

Re: Instructions for building XBMC for Raspbian

Sun Jul 22, 2012 1:00 am

I tried compiling, and it runs into an internal compiler error:
  • libavcodec/h264.c:4078:21: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
    arm-linux-gnueabihf-gcc: internal compiler error: Killed (program cc1)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
I even tried installing gcc-4.7 inplace of the stock 4.6 and it gives the same error.

Anyone else run into this?

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sun Jul 22, 2012 4:43 am

I haven't had a chance to work with XBMC since putting together the original instructions on our Wiki:

http://www.raspbian.org/RaspbianXBMC

Since then it seems like a LOT of knowledge has since been gathered in this thread that can greatly improve those build instructions. Things such as removing the need for symbolic links, a better selection of configuration options, base the build on the official Foundation Raspbian image, etc.

It would be terrific if a member of the community could revise the XBMC build instructions on the Raspbian wiki with the improvements and then if someone else could independently the revised build instructions. This will make it easier for others to follow in our tracks and continue to improve XBMC on Raspbian.

If you need edit access to the Raspbian wiki, please let me know and I'll take care of it.

Thanks,

Mike

jmg123
Posts: 21
Joined: Thu Sep 22, 2011 6:39 pm

Re: Instructions for building XBMC for Raspbian

Sun Jul 22, 2012 7:02 am

mpthompson wrote:I haven't had a chance to work with XBMC since putting together the original instructions on our Wiki:

http://www.raspbian.org/RaspbianXBMC

Since then it seems like a LOT of knowledge has since been gathered in this thread that can greatly improve those build instructions. Things such as removing the need for symbolic links, a better selection of configuration options, base the build on the official Foundation Raspbian image, etc.

It would be terrific if a member of the community could revise the XBMC build instructions on the Raspbian wiki with the improvements and then if someone else could independently the revised build instructions. This will make it easier for others to follow in our tracks and continue to improve XBMC on Raspbian.

If you need edit access to the Raspbian wiki, please let me know and I'll take care of it.

Thanks,

Mike
Could I have write access for the wiki please? My username is jmg123 on the raspbian site as well.
I'll add the extra steps to get airplay working

payneardo
Posts: 18
Joined: Wed Jul 18, 2012 5:28 pm

Re: Instructions for building XBMC for Raspbian

Sun Jul 22, 2012 10:56 pm

just watched a 720p video (well 2) and got quite a few video glitches during playback, ie got a fuzzy screen and sound would click off with a black screen ?

I am just setting up another image on a different SD card (as heard they are some problems with class 10's ??) and also going to try a different power supply as well.

I have got it setup for audio HMDI out and 5.1 and also DTS etc which maybe also causing a problem just wondered how everybody else has got it setup and if you are having the same issues ?

And I have also installed the HDMI-CEC which maybe causing an overhead ?

Cheers

Payneardo

tomaz
Posts: 38
Joined: Thu Jul 12, 2012 9:08 am

Re: Instructions for building XBMC for Raspbian

Mon Jul 23, 2012 12:39 am

Hi payneardo,

I just read your post. Sorry I didn't play 720p video yet, and have to go to sleep now.

I'm just preparing .deb installation file of XBMC, if anyone would be interested to test it ?

Tomorrow after work I have to write postrm script (for uninstalling my settings am doing in postins) and finish postins (almost finished):
it will do:

1.) copy /boot/arm128_start.elf to /boot/start.elf
2.) set "disable_overscan=1"
3.) ask if you want to boot directly to XBMC (+ 5 sec timeout)
4.) fix Shutdown, Custom shutdown timer and Reboot problem or XBMC
5.) fix start of XBMC
6.) auto mount USB device
7.) ask if you want to reboot

I just have to write part for 6.) - auto mount connected USB device (one, or more ?) I didn't think all options here...

All operation done on system will be reversible, I mean, it will be added to your system and when removing packet they will be also removed!

Of course I have to test it on clean "2012-07-15-wheezy-raspbian".

And add to github, now I know how to use it, thanks to watching RasPiThon live whole weekend :)) http://www.raspberrypi.org/archives/1677

Good night,
Tomaz.

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Mon Jul 23, 2012 3:59 am

jmg123 wrote:Could I have write access for the wiki please? My username is jmg123 on the raspbian site as well. I'll add the extra steps to get airplay working
Done. Thanks.

Return to “Raspbian”