dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5372
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 9:05 am

mrjbanksy wrote:Hi, thanks for the instructions to set up XBMC, I've got it working almost perfectly. The only problem I run into is when I try to exit. No matter whether I choose quit, restart, or shutdown, I'll get a blank screen. I have tried launching XBMC from the command line both on the pi itself and via ssh. If I've launched it via ssh, on the other computer it goes back to the standard prompt, but the pi's screen is still blank. I have to reboot in order to use the pi by itself.
Has anybody else ran into this? Is there some way to fix it?

Thanks.
I think becauses xbmc changes the resolution of the hdmi, the console framebuffer gets removed. You can probably get it back by using fbset after quitting xbmc.

Beini
Posts: 16
Joined: Mon Jul 09, 2012 4:26 pm

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 2:01 pm

dom wrote: I think becauses xbmc changes the resolution of the hdmi, the console framebuffer gets removed. You can probably get it back by using fbset after quitting xbmc.
Nice, thanks for the tip. Added fbset for my mode to /usr/bin/xbmc-standalone to run after exiting xbmc. We'll see how it plays out.

Anyone one else missing keyboard and mouse when not running as root? Changed permissions to vchiq like explained here: http://elinux.org/Omxplayer so I could drop the root privileges.

Root has keyboard and mouse just fine but regular user has nothing.

wussie
Posts: 22
Joined: Fri Apr 27, 2012 3:57 am

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 4:49 pm

I tried following the instructions and compiling XBMC on the current foundation Raspbian release. I received a few errors during the Make. What did I do wrong? How do I fix it?

Code: Select all

libavcodec/h264.c: In function ‘decode_slice_header’:
libavcodec/h264.c:2925:35: warning: to be safe all intermediate pointers in cast from ‘uint8_t **’ to ‘const uint8_t **’ must be ‘const’ qualified [-Wcast-qual]
libavcodec/h264.c: In function ‘fill_filter_caches_inter’:
libavcodec/h264.c:3282:34: warning: initialization from incompatible pointer type [enabled by default]
libavcodec/h264.c:3297:38: warning: initialization from incompatible pointer type [enabled by default]
libavcodec/h264.c:3330:30: warning: initialization from incompatible pointer type [enabled by default]
libavcodec/h264.c: In function ‘decode_frame’:
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.
make[2]: *** [libavcodec/h264.o] Error 4
make[2]: Leaving directory `/home/pi/xbmc-rbp/lib/ffmpeg'
make[1]: *** [ffmpeg] Error 2
make[1]: Leaving directory `/home/pi/xbmc-rbp/lib'
make: *** [dvdpcodecs] Error 2

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5372
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 5:00 pm

wussie wrote:I tried following the instructions and compiling XBMC on the current foundation Raspbian release. I received a few errors during the Make. What did I do wrong? How do I fix it?
Looks like compiler was killed due to lack of memory. Are you running with 224M memory split?

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 5:02 pm

Hi Beini,

If I select "Power off System"/"Reboot", it should shutdown/reboot, but it doesn't.
I didn't try Custom shutdown timer, Suspend, Hibernate.

Tomaz.
Beini wrote: I think becauses xbmc changes the resolution of the hdmi, the console framebuffer gets removed. You can probably get it back by using fbset after quitting xbmc.

Nice, thanks for the tip. Added fbset for my mode to /usr/bin/xbmc-standalone to run after exiting xbmc. We'll see how it plays out.

Anyone one else missing keyboard and mouse when not running as root? Changed permissions to vchiq like explained here: http://elinux.org/Omxplayer so I could drop the root privileges.

Root has keyboard and mouse just fine but regular user has nothing.

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 5:31 pm

Thanks to tomaz I have downloaded the SD card image for my 4GB card and it seems to working fine, cheers for the time and effort put into it.

I am now trying to implement HDMI CEC and need the root password. Sorry but has anybody got this as I cant seem to find it :)

Thanks

Payneardo

and top job of the image :D

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 5:36 pm

not sure if my last post went on as can't find it unless its moderated ?

Sorry if duplicated (I will see if I get a message when I post this time :)

Thanks Tomaz for the 4gb SD card image butdoes anybody know the root password as trying to see if HDMI CEC will work and cant copy files so going to try and copy them with root instead of the pi user :)

Thanks

Payneardo

wussie
Posts: 22
Joined: Fri Apr 27, 2012 3:57 am

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 5:41 pm

dom wrote:
wussie wrote:I tried following the instructions and compiling XBMC on the current foundation Raspbian release. I received a few errors during the Make. What did I do wrong? How do I fix it?
Looks like compiler was killed due to lack of memory. Are you running with 224M memory split?
I'm not sure, just rebooted making sure that the 224 split was my start.elf and am trying again.

edit: Ok, after rebooting with the 224 split, I still got the same errors.

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 5:56 pm

right only one post this time sorry.

I have now managed to set the root password :) and now attempting to get HDMI CEC working :) has anybody had any joy with this ?

Got to say loving this build its got cover art and no lag and has played everything I have thrown at it so far, thank you so much everyone involved :D

Just trying to get the CEC sorted so the mrs can use it as well :lol:

mrjbanksy
Posts: 5
Joined: Fri Jul 13, 2012 3:48 am

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 6:45 pm

dom wrote:I think becauses xbmc changes the resolution of the hdmi, the console framebuffer gets removed. You can probably get it back by using fbset after quitting xbmc.
That did it! I added fbset to /usr/bin/xbmc-standalone like Beini suggested and it worked perfectly. Thanks!

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 7:17 pm

has anybody managed to get the screen saver\background changed from blue to black ?

I am WinScp or extra putty in to the console and wondered if there is a way of doing it here, still trying to figure out the LIRC and CEC problems but happy using my phone for now :)

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 7:33 pm

payneardo wrote:has anybody managed to get the screen saver\background changed from blue to black ?

I am WinScp or extra putty in to the console and wondered if there is a way of doing it here, still trying to figure out the LIRC and CEC problems but happy using my phone for now :)
A temporary solution could be to , open /home/pi/.bashrc and remove the last line that says:

Code: Select all

python menu.py --menu "XBMC will launch in 10 seconds" -1 -1 -1 1 "Cancel and go to console"
But then you will need to launch xbmc manually.

I will look into that fbset in xbmc-standalone, and maybe put up a new image. Nice with some more people providing solutions :)

If you get errors downloading, thats because i currently migrate my domain to another server. Try using this adress if that happens:
http://88.206.146.4/download/raspbian-x ... 2-07-17.7z

Maybe not a god idea to migrate the domain now, sorry for that :D I'll try to put the image on the new server as soon as possible.

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 8:30 pm

Thanks will have a play around :)

did what you said and goes to the console and you get the rasp logo and text in the background but its a great starting point.

Thanks again :)

Payneardo

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 8:45 pm

payneardo wrote:Thanks will have a play around :)

did what you said and goes to the console and you get the rasp logo and text in the background but its a great starting point.

Thanks again :)

Payneardo
Are you sure you wrote

Code: Select all

clear ; /usr/lib/xbmc/xbmc.bin
Because clear should clean up the console :)

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 8:50 pm

cheers, missed that bit :oops:
but will try again as did the same but its probably down to my playing with the startup menu ans ssh into it via winscp :oops:

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

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 10:06 pm

got my black screen working via winscp and extraputty :)

I added these commands at the end of /home/pi/.bashrc after "remming" the command out as above given by silas :)

# --- extra commands --- #
export PS1=' '
setterm -cursor off
clear
# --- end of extra commands --- #

Ok if I want to do anything on the Pi itself and not via ssh I need to "rem" these commands out and reboot but this gives me a nice black screen. And i have to start xbmc manually again the using the commands above given by silas who I would like Thank again for the help and assistance :)

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Wed Jul 18, 2012 10:19 pm

silas wrote:
payneardo wrote:Thanks will have a play around :)

did what you said and goes to the console and you get the rasp logo and text in the background but its a great starting point.

Thanks again :)

Payneardo
Are you sure you wrote

Code: Select all

clear ; /usr/lib/xbmc/xbmc.bin
Because clear should clean up the console :)
I delete the xbmc file in /usr/bin and remake it with nano (or vi or whatever text editor you like ;-)) in the new xbmc file I put

Code: Select all

#! /bin/bash
sudo clear ; /usr/lib/xbmc/xbmc.bin
One quick

Code: Select all

 chmod +x xbmc  
and I can launch xbmc with any account anywhere in the bash prompt without having to type all that out :-)
Dear forum: Play nice ;-)

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

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 12:52 am

Another image ready :D

This one fixes the background problem. Should be black now :)
Thanks payneardo!

Reduced overclocking to 750, which all of the pi's should manage. And for those with small 4GB cards, there is a image available thats 3 781.5 megabytes. Please note that this one is untested and might not work (but it should :D )
Thanks tomaz!

I wanted to include the fbset fix for not being able to turn off XBMC, but was unable to do that in a good way :( Maybe next time...

Following the standard set by the official images here is the username/password
Username is "pi"
Password is "raspberry"

This time the files are hosted on another server, so should be fast enough without messing with torrents :D

Normal image:
http://silenz.se/download/raspbian-xbmc ... -19.img.7z
Special image for those with smaller cards (experimental):
http://silenz.se/download/raspbian-xbmc ... all.img.7z

mrjbanksy
Posts: 5
Joined: Fri Jul 13, 2012 3:48 am

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 2:54 am

silas wrote:I wanted to include the fbset fix for not being able to turn off XBMC, but was unable to do that in a good way :( Maybe next time...
I had the thought of creating a script that could be run on the first boot that'd determine the correct resolution and updating the xbmc-standalone file to include the fix. I might tinker with that some tomorrow and see what I can come up with. There might be a better way than I was doing it originally, too.

john.mills
Posts: 81
Joined: Mon Apr 09, 2012 5:23 am

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 4:30 am

Hi Silas,

As you have fixed the black screen issue now with the new image released, one quick question, does the image still auto booot to xbmc or do we have to manually start it up. I feel that if we do have to launch it manually then we have taken a step back to plug and forget. Thanks for all your efforts.

Best regards,

John

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

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 6:10 am

Hopefully Silas will confirm

but it still boots automatically after 10 seconds in XBMC as well :)

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

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 7:33 am

silas wrote:Another image ready :D
Normal image:
http://silenz.se/download/raspbian-xbmc ... -19.img.7z
Special image for those with smaller cards (experimental):
http://silenz.se/download/raspbian-xbmc ... all.img.7z
Silas nice work :) Didn't try, yet.

I was just reading, maybe you could add solution for shutdown problem (from nicopan),
http://www.raspberrypi.org/phpBB3/viewt ... 03#p127003
I didn't test this yet, so I can not confirm if it works.

Tomaz.

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

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 7:58 am

mrjbanksy wrote:
silas wrote:I wanted to include the fbset fix for not being able to turn off XBMC, but was unable to do that in a good way :( Maybe next time...
I had the thought of creating a script that could be run on the first boot that'd determine the correct resolution and updating the xbmc-standalone file to include the fix. I might tinker with that some tomorrow and see what I can come up with. There might be a better way than I was doing it originally, too.
Send me that when your finished :D

john.mills wrote:Hi Silas,

As you have fixed the black screen issue now with the new image released, one quick question, does the image still auto booot to xbmc or do we have to manually start it up. I feel that if we do have to launch it manually then we have taken a step back to plug and forget. Thanks for all your efforts.

Best regards,

John
Autoboot is still working, but with black background.
tomaz wrote:
silas wrote:Another image ready :D
Normal image:
http://silenz.se/download/raspbian-xbmc ... -19.img.7z
Special image for those with smaller cards (experimental):
http://silenz.se/download/raspbian-xbmc ... all.img.7z
Silas nice work :) Didn't try, yet.

I was just reading, maybe you could add solution for shutdown problem (from nicopan),
http://www.raspberrypi.org/phpBB3/viewt ... 03#p127003
I didn't test this yet, so I can not confirm if it works.

Tomaz.
I'll take a look at that when i have the time :)

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

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 8:16 am

If anyway one with the koledge fanc compiling AirPlay into it that would be awesome

Siles has tried but with no success so If an ne think they can do it please do so I love rasbian but requires AirPlay for my set up and if we do not get it then I will have to go back to openelec which is something I really do not want to do

And for some reason my rtl8818us wifi dongle does not work with the script
Once implied the SD card will fail to boot

jonolo
Posts: 4
Joined: Tue Apr 17, 2012 2:34 pm

Re: Instructions for building XBMC for Raspbian

Thu Jul 19, 2012 8:57 am

Hi all,

I just added XBMC as a init.d script in Raspbian to start and stop automatically at run level changes.

As I only got remote ssh access at the moment I can only see that xbmc is up and running after a reboot.

I edited the startup script found at http://wiki.xbmc.org/index.php?title=HO ... nux#Debian to match my setup.

sudo nano /etc/init.d/xbmc

Code: Select all

#! /bin/sh

### BEGIN INIT INFO
# Provides:          xbmc
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of XBMC
# Description:       starts instance of XBMC using start-stop-daemon and xinit
### END INIT INFO

############### EDIT ME ##################

# path to xinit exec
DAEMON=/usr/lib/xbmc/xbmc.bin

# script name
NAME=xbmc

# app name
DESC=XBMC

# user
RUN_AS=pi

# Path of the PID file
PID_FILE=/var/run/xbmc.pid

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo "Starting $DESC"
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        ;;

  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 5
        start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0
sudo chmod a+x /etc/init.d/xbmc

test by running:
/etc/init.d/xbmc start
/etc/init.d/xbmc stop

Add to startup by:
sudo update-rc.d xbmc defaults

Cheers

Jonas

Return to “Raspbian”