I've written the instructions to a text file, as this forum is not great for formatting/editing.
http://dl.dropbox.com/u/366951....._build.txt
I've just started with a clean debian image and got XBMC working, so the instructions are roughly correct. I used a Ubuntu 11.10 Virtualbox as the host machine. I've tried to list the packages required in Ubuntu, but may have missed something.
Please post if you spot any improvements.
Note: If you have never cross compiled packages before then don't start here. You will almost certainly need to understand what the instructions are doing and adapt them as necessary. If you just want to try XBMC wait for someone to produce a binary package.
Have fun!
Bulding XBMC for Raspberry Pi
- Moderator
- Posts: 3226
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
dom said:
Challenge accepted
Thanks Dom!
Note: If you have never cross compiled packages before then don't start here.
Challenge accepted
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
Progress is slow but getting there. I can now boot over nfs 
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
Probably worth pointing out that sometimes the pi on boot sometimes wont connect to nfs. It's a bit hit and miss but pulling the plug and restarting fixes it. Once it's up it stays up.
Doing this on brand new debian image from last night also.
Installing required packages on the Pi...
Doing this on brand new debian image from last night also.
Installing required packages on the Pi...
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
I normally use a different nfs rootfs which is completely reliable.
I did get a hang when booting with these instructions, but was okay on a reboot.
I"m guessing one of the new startup scripts doesn"t play well with nfs.
If anyone can diagnose this problem please speak up.
Anyone out there not familiar with nfs booting, look into - it"s highly recommended.
Trivially easy to back up. No shortage of disk space. You can cross compile on Linux and then run on Pi without copying. You can have multiple distributions stored on Linux machine, and switch between then by changing cmdline.txt and rebooting. You only need a small sdcard - I"m using a 256M one. Performance is pretty good.
I did get a hang when booting with these instructions, but was okay on a reboot.
I"m guessing one of the new startup scripts doesn"t play well with nfs.
If anyone can diagnose this problem please speak up.
Anyone out there not familiar with nfs booting, look into - it"s highly recommended.
Trivially easy to back up. No shortage of disk space. You can cross compile on Linux and then run on Pi without copying. You can have multiple distributions stored on Linux machine, and switch between then by changing cmdline.txt and rebooting. You only need a small sdcard - I"m using a 256M one. Performance is pretty good.
- Moderator
- Posts: 3226
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Good job you're here dom!
Just ran into an error when make -C tools/rbp/depends/xbmc
no makefile.am found for any configure output
Will post a full log in a sec
Just ran into an error when make -C tools/rbp/depends/xbmc
no makefile.am found for any configure output
Will post a full log in a sec
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
[root@tutorials xbmc-bcm]# make -C tools/rbp/depends/xbmc make: Entering directory `/opt/xbmc-bcm/tools/rbp/depends/xbmc' cd ../../../../; ./bootstrap autoreconf: Entering directory `.' autoreconf: configure.in: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.in: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. libtoolize: copying file `build-aux/ltmain.sh' libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing automake: no `Makefile.am' found for any configure output autoreconf: automake failed with exit status: 1 make: *** [configure] Error 1 make: Leaving directory `/opt/xbmc-bcm/tools/rbp/depends/xbmc'
my setup-sdk stuff looks like this
TARBALLS=/opt/xbmc-bcm SDKSTAGE=/opt/bcm-rootfs XBMCPREFIX=/opt/xbmc-bcm/xbmc-bin
TARGETFS=/opt/bcm-rootfs
TOOLCHAIN=/opt/arm-compiler/raspberrypi-tools-3aba47b/arm-bcm2708/linux-x86
BUILDROOT=/opt/bcm-rootfs
Any ideas?
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
My output is a little different:
dc4@dc4-VirtualBox:~/xbmc-rbp$ make -C tools/rbp/depends/xbmc/
make: Entering directory `/home/dc4/xbmc-rbp/tools/rbp/depends/xbmc'
cd ../../../../; ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
autoreconf: Entering directory `lib/libid3tag/libid3tag'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
First difference I spotted was "libtoolize --install --copy --force"
Then I get "libtoolize: copying file `build-aux/config.guess'"
which you don't. I'm not an expert in this stuff, but maybe different versions of make tools?
dc4@dc4-VirtualBox:~/xbmc-rbp$ libtoolize --version
libtoolize (GNU libtool) 2.4
Written by Gary V. Vaughan <gary@gnu.org>, 2003
dc4@dc4-VirtualBox:~/xbmc-rbp$ make -C tools/rbp/depends/xbmc/
make: Entering directory `/home/dc4/xbmc-rbp/tools/rbp/depends/xbmc'
cd ../../../../; ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'
autoreconf: Entering directory `lib/libid3tag/libid3tag'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
First difference I spotted was "libtoolize --install --copy --force"
Then I get "libtoolize: copying file `build-aux/config.guess'"
which you don't. I'm not an expert in this stuff, but maybe different versions of make tools?
dc4@dc4-VirtualBox:~/xbmc-rbp$ libtoolize --version
libtoolize (GNU libtool) 2.4
Written by Gary V. Vaughan <gary@gnu.org>, 2003
- Moderator
- Posts: 3226
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
I'm running version 2.4.2 so I guess that could be the problem. I'll have a dig around and see what I can find.
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
I'm trying to do this on ArchLinux and am clueless to what the problem is so going to try it on Debian at some point
.
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
I can successfully bootstrap and configure xbmc, but I get following error on compile:
/usr/include/dbus-1.0/dbus/dbus.h:29:33: fatal error: dbus/dbus-arch-deps.h: No such file or directory
- Posts: 33
- Joined: Sat Apr 21, 2012 10:28 am
@ntadej try disabling dbus. E.g.
git diff configure.in
diff --git a/configure.in b/configure.in
index 602d4bb..82f3121 100755
--- a/configure.in
+++ b/configure.in
@@ -851,10 +851,10 @@ else
[INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
fi
- PKG_CHECK_MODULES([DBUS], [dbus-1],
- [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
- AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
- AC_MSG_NOTICE($missing_library); use_dbus=no)
+ # PKG_CHECK_MODULES([DBUS], [dbus-1],
+ # [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
+ # AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
+ # AC_MSG_NOTICE($missing_library); use_dbus=no)
if test "x$use_sdl" != "xno"; then
PKG_CHECK_MODULES([SDL], [sdl],
ntadej
git diff configure.in
diff --git a/configure.in b/configure.in
index 602d4bb..82f3121 100755
--- a/configure.in
+++ b/configure.in
@@ -851,10 +851,10 @@ else
[INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"; use_alsa=yes],
AC_MSG_NOTICE($alsa_not_found); use_alsa=no)
fi
- PKG_CHECK_MODULES([DBUS], [dbus-1],
- [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
- AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
- AC_MSG_NOTICE($missing_library); use_dbus=no)
+ # PKG_CHECK_MODULES([DBUS], [dbus-1],
+ # [INCLUDES="$INCLUDES $DBUS_CFLAGS"; LIBS="$LIBS $DBUS_LIBS"; use_dbus=yes]; \
+ # AC_DEFINE([HAVE_DBUS],[1],["Define to 1 if dbus is installed"]),
+ # AC_MSG_NOTICE($missing_library); use_dbus=no)
if test "x$use_sdl" != "xno"; then
PKG_CHECK_MODULES([SDL], [sdl],
ntadej
- Moderator
- Posts: 3226
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
I edited Makefile.include to include
/opt/bcm-rootfs/usr/lib/dbus-1.0/include
So far everything is going OK.
/opt/bcm-rootfs/usr/lib/dbus-1.0/include
So far everything is going OK.
- Posts: 33
- Joined: Sat Apr 21, 2012 10:28 am
I think there was a problem when I initially pulled the source. Pulled it again and it seemed to take a lot longer. Configuring fine now 
Either that or a misconfig in setup-sdk.sh file
Happy happy happy (let's hope it stays that way!)
Either that or a misconfig in setup-sdk.sh file
Happy happy happy (let's hope it stays that way!)
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
I've managed to compile XBMC with PVR support. As this is completely untested and unofficial, and I'm also waiting for my Pi, I uploaded it for you to test.
https://github.com/ntadej/xbmc/tree/rbp-pvr
https://github.com/downloads/ntadej/xbmc/xbmc-pvr-rbp-2012-04-21.tar.bz
https://github.com/ntadej/xbmc/tree/rbp-pvr
https://github.com/downloads/ntadej/xbmc/xbmc-pvr-rbp-2012-04-21.tar.bz
- Posts: 33
- Joined: Sat Apr 21, 2012 10:28 am
Thanks very much for sharing - I'll try it now!
It was looking for libexpat.so in my /usr/lib folder so to fix it I just copied it over from the arm rootfs. I think the path may have been explicitly specified. Seems to be compiling okay now.
It was looking for libexpat.so in my /usr/lib folder so to fix it I just copied it over from the arm rootfs. I think the path may have been explicitly specified. Seems to be compiling okay now.
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
@ntadej Congratulations. It does launch into xbmc gui. There is a "PVR service" in system information (I don't have any hardware that can make use of PVR though).
It doesn't play video. I get this in log:
15:11:33 T:1274549312 ERROR: Unable to load /opt/xbmc-bcm/xbmc-bin/lib/xbmc/sy
stem/players/dvdplayer/avcodec-53-arm.so, reason: /opt/xbmc-bcm/xbmc-bin/lib/xbm
c/system/players/dvdplayer/avcodec-53-arm.so: undefined symbol: _dl_hwcap
I don't think you followed instructions about removing /usr/lib/libc.a and /usr/lib/libm.a before building.
It doesn't play video. I get this in log:
15:11:33 T:1274549312 ERROR: Unable to load /opt/xbmc-bcm/xbmc-bin/lib/xbmc/sy
stem/players/dvdplayer/avcodec-53-arm.so, reason: /opt/xbmc-bcm/xbmc-bin/lib/xbm
c/system/players/dvdplayer/avcodec-53-arm.so: undefined symbol: _dl_hwcap
I don't think you followed instructions about removing /usr/lib/libc.a and /usr/lib/libm.a before building.
- Moderator
- Posts: 3226
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
No, I accidentally skipped this part, but I'm glad that it works (besides this major bug).
I'll play more when I get my device.
I'll play more when I get my device.
- Posts: 33
- Joined: Sat Apr 21, 2012 10:28 am
I'm still having trouble 
Any ideas on this one?
Any ideas on this one?
TextureGL.cpp: In member function 'virtual void CGLTexture::CreateTextureObject()': TextureGL.cpp:64:118: error: 'eglCreateImageKHR' was not declared in this scope TextureGL.cpp: In member function 'virtual void CGLTexture::DestroyTextureObject()': TextureGL.cpp:77:50: error: 'eglDestroyImageKHR' was not declared in this scope make[1]: *** [TextureGL.o] Error 1 make: *** [xbmc/guilib/guilib.a] Error 2
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
- Posts: 33
- Joined: Sat Apr 21, 2012 10:28 am
Thx mate 
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
This may be the better fix:
dc4@dc4-VirtualBox:~/xbmc-rbp$ git diff xbmc/guilib/
diff --git a/xbmc/guilib/Texture.h b/xbmc/guilib/Texture.h
index b103a96..6d74e4e 100644
--- a/xbmc/guilib/Texture.h
+++ b/xbmc/guilib/Texture.h
@@ -45,6 +45,7 @@ struct COLOR {unsigned char b,g,r,x;}; // Windows GDI expects 4bytes per color
#endif
#ifdef TARGET_RASPBERRY_PI
+#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "xbmc/filesystem/File.h"
dc4@dc4-VirtualBox:~/xbmc-rbp$ git diff xbmc/guilib/
diff --git a/xbmc/guilib/Texture.h b/xbmc/guilib/Texture.h
index b103a96..6d74e4e 100644
--- a/xbmc/guilib/Texture.h
+++ b/xbmc/guilib/Texture.h
@@ -45,6 +45,7 @@ struct COLOR {unsigned char b,g,r,x;}; // Windows GDI expects 4bytes per color
#endif
#ifdef TARGET_RASPBERRY_PI
+#define EGL_EGLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "xbmc/filesystem/File.h"
- Moderator
- Posts: 3226
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Probably yes. XBMC already uses my code in omxplayer core so I thought it's OK to use it.
- Posts: 33
- Joined: Sat Apr 21, 2012 10:28 am
It works
and plays video. Copying over something realistic to test it now 
- Posts: 354
- Joined: Tue Oct 04, 2011 6:53 pm
Sounds like a new tutorial or two is in the pipeline 
Texy
Texy
"!.8inch TFT LCD + Switch Shield" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=59&t=40674
50p goes to the Foundation
- Moderator
- Posts: 1258
- Joined: Sat Mar 03, 2012 10:59 am
- Location: Berkshire, England