4 2.1 Automatic Installation
5 2.2 Manual Installation
6 2.3 Installation Continued for both Automatic and Manual Methods
8 3. Getting the source code
9 4. Installing the required ARMEL packages
10 5. Obtaining the SGX files
15 7.1 Obtaining the Packages
16 7.2 Installing the Files
21 -----------------------------------------------------------------------------
23 -----------------------------------------------------------------------------
25 This is a port of XBMC for use on ARM Architecture.
26 As this is not an official version of XBMC, in-depth testing on various setups has not been done. USE WITH CAUTION!
27 For the purpose of this port, the following Hardware and Software was used.
28 Software: Scratchbox (cross-compiler) on a Linux (Ubuntu) machine.
29 Hardware: BeagleBoard (ARM Cortex-A8 with IMG POWERVR SGX).
30 The source code is based on XBMC for Linux - version 9.11 (Camelot).
32 All lines that are prefixed with the '$' character are commands that need to be typed into a standard linux terminal
33 All lines that are prefixed with the '>' character are commands that need to be typed into scratchbox
34 All lines that are prefixed with the '#' character are commands that need to be typed into a terminal on the beagleboard
37 -----------------------------------------------------------------------------
39 -----------------------------------------------------------------------------
41 First, you need scratch box, along with some other packages.
42 The easiest way is to do the following automatic installation.
43 If you dont succeed, or want to do it manually, follow the next step instead.
45 -----------------------------------------------------------------------------
46 2.1 Automatic Installation:
47 -----------------------------------------------------------------------------
49 $ sudo gedit /etc/apt/sources.list
51 Add this to the end of the file, then save and exit gedit:
52 deb http://scratchbox.org/debian stable main
53 deb http://scratchbox.org/debian legacy main
55 Now enter the following command:
56 $ sudo apt-get install scratchbox-core scratchbox-libs scratchbox-devkit-cputransp scratchbox-devkit-git scratchbox-devkit-mtd scratchbox-devkit-perl scratchbox-devkit-doctools scratchbox-toolchain-arm-linux-cs2007q3-51sb3 scratchbox-toolchain-host-gcc scratchbox-devkit-debian
58 -----------------------------------------------------------------------------
59 2.2 Manual Installation:
60 -----------------------------------------------------------------------------
62 Go to the following website:
63 http://www.scratchbox.org/download/files/sbox-releases/stable/tarball/
64 and download the following files (Unless specified, choose latest version):
72 - toolchain (cs2007q3-51sb3)
78 $ sudo tar xvf /<location of files>/scratchbox-core.tar.gz
80 Repeat for all the downloaded files.
82 -----------------------------------------------------------------------------
83 2.3 Installation Continued for both Automatic and Manual Methods:
84 -----------------------------------------------------------------------------
86 Now, a few changes needs to me made in order for it to work correctly:
87 $ sudo gedit /etc/sysctl.conf
89 Change/Add these variables:
90 vm.mmap_min_addr = 4096
94 Add yourself to scratchbox:
95 $ sb-adduser <username>
97 Make sure it worked by doing the following command, and see if sbox is listed.
100 If it isnt listed, restart and try again. If it still isnt listed, then do the following:
101 $ usermod -a -G sbox <username>
103 It should now list (possibly after another logout)
104 Now you have access to scratchbox.
106 -----------------------------------------------------------------------------
107 2.4 Setup Scratchbox:
108 -----------------------------------------------------------------------------
110 Before setting up your target, you need a rootstrap. Obtain the latest rootstrap from:
111 http://linux.onarm.com/download/images/generic-X/
112 You want to download the file 'beagleboard-<date>-rootstrap.tar.gz'.
114 Do this every time you want to access scratchbox:
117 Time to setup your target:
120 A GUI will appear for the setup procedure.
122 - Create a NEW target, give it any name
123 - Select the compiler you downloaded (arm-linux-cs2007q3-51sb3)
124 - Select all development kits listed by highlighting each one and pressing enter, then Done and enter
125 - Select CPU transparency (qemu-arm-cvs-m)
126 - Yes to rootstrap. Locate the previously downloaded rootstrap to install.
127 - Yes to install files
128 - Only select DEVKIT and ETC. Remove all other files in list, then continue
129 - And finally Yes to selecting target.
131 Now scratchbox is setup
134 -----------------------------------------------------------------------------
135 3. Getting the source code
136 -----------------------------------------------------------------------------
138 $ sudo apt-get install git-core
139 $ cd /scratchbox/users/<username>/home/<username>/
140 $ git clone git://github.com/xbmc/xbmc.git
143 -----------------------------------------------------------------------------
144 4. Installing the required ARMEL packages
145 -----------------------------------------------------------------------------
147 There is a simple shell script that downloads a list of packages that are required and installs them into scratchbox.
149 > cd tools/arm/arm-scripts/
152 Please check the output files for any possible errors that may have occured.
154 Note. You will need the headers and shared object files for EGL and GLESv2 to continue.
157 -----------------------------------------------------------------------------
158 5. Obtaining the SGX files
159 -----------------------------------------------------------------------------
161 In order to continue, you will need the SGX SDK from TI's website.
162 Once you have installed said SDK on a standard Linux machine, copy the neccessary .h and .so files to the appropriate directories in scratchbox:
163 e.g /scratchbox/users/<username>/targets/<target_name>/usr/include/EGL/egl.h
164 These files will also need to be transferred over to the board eventually.
165 NOTE: XBMC has only been tested with the following versions of the OMAP35x Graphics SDK:
166 3.00.00.05, 3.00.00.06, 3.00.00.08, 3.00.00.09
169 -----------------------------------------------------------------------------
171 -----------------------------------------------------------------------------
173 To create the XBMC executable manually perform these following steps:
175 -----------------------------------------------------------------------------
176 6.1 Configure & Make:
177 -----------------------------------------------------------------------------
180 > ./configure --enable-gles
182 This will configure XBMC inside scratchbox ready for compilation on ARM.
183 Because the default is to build for OpenGL, we require the --enable-gles flag to be set for OpenGL ES 2.0.
184 (Note: No OpenGL ES 1.x available)
185 Now, build with the following:
189 -----------------------------------------------------------------------------
191 -----------------------------------------------------------------------------
193 There is no need to do 'make install' as we dont want it installed into scratchbox.
194 There is also the slight problem of the fact that scratchbox's 'find' command is outdated and wont execute xbmc's 'make install' correctly.
195 Instead, use the provided shell script:
196 > cd /tools/arm/arm-scripts/
197 > ./create-xbmcfile.sh
199 This will create a tar file tools/arm/arm-scripts/xbmc.tar.bz2 containing the xbmc files, ready for you to transfer to the board.
202 -----------------------------------------------------------------------------
204 -----------------------------------------------------------------------------
206 It is assumed you have a beagleboard with all the neccessary hardware installed.
207 (e.g keyboard, mouse, and ethernet adapter)
208 It is also assumed that you have it setup with either Angstrom or Ubuntu.
210 -----------------------------------------------------------------------------
211 7.1 Obtaining the Packages:
212 -----------------------------------------------------------------------------
214 For Ubuntu: See README.linux for list of packages to install.
215 If planning on not extracting the pkgs file, a few additional packages are required to be installed.
216 These are python and liblzo2
220 # opkg install subversion make g++ gcc gawk pmount libtool automake gperf unzip bison libsdl-1.2-dev libsdl-image-1.2-dev libsdl-gfx-dev libsdl-mixer-1.2-dev libfribidi-dev liblzo-dev libfreetype-dev libsqlite3-dev libasound2 python-sqlite3 libcurl4 libxrandr-dev libxrender-dev libmad-dev libogg-dev libvorbis-dev libmysqlclient-dev libpcre-dev libdbus-glib-1-dev hal-dev libjasper-dev libfontconfig-dev boost-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libsamplerate0-dev
222 Unfortunately this will only install the packages that are available through opkg. There will be further packages that need to be installed.
223 Either use the method mentioned below, or selectively find and install packages, mentioned at the bottom of this README.
225 Alternatively, do the following:
226 First make sure you have done section 4. then do the following:
227 > cd xbmc_on_arm/arm-scripts/
228 > ./create-pkgsfile.sh
230 This will create a tar file xbmc_on_arm/arm-scripts/pkgs.tar.bz2 containing the packages, ready for you to transfer to the board.
232 -----------------------------------------------------------------------------
233 7.2 Installing the Files:
234 -----------------------------------------------------------------------------
236 Transfer the file(s), armel-pkgs.tar.bz2 (if using alternative method mentioned above) and xbmc.tar.bz2 to the beagleboard.
237 Do the following to extract them:
238 # tar xjf armel-pkgs.tar.bz2 -C /
239 # tar xjf xbmc.tar.bz2 -C /usr/
241 After this initial setup, during development, you should only need to replace /usr/share/xbmc/xbmc.bin with the newly created binary.
243 -----------------------------------------------------------------------------
245 -----------------------------------------------------------------------------
247 Now, run XBMC by executing the binary:
248 # /usr/share/xbmc/xbmc.bin
250 Run the binary and not the script as the script will fail.
253 -----------------------------------------------------------------------------
255 -----------------------------------------------------------------------------
257 If it fails to run correctly, there are a few things to try out.
258 First, is there any helpful output on the terminal?
259 Check the log file, usually located ~/.xbmc/temp/xbmc.log
260 It may have failed because of a missing package.
261 If so, you will need to download the appropriate armel package from packages.debian.org,
262 Extract the files with the command: dpkg-deb -x packagename.deb /path/to/extract/to
263 Then tarball the extracted files: tar cjf pkg.tar.bz2 /path/to/extracted/files
264 Then transfer them to the board, and extract: tar xjf pkg.tar.bz2
265 This is because the .deb files cannot be extracted in Angstrom.
267 If this is not the case, try various different parameters for xbmc.bin such as:
268 xbmc.bin --standalone
271 Or build with debug for a more in-depth xbmc.log file by ommitting the line --disable-debug on configure.
273 Feel free to contact me on mcgeagh@xbmc.org