Compiling my Own RaspBMC
#1
Hi Everyone,

I'm trying to compile/build my own RaspBMC with @garbears source because I want his retroplayer on there. Is it as simple as following these instructions:

Building RaspBMC

and replacing

Code:
git clone https://github.com/xbmc/xbmc
with
Code:
git://github.com/garbear/xbmc.git

Is there somewhere along the way where I need to use @garbears source again or do I just follow the instruction verbatim from therein on?

Thanks!

P.S. sorry if this is in the thread is in the wrong place!
Reply
#2
I am no expert but I would just follow the instructions, using the different git repo.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
I'm still working on "Building XBMC requires the Raspbmc builders root filesystem"

I'm trying to fix network access before chrooting

I typed this into terminal
Code:
cp /etc/network/interfaces target/etc/network/interfaces
but got a response of
Code:
cp: cannot create regular file `target/etc/network/interfaces': No such file or directory"

I'm guessing I need to put in an actual target? If yes, where/what should the target be? Again, I don't want to move onto other steps so as not to mess up the process

Anyone have a clue?

-Thanks in advance!
Reply
#4
target is where you are building the chroot.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
is that on the SD card?
Reply
#6
No it is on the hard drive of your PC.

If you are following these http://www.raspbmc.com/wiki/technical/build-filesystem/ instructions it looks like target will be where you untarred the rootfs.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
I've finally understood how to get through all that - Do you know when it's actually put on to the SD Card?

I'm not understanding that from these instructions:

http://www.raspbmc.com/wiki/technical/building-xbmc/
Reply
#8
As you use Raspbmc I suggest you use it as a nightly (I am guessing you do not need to package it if you do it like this, but I am not sure);

1. (Unpack and) place it in a folder (ie xbmc-rpb-retroplayer)
3. Upload it to .upgrade folder on Pi
4. Use Raspbmc settings and switch xbmc version

Let me know how it goes, I am curious about Garbears work regarding this. Big Grin

Edit: Or did you build Raspbmc from the beginning? If not, nightly way should work.
Reply
#9
I've actually finally figured the next couple steps out - I'm up to patching the XBMC source with the RaspBMC XBMC batch

I was able to wget all the patches, but now when I try to sh them, I get this error:

Code:
EGL-720p-toggle.patch: 1: EGL-720p-toggle.patch: ---: not found
EGL-720p-toggle.patch: 2: EGL-720p-toggle.patch: +++: not found
EGL-720p-toggle.patch: 3: EGL-720p-toggle.patch: @@: not found
EGL-720p-toggle.patch: 7: EGL-720p-toggle.patch: -: not found
EGL-720p-toggle.patch: 9: EGL-720p-toggle.patch: Syntax error: newline unexpected

Any idea why?

Thanks!
Reply
#10
So tried just starting with
Code:
sudo sh patch_xbmc.sh
and I got this - telling me there is some error in line 36. For the record in pulse00.patch line 36 references amlplayer.a:
Code:
taltal13@Tal-Lenovo-Ubuntu:~/Documents/BMCC$ sudo sh patch_xbmc.sh
--2013-03-25 16:04:31--  http://svn.stmlabs.com/svn/raspbmc/patches/XBMC-hardfp/pulse00.patch
Resolving svn.stmlabs.com (svn.stmlabs.com)... 159.253.212.250
Connecting to svn.stmlabs.com (svn.stmlabs.com)|159.253.212.250|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 161895 (158K) [text/plain]
Saving to: `pulse00.patch'

100%[===============================================>] 161,895      387K/s   in 0.4s    

2013-03-25 16:04:33 (387 KB/s) - `pulse00.patch' saved [161895/161895]

can't find file to patch at input line 36
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 73bba3eab835ea1e157c6a85193461cf933a40a8 Mon Sep 17 00:00:00 2001
|From: s7mx1 <[email protected]>
|Date: Thu, 22 Nov 2012 13:38:53 +0000
|Subject: [PATCH] enable AE/PulseAudio support on pi. OMXPlayer.cpp and
| OMXPlayer.h under omxaeplayer are based on same files under
| omxplayer. AE can be turned on/off by placing file
| /home/pi/.audioengine. latest raspbmc settings can be used
| for that purpose
|
|---
| Makefile.in                                     |    2 +-
| configure.in                                    |    1 +
| tools/rbp/depends/xbmc/Makefile                 |    2 +-
| xbmc/cores/AudioEngine/AEFactory.cpp            |   17 +-
| xbmc/cores/dvdplayer/DVDPlayer.h                |    4 +-
| xbmc/cores/dvdplayer/DVDPlayerAudio.cpp         |    7 +-
| xbmc/cores/dvdplayer/DVDPlayerAudio.h           |    9 +-
| xbmc/cores/dvdplayer/DVDPlayerVideo.cpp         |    2 +-
| xbmc/cores/dvdplayer/DVDPlayerVideo.h           |    6 +-
| xbmc/cores/omxaeplayer/Makefile.in              |    8 +
| xbmc/cores/omxaeplayer/OMXPlayer.cpp            | 4085 +++++++++++++++++++++++
| xbmc/cores/omxaeplayer/OMXPlayer.h              |  486 +++
| xbmc/cores/omxaeplayer/convert.sh               |   10 +
| xbmc/cores/playercorefactory/PlayerCoreConfig.h |   38 +-
| xbmc/settings/GUISettings.cpp                   |   34 +-
| 15 files changed, 4684 insertions(+), 27 deletions(-)
| create mode 100644 xbmc/cores/omxaeplayer/Makefile.in
| create mode 100644 xbmc/cores/omxaeplayer/OMXPlayer.cpp
| create mode 100644 xbmc/cores/omxaeplayer/OMXPlayer.h
| create mode 100644 xbmc/cores/omxaeplayer/convert.sh
|
|diff --git a/Makefile.in b/Makefile.in
|index 31826b1..72a78ba 100644
|--- a/Makefile.in
|+++ b/Makefile.in
--------------------------
File to patch:

Where it should like more like this

Any idea why or what I'm doing wrong?

(2013-03-25, 21:28)miappa Wrote: As you use Raspbmc I suggest you use it as a nightly (I am guessing you do not need to package it if you do it like this, but I am not sure);

1. (Unpack and) place it in a folder (ie xbmc-rpb-retroplayer)
3. Upload it to .upgrade folder on Pi
4. Use Raspbmc settings and switch xbmc version

Let me know how it goes, I am curious about Garbears work regarding this. Big Grin

Edit: Or did you build Raspbmc from the beginning? If not, nightly way should work.

@miappa

I'm trying to build RaspBMC from the beginning - do you think your way is simpler? Garbear suggested building from scratch but I'm open to other suggestions
Reply
#11
The "Easiest" and "fastest" way is to chroot your build environment if you need help, as it is pretty daunting at first, please PM me and I'll walk you through it. I use a chrooted setup to do my daily [or a few times a day depending on how energetic the devs are] builds for my site. It's still a cross compiler sorta but it doesn't need any special build systems and uses the main git repo. It basically just loads Raspbian and builds XBMC like it was being built ON a RPI only it doesn't take 12+ hours lol.

Sorry I miss read the title Sad I don't build RaspBMC I just build XBMC for Raspbian. But it should be easy enough to go the full route.
Main Rig [Scorpius] - Core i7 2600k @ 5Ghz. 16 Gig DDR3 1600. 1x HD 6990 1x HD 4870 Hackintosh [Chiana] - Core i5 @ 3.8Ghz. 12 Gig DDR3 Linux [Moya] - Core2 Duo E8200 - 2 Gigs DDR2 800 WHS [Zhaan] - DualCore [email protected] - 4 Gigs DDR2 800 VMC [Jothee] Core2 Quad @ 2.8Ghz 4 Gigs DDR2 800 VMC [Aeryn] Core2 E8400 @ 3.0Ghz 2 Gigs DDR2 800 2TB Server [Talyn] Core2 Quad Q6600 @ 3.0Ghz - 8 Gigs DDR2 1066 FileServer [Crichton] P4 650 3.4GHz - 2 Gigs DDR
Reply
#12
Ok here is how I setup my chrooted RPI
Warning: it is a LONG post.

How to chroot RPI envoronment.

Keep in mind this took me so many hours to figure out it's not even funny. I'm not exactly a nix guru by any means of the word.

The 1st part sucks as it is how you get the img ready.

There are two ways to do it but I found it easier just to do it this way.

The hard way is to use gemu to expand the img file and then some fancy fdisk stuff in the image to expand. Pfft

My Way:

I do this part all in windows so if you're a linux user you will need to know how to do dd and other linuxy things.

Download the latest Raspbian 2013-02-09-wheezy-raspbian.img from http://www.raspberrypi.org/downloads
http://downloads.raspberrypi.org/images/...spbian.zip

unzip it.

Write to your SD Card [8 gig is plenty but I did it on a 16 ] I use win32diskimager

Once completed insert SD into your RPI and boot it.

Run through initial setup screen paying attention to the "expand rootfs" as this one is really the only one of two parts that matter.

Run the last option which is like try to update.

Exit and reboot

log in

sudo apt-get install git-core
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update and let it do it's thing

you CAN do an apt-get update && apt-get dist-upgrade now but it takes forever, much faster to do it once it's chrooted

!!this part is VERY important with 2013-02-09

sudo nano /etc/ld.so.preload
comment out anything in there. If you do not then it will bork when you try to run nearly any command with the following error:

qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction (core dumped)

ok all done with the prepping of the image

sudo shutdown -h now

pull the SD card and put it in your reader.

Again I use win32diskimager
read it to an image. I named it the same as the original
2013-02-09-wheezy-raspbian.img

when it's done writing the image [and it WILL take a while] you can pull the SD

on the nix box

sudo apt-get install qemu qemu-user qemu-user-static kpartx

I put all my Raspi images in /rpi-images and I mount it in /mnt/temp
so
sudo mkdir /rpi-images
sudo mkdir /mnt/temp

sudo chmod -R 777 /rpi-images

transfer your newly created image into /rpi-images

now create the following scripts

[mountrpi]
Code:
#! /bin/bash
kpartx -a -v /rpi-images/2013-02-09-wheezy-raspbian.img
mount /dev/mapper/loop0p2 /mnt/temp
cp /usr/bin/qemu-arm-static /mnt/temp/usr/bin
mount -o bind /dev /mnt/temp/dev
mount -o bind /dev/pts /mnt/temp/dev/pts
mount -o bind /proc /mnt/temp/proc
mount -o bind /sys /mnt/temp/sys
mount -o bind /run /mnt/temp/run
#sets up the interfaces
cp /etc/network/interfaces /mnt/temp/etc/network/interfaces
#makes networking actually work
cp /etc/resolv.conf /mnt/temp/etc/resolv.conf
#where the magic happens
echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register
chroot /mnt/temp

[umountrpi]
Code:
#! /bin/bash
cd /devel
umount -l /mnt/temp/dev/pts
umount -l /mnt/temp/dev
umount -l /mnt/temp/proc
umount -l /mnt/temp/sys
umount -l /mnt/temp/run
umount -l /mnt/temp
kpartx -d -v /rpi-images/2013-02-09-wheezy-raspbian.img

make them executable
sudo chmod +x mountrpi umountrpi

ok you are now ready for the magic. But as a note I had issues trying this with sudo so just do it as root. ieConfusedu [password] and be careful!

then just run ./mountrpi

if you followed my directions to a T you are now in your new chrooted raspbian environment
test it by
uname -a

Linux jothee 2.6.32 #42-Ubuntu SMP Fri Mar 8 23:20:06 UTC 2013 armv7l GNU/Linux #<--see the armv7l ? that's the gold!

you can now do everyhing just as if you are running on your RPI.
I tend to do a rpi-update just to make sure everything is good to go
and also do a apt-get update && apt-get dist-upgrade now

to unmount just type exit [enter] [or control D] and then sudo ./umountrpi

Word of warning, you are ROOT when doing this on the rpi chroot so you CAN royally screw up the image if you're not careful. as in do not try rm -rf / because it WILL

at this point you are ready to set up your xbmc build environment which is icky.

I will follow up with that in the next post!

Be careful on the mount script as the line that starts with "echo ':arm:M::\x7fELF" should NOT be line wrapped

Also note. I did this on Ubuntu 12.10 x86. It will work on x64 but takes a little more effort.
Main Rig [Scorpius] - Core i7 2600k @ 5Ghz. 16 Gig DDR3 1600. 1x HD 6990 1x HD 4870 Hackintosh [Chiana] - Core i5 @ 3.8Ghz. 12 Gig DDR3 Linux [Moya] - Core2 Duo E8200 - 2 Gigs DDR2 800 WHS [Zhaan] - DualCore [email protected] - 4 Gigs DDR2 800 VMC [Jothee] Core2 Quad @ 2.8Ghz 4 Gigs DDR2 800 VMC [Aeryn] Core2 E8400 @ 3.0Ghz 2 Gigs DDR2 800 2TB Server [Talyn] Core2 Quad Q6600 @ 3.0Ghz - 8 Gigs DDR2 1066 FileServer [Crichton] P4 650 3.4GHz - 2 Gigs DDR
Reply

Logout Mark Read Team Forum Stats Members Help
Compiling my Own RaspBMC0