<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=X-h</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=X-h"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/X-h/"/>
	<updated>2026-11-04T16:27:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MosaicExampleSetup&amp;diff=12041</id>
		<title>MosaicExampleSetup</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MosaicExampleSetup&amp;diff=12041"/>
		<updated>2008-07-02T09:55:48Z</updated>

		<summary type="html">&lt;p&gt;X-h: /* Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Example set-up for a conference: Plans =&lt;br /&gt;
&lt;br /&gt;
== Problem description ==&lt;br /&gt;
&lt;br /&gt;
For a conference we needed a web stream for participants who were not able to come. The set-up needed to be flexible as well transportable, since the conference took place at two venues which were several hundred meters apart. VLC was chosen because there was already a somehow working set-up available which was modified for this conference.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
We were using a dual-core AMD box (Athlon X2 4600+) with 1 GB of memory and only two PCI slots (Fujitsu Siemens PC). So nothing out of the ordinary. We had two PolyCom remote controllable cameras which can output SVIDEO signals which we feed into to BT878 based grabber cards.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
We used the vlc version coming with Ubuntu Gutsy 0.8.6c along with xawtv for direct control of the cameras (the encoding process and buffering of the clients usually introduce a lag of a few seconds which makes it hard to steer the camera efficiently.&lt;br /&gt;
&lt;br /&gt;
== Network distribution ==&lt;br /&gt;
&lt;br /&gt;
One of our problems was that at one of the conference venues the network bandwidth was somehow limited and we feared to overload that network. We thus decided to stream only to a single dedicated box which is connected to a network with a much larger bandwidth. This box was restreaming the content to anyone interested.&lt;br /&gt;
&lt;br /&gt;
= Details =&lt;br /&gt;
&lt;br /&gt;
== Needed devices ==&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
Grabber cards registered their devices where the camera output can be viewed from:&lt;br /&gt;
 /dev/video0&lt;br /&gt;
 /dev/video1&lt;br /&gt;
&lt;br /&gt;
The very first step is to check, if these are working. For this, start &lt;br /&gt;
 xawtv -c /dev/video0&lt;br /&gt;
and we saw a blue window, because xawtv sets the input mode to composite not SVIDEO. To change this, right-click on the blue window, and change the input to SVIDEO. I have not found a possibility to change this via the command line.&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;video0&#039;&#039; is working, try the same with &#039;&#039;video1&#039;&#039; it should work as well.&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
&lt;br /&gt;
The grabber cards I used, do have audio input but I only got very bad quality. With the on-board audio I got a much better quality so this was used. If you are a fan of a graphical interface try to record input from &#039;&#039;/dev/dsp&#039;&#039; (need the OSS kernel modules) with &#039;&#039;audacity&#039;&#039;. Don&#039;t simply connect the output of the sound card to loudspeakers and the input of your microphone to the microphone input of your computer. The sound card may directly connect those two channels without the software having the possibility to record anything. If you find the input of the grabber cards are good enough, they are usually labeled &#039;&#039;/dev/dsp0&#039;&#039; or something like this.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
For a simple set-up with two equally sized images next to each other I use the following config file for vlc:&lt;br /&gt;
&lt;br /&gt;
 # first camera uses /dev/video0 and the on-board sound /dev/audio or /dev/dsp&lt;br /&gt;
 new cam1 broadcast enabled&lt;br /&gt;
 setup cam1 input v4l:/dev/video0:norm=PAL:channel=1:adev=/dev/audio&lt;br /&gt;
 setup cam1 option rtsp-tcp&lt;br /&gt;
 setup cam1 output #transcode{vcodec=mp4v,vb=512,scale=1}:duplicate{dst=mosaic-bridge{id=1,height=400,width=300},&lt;br /&gt;
 select=video,dst={transcode{acodec=mp3,ab=64,channels=1}:bridge-out{id=0}},select=audio}&lt;br /&gt;
 &lt;br /&gt;
 # second camera. Important: adev=/dev/null otherwise I couldn&#039;t get it to run&lt;br /&gt;
 new cam2 broadcast enabled&lt;br /&gt;
 setup cam2 input v4l:/dev/video1:norm=PAL:channel=1:adev=/dev/null&lt;br /&gt;
 setup cam2 output #transcode{vcodec=mp4v,vb=512,scale=1}:duplicate{dst=mosaic-bridge{id=2,height=400,width=300}}&lt;br /&gt;
 &lt;br /&gt;
 # set up for the background&lt;br /&gt;
 new background broadcast enabled&lt;br /&gt;
 setup background input fake:&lt;br /&gt;
 setup background option mosaic-width=800&lt;br /&gt;
 setup background option mosaic-height=300&lt;br /&gt;
 setup background option mosaic-rows=1&lt;br /&gt;
 setup background option mosaic-cols=2&lt;br /&gt;
 setup background option mosaic-position=1&lt;br /&gt;
 setup background option mosaic-order=&amp;quot;1,2&amp;quot;&lt;br /&gt;
 setup background option fake-file=&amp;quot;back.gif&amp;quot;&lt;br /&gt;
 setup background option fake-width=800&lt;br /&gt;
 setup background option fake-height=300&lt;br /&gt;
 setup background option fake-fps=&amp;quot;8&amp;quot;&lt;br /&gt;
 setup background output #transcode{sfilter=mosaic,soverlay,vcodec=mp4v,acodec=mp3,ab=64,channels=1,scale=1}:bridge-in{id-offset=100}:std{access=http{mime=video/x-asf-stream},mux=asf,dst=:8080}&lt;br /&gt;
 &lt;br /&gt;
 # put it all together&lt;br /&gt;
 control background play&lt;br /&gt;
 control cam1 play&lt;br /&gt;
 control cam2 play&lt;br /&gt;
&lt;br /&gt;
For us it was not so important to have both images the same. The first camera just showed the audience while the second one looked at the projections made which needed to be of higher quality. We used therefore a special background image with a logo in the bottom left corner and this configuration:&lt;br /&gt;
&lt;br /&gt;
 new cam1 broadcast enabled&lt;br /&gt;
 setup cam1 input v4l:/dev/video0:norm=PAL:channel=1:adev=/dev/audio&lt;br /&gt;
 setup cam1 option rtsp-tcp&lt;br /&gt;
 setup cam1 output #transcode{vcodec=mp4v,vb=384,scale=1}:duplicate{dst=mosaic-bridge{id=1,height=300,width=400},select=video,dst={transcode{acodec=mp3,ab=64,channels=1}:bridge-out{id=0}},select=audio}&lt;br /&gt;
 &lt;br /&gt;
 new cam2 broadcast enabled&lt;br /&gt;
 setup cam2 input v4l:/dev/video1:norm=PAL:channel=1:adev=/dev/null&lt;br /&gt;
 setup cam2 output #transcode{vcodec=mp4v,vb=1500,scale=1}:duplicate{dst=mosaic-bridge{id=2,height=600,width=800},select=video}&lt;br /&gt;
 &lt;br /&gt;
 new background broadcast enabled&lt;br /&gt;
 setup background input fake:&lt;br /&gt;
 setup background option mosaic-width=1200&lt;br /&gt;
 setup background option mosaic-height=600&lt;br /&gt;
 setup background option mosaic-rows=2&lt;br /&gt;
 setup background option mosaic-cols=3&lt;br /&gt;
 setup background option mosaic-position=1&lt;br /&gt;
 setup background option mosaic-order=&amp;quot;1,2,0,0,0,0&amp;quot;&lt;br /&gt;
 setup background option fake-file=&amp;quot;aei3.gif&amp;quot;&lt;br /&gt;
 setup background option fake-width=1200&lt;br /&gt;
 setup background option fake-height=600&lt;br /&gt;
 setup background option fake-fps=&amp;quot;8&amp;quot;&lt;br /&gt;
 setup background option mosaic-keep-picture=1&lt;br /&gt;
 setup background option mosaic-keep-aspect-ratio=1&lt;br /&gt;
 setup background output #transcode{sfilter=mosaic,soverlay,vcodec=mp4v,vb=2000,acodec=mp3,ab=64,channels=1,scale=1}:bridge-in{id-offset=100}:std{access=http{mime=video/x-asf-stream},mux=asf,dst=:8080}&lt;br /&gt;
 &lt;br /&gt;
 control background play&lt;br /&gt;
 control cam1 play&lt;br /&gt;
 control cam2 play&lt;br /&gt;
&lt;br /&gt;
Either of these set-ups will start a streaming server listening on port 8080 for incoming http connections.&lt;br /&gt;
&lt;br /&gt;
Out next problem was, how shall we prevent our small internet connection from the conference venue from being saturated?&lt;br /&gt;
&lt;br /&gt;
== Internet setup ==&lt;br /&gt;
&lt;br /&gt;
We used a very simple but effective way. For this we not only needed our streaming server (from now on named &#039;&#039;&#039;origin&#039;&#039;&#039;), but also another server on a much faster network (named &#039;&#039;&#039;broadcast&#039;&#039;&#039;). We started the server on &#039;&#039;&#039;origin&#039;&#039;&#039; with &lt;br /&gt;
&lt;br /&gt;
 vlc -vvv --color -I telnet --vlm-conf conference.conf --ttl 10 --upd-caching 2000&lt;br /&gt;
&lt;br /&gt;
Then we start a ssh tunnel from &#039;&#039;&#039;origin&#039;&#039;&#039; to &#039;&#039;&#039;broadcast&#039;&#039;&#039; (best placed into a screen environment):&lt;br /&gt;
&lt;br /&gt;
 ssh -N -c blowfish -R8000:localhost:8080 account@broadcast&lt;br /&gt;
&lt;br /&gt;
This will forward the local port 8080 (on &#039;&#039;&#039;origin&#039;&#039;&#039;) to port 8000 on &#039;&#039;&#039;broadcast&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Finally, we start another vlc instance on &#039;&#039;&#039;broadcast&#039;&#039;&#039; to restream the original stream:&lt;br /&gt;
&lt;br /&gt;
 vlc -vvv http://localhost:8000/ --udp-caching 1500 --sout &#039;#standard{access=http{mime=video/x-ms-asf},mux=asf,dst:7070}&#039;&lt;br /&gt;
&lt;br /&gt;
== Final tips ==&lt;br /&gt;
&lt;br /&gt;
=== Port multiplication ===&lt;br /&gt;
If you need to &amp;quot;multiply&amp;quot; a port easily, you can use iptables on Linux:&lt;br /&gt;
&lt;br /&gt;
 #possibly not all of these modules are strictly needed:&lt;br /&gt;
 modprobe xt_tcpup&lt;br /&gt;
 modprobe ip_tables&lt;br /&gt;
 modprobe iptable_filter&lt;br /&gt;
 modprobe ip_conntraqck&lt;br /&gt;
 modprobe iptable_nat&lt;br /&gt;
 modprobe ipt_state&lt;br /&gt;
 modprobe ipt_MASQUERADE&lt;br /&gt;
 modprobe ipt_REDIRECT&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;1&amp;quot; &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
 &lt;br /&gt;
 # I&#039;m flushing everything here, this may not be good for you&lt;br /&gt;
 iptables -F&lt;br /&gt;
 iptables -F -t nat&lt;br /&gt;
 iptables -A INPUT -i lo -j ACCEPT&lt;br /&gt;
 iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j REDIRECT --to-ports 7070&lt;br /&gt;
&lt;br /&gt;
This will forward all requests to port 8080 transparently to port 7070 (where our broadcast server listens). Note: Port 8080 might be better because some firewalls allow only http related ports out and 8080 is a typical proxy port.&lt;br /&gt;
&lt;br /&gt;
= Credits =&lt;br /&gt;
&lt;br /&gt;
Thanks a lot for the folks on #videolan, especially ILEoo for helping me a lot when need was great! Without your help I don&#039;t think I would have finished this set-up in time!&lt;/div&gt;</summary>
		<author><name>X-h</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=ARMCompileOldPDA&amp;diff=9771</id>
		<title>ARMCompileOldPDA</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=ARMCompileOldPDA&amp;diff=9771"/>
		<updated>2007-09-05T14:43:11Z</updated>

		<summary type="html">&lt;p&gt;X-h: ogg move from cvs to subversion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cross compile VLC for ARM-based platforms ==&lt;br /&gt;
&lt;br /&gt;
Last updated: v0.0.2, 19 march 2004&lt;br /&gt;
This document describes all the steps to cross compile vlc for ARM based platforms. It describes how to build a cross compilation toolchain, how to build the libraries needed by vlc and the compilation of the vlc itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document is only a first draft. It does not intend to cover all subjects and is written for vlc version 0.7.2. You may still have some problems at some steps or find better way to do them. If you have any comment do not hesitate to contact us.&lt;br /&gt;
Which platforms are targeted ?&lt;br /&gt;
&lt;br /&gt;
I will describe here how to compile vlc for an ARM based PDA running linux. It includes for example :&lt;br /&gt;
&lt;br /&gt;
* Compaq - iPaq (H36xx, H38xx,...), using Familiar Linux&lt;br /&gt;
** GNU Portable Environment (GPE)&lt;br /&gt;
** Opie&lt;br /&gt;
* YOPY/Linupy&lt;br /&gt;
* Zaurus&lt;br /&gt;
&lt;br /&gt;
== Requirements for cross-compilation ==&lt;br /&gt;
=== Why cross-compiling ? ===&lt;br /&gt;
&lt;br /&gt;
It is of course possible to compile directly on the targeted platform. But there are a lot of great advantages to cross-compile :&lt;br /&gt;
&lt;br /&gt;
* The most important one is probably the speed, because a desktop computer is most of the time faster than a PDA for compilation.&lt;br /&gt;
* Another big problem is that a complete compilation toolchain does take a great amount of disk space. And this space is usually very limited on embedded systems.&lt;br /&gt;
* And there also may not be enough memory to compile big files.&lt;br /&gt;
&lt;br /&gt;
==Building the toolchain==&lt;br /&gt;
===Prerequisite===&lt;br /&gt;
====Importants paths====&lt;br /&gt;
&lt;br /&gt;
During this section, we will use the following paths :&lt;br /&gt;
&lt;br /&gt;
I would personally advise to compile everything as a normal user and then install everything as root.&lt;br /&gt;
&lt;br /&gt;
====${SRCDIR}====&lt;br /&gt;
This is where the sources will be located and where the compilation will be done. (eg: /usr/src or /home/foobar/arm-src).&lt;br /&gt;
&lt;br /&gt;
====${PREFIX}====&lt;br /&gt;
&lt;br /&gt;
This is where you want to install your cross compilation toolchain. It can be either installed system-wide (in /usr/local/arm/2.95.3 for example). Installation steps (i.e. make install) will have to be done as root. Or it can be installed in user-land, for the user&#039;s own use (/home/foobar/arm/2.95.3 for example). In this paper, the chosen prefix is /usr/local/arm/2.95.3, you will have to adapt the commands to what you choose..&lt;br /&gt;
&lt;br /&gt;
====Files needed====&lt;br /&gt;
&lt;br /&gt;
Download the following files and put them in the ${SRCDIR}. Most of them are available on the &amp;quot;VideoLAN website&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* binutils-2.11.2.tar.gz&lt;br /&gt;
* linux-2.4.19.tar.bz2&lt;br /&gt;
* patch-2.4.19-rmk4.bz2&lt;br /&gt;
* gcc-2.95.3.tar.gz&lt;br /&gt;
* gcc-2.95.3.diff.bz2&lt;br /&gt;
* gcc-2.95.3.diffbis.bz2&lt;br /&gt;
* gcc-2.95.3.diff2&lt;br /&gt;
* glibc-2.2.5.tar.gz&lt;br /&gt;
* glibc-linuxthreads-2.2.5.tar.gz&lt;br /&gt;
* SDL-1.2.5.tar.gz&lt;br /&gt;
* glib-1.2.10.tar.gz&lt;br /&gt;
* ffmpeg.tar.gz&lt;br /&gt;
* mad-0.14.2b.tar.gz&lt;br /&gt;
* flac-1.1.0.tar.gz&lt;br /&gt;
* libdvbpsi-0.1.2.tar.gz&lt;br /&gt;
* a52dec-0.7.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
==Binutils==&lt;br /&gt;
&lt;br /&gt;
Compiling binutils is pretty simple :&lt;br /&gt;
 tar -xzf binutils-2.11.2.tar.gz&lt;br /&gt;
 cd binutils-2.11.2&lt;br /&gt;
 ./configure --target=arm-linux --prefix=/usr/local/arm/2.95.3&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Preparing linux kernel==&lt;br /&gt;
&lt;br /&gt;
Before building the glibc library the right kernel header files should be available. Therefor the kernel that is going to be used needs to be prepared so all necessary header files are present. Follow these steps.&lt;br /&gt;
 tar -xzf linux-2.4.19.tar.bz2&lt;br /&gt;
 bunzip2 patch-2.4.19-rmk4.bz2&lt;br /&gt;
 cd linux-2.4.19&lt;br /&gt;
 make mrproper&lt;br /&gt;
 patch -p1 &amp;lt; ../patch-2.4.19-rmk4.bz2&lt;br /&gt;
 make clean ARCH=arm CROSS_COMPILE=arm-linux-&lt;br /&gt;
 make ARCH=arm h3600_config&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not forget&#039;&#039;&#039; to save the configuration even if no changes are made !&lt;br /&gt;
 make ARCH=arm menuconfig&lt;br /&gt;
 make symlinks ARCH=arm CROSS_COMPILE=arm-linux-&lt;br /&gt;
 mkdir -p /usr/local/arm/2.95.3/arm-linux/include&lt;br /&gt;
 cp -Rf include/asm include/asm-arm include/linux \&lt;br /&gt;
 /usr/local/arm/2.95.3/arm-linux/include&lt;br /&gt;
 cd /usr/local/arm/2.95.3/arm-linux&lt;br /&gt;
 ln -s include sys-linux&lt;br /&gt;
&lt;br /&gt;
==Basic cross compiler (gcc)==&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf gcc-2.95.3.tar.gz&lt;br /&gt;
 bunzip2 gcc-2.95.3.diff.bz2&lt;br /&gt;
 bunzip2 gcc-2.95.3.diffbis.bz2&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diff&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diffbis&lt;br /&gt;
 cd gcc-2.95.3&lt;br /&gt;
 ./configure --target=arm-linux --disable-threads --enable-languages=c \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3 --with-headers=linux-2.4.19/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Compiling glibc==&lt;br /&gt;
Depending on your target, you may choose another glibc version (eg: 2.1.3 for linupy 1.4)&lt;br /&gt;
 tar -xvzf glibc-2.2.5.tar.gz&lt;br /&gt;
 cd glibc-2.2.5&lt;br /&gt;
 tar -xvzf ../glibc-linuxthreads-2.2.5.tar.gz&lt;br /&gt;
 CC=arm-linux-gcc ./configure arm-linux --target=arm-linux \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux --enable-add-ons&lt;br /&gt;
&lt;br /&gt;
The following step takes quite a long time!&lt;br /&gt;
 CC=arm-linux-gcc make&lt;br /&gt;
&lt;br /&gt;
If you have problems compiling glibc due to pread/pwrite, edit sysdeps/unix/sysv/linux/kernel-features.h and turn __ASSUME_PREAD_SYSCALL and __ASSUME_PWRITE_SYSCALL from 1 to 0.&lt;br /&gt;
 CC=arm-linux-gcc make install&lt;br /&gt;
&lt;br /&gt;
==Full cross compiler (gcc)==&lt;br /&gt;
&lt;br /&gt;
Now it is time to build a cross-compiler that can built user space libraries too. Follow these steps:&lt;br /&gt;
 rm -Rf gcc-2.95.3&lt;br /&gt;
 tar -xvzf gcc-2.95.3.tar.gz&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diff&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diff2&lt;br /&gt;
 cd gcc-2.95.3&lt;br /&gt;
 ./configure --target=arm-linux --prefix=/usr/local/arm/2.95.3&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
&lt;br /&gt;
Add /usr/local/arm/2.95.3/bin to your PATH. Add the following line (depends on your shell) to your shell&#039;s configuration file :&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
I would advise you to completely log out and then log in again, so that the change would be taken into account. You can now check that when you type arm-linux-gcc, it launches the cross-compiler.&lt;br /&gt;
&lt;br /&gt;
Next are some packages that you may compile by yourself, but I found it was easier to use the precompiled packages. You can take them at &amp;quot;ipkgfind&amp;quot;&amp;gt;. You may find packages with other version numbers which should not be a problem.&lt;br /&gt;
&lt;br /&gt;
* libgcc1_3.1.1-1_arm.ipk This provides libgcc.so.1 which is needed to compile some libraries.&lt;br /&gt;
* xlibs_4.1-5_arm.ipk, xlibs-dev_4.1.0-16_arm.ipk Those are the libraries ans the development files for X windows.&lt;br /&gt;
* zlib1g_1.1.4-3_arm.ipk, zlib1g-dev_1.1.3-fam1_arm.ipk These libraries are needed by some libraries to compile.&lt;br /&gt;
&lt;br /&gt;
Install these packages on your compiler box in /usr/local/arm/2.95.3/arm-linux : You can use the script install.sh :&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # script to install .ipk into the arm-toolchain&lt;br /&gt;
 # usage : ./install.sh foobar.ipk&lt;br /&gt;
&lt;br /&gt;
 if ! tar -xvzf $1 2&amp;gt; /dev/null&lt;br /&gt;
 then&lt;br /&gt;
 ar xv $1 2&amp;gt; /dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 cp data.tar.gz /usr/local/arm/2.95.3/arm-linux&lt;br /&gt;
 cd /usr/local/arm/2.95.3/arm-linux&lt;br /&gt;
 tar -xvzf data.tar.gz&lt;br /&gt;
&lt;br /&gt;
==Setting up Opie cross-compile environment==&lt;br /&gt;
&lt;br /&gt;
Download the Opie SDK from the website [http://opie.handhelds.org/ OPIE website] using the menuitem &amp;quot;Download Opie SDK&amp;quot; or try the direct link here: &amp;quot;Download Opie SDK&amp;quot;. Download all files to your ${SOURCES}/opie directory.&lt;br /&gt;
Opie SDK&lt;br /&gt;
&lt;br /&gt;
The Opie SDK does not come with a README file or installation instructions. I give them here instead. There are two tar files in the download a OpieSDK.tar.gz2 and a kdevelop_src.tar.bz2. The last file is a modified kdevelop for use with the OpieSDK. In this tutorial we will not use that. Unpack OpieSDK.tar.bz2 in your sources cd ${SOURCES}/opie directory.&lt;br /&gt;
 cd ${SOURCES}/opie&lt;br /&gt;
 tar -xjvf OpieSdk.tar.bz2&lt;br /&gt;
&lt;br /&gt;
It creates a directories structure ${SOURCES}/opie/opt/OpieSDK. Inside that directory a script is present to start_kdevelop. Modify this script so that it uses the correct paths for you setup.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 source ${SOURCES}/opie/opt/OpieSdk/dev_env&lt;br /&gt;
&lt;br /&gt;
 export KDEDIR=${SOURCES}/opie/opt/OpieSdk/kde&lt;br /&gt;
 export PATH=${SOURCES}/opie/opt/OpieSdk/kde/bin:$PATH&lt;br /&gt;
 kbuildsycoca&lt;br /&gt;
 kdevelop&lt;br /&gt;
&lt;br /&gt;
Save the script. Do the same with the script arm_source&lt;br /&gt;
 source ${SOURCES}/opie/opt/OpieSdk/dev_env&lt;br /&gt;
 export QTDIR=$QTDIR_ARM&lt;br /&gt;
 export OPIEDIR=$OPIEDIR_ARM&lt;br /&gt;
&lt;br /&gt;
Save the script and modify the script host_source in the same manner as above.&lt;br /&gt;
 source ${SOURCES}/opie/opt/OpieSdk/dev_env&lt;br /&gt;
 export QTDIR=$QTDIR_NAT&lt;br /&gt;
 export OPIEDIR=$OPIEDIR_NAT&lt;br /&gt;
&lt;br /&gt;
Save the script and modify the script dev_env in the same manner as above.&lt;br /&gt;
 export PYTHONPATH=${SOURCES}/opie/opt/OpieSdk/python/opie:${SOURCES}/opie/opt/OpieSdk/python/sip&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/bin:/opt/OpieSdk/host_tools:${SOURCES}/opie/opt/OpieSdk/opie/x86/qt-2.3.7/bin:$PATH&lt;br /&gt;
 export PATH=${SOURCES}/opie/opt/OpieSdk/opie/x86/qmake:$PATH&lt;br /&gt;
 export QTDIR_NAT=${SOURCES}/opie/opt/OpieSdk/opie/x86/qt-2.3.7&lt;br /&gt;
 export OPIEDIR_NAT=${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk&lt;br /&gt;
 export QTDIR_ARM=${SOURCES}/opie/opt/OpieSdk/opie/arm/qt-2.3.7&lt;br /&gt;
 export OPIEDIR_ARM=${SOURCES}/opie/opt/OpieSdk/opie/arm/sdk&lt;br /&gt;
 export OPIE_SDK_BASE=${SOURCES}/opie/opt/OpieSdk/&lt;br /&gt;
 export OPIE_SDK_QMAKE_BASE=${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk/mkspecs/qws/&lt;br /&gt;
 export OPIE_DOC=${SOURCES}/opie/opt/OpieSdk/apidocs&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=${SOURCES}/opie/opt/OpieSdk/sip/lib:$OPIEDIR_NAT/lib:$QTDIR_NAT/lib:$LD_LIBRARY_PATH&lt;br /&gt;
 export OPIE_LANGUAGES=de:en:cz:da:dk:es:fr:hu:it:ja:ko:lv:mk:nl:no:pl:pt:pt_BR:ru:sl:zh_CN:zh_TW&lt;br /&gt;
&lt;br /&gt;
The symbolic linke to the tool qmake points now to the wrong place. We need to fix this symbolic link. Here is the way to do that.&lt;br /&gt;
 cd host_tools&lt;br /&gt;
 ln -sf ${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk/qmake/qmake qmake&lt;br /&gt;
 cd ../&lt;br /&gt;
&lt;br /&gt;
Now it is time to fire up our development environment and start hacking in Opie.&lt;br /&gt;
&lt;br /&gt;
==Cross compiling libraries needed by vlc==&lt;br /&gt;
&lt;br /&gt;
Download ipaq-config.site to ${SOURCES}. When downloading source tarballs copy them to your ${SOURCES} directory. Each section is supposed to begin with  cd ${SOURCES}.&lt;br /&gt;
&lt;br /&gt;
===SDL===&lt;br /&gt;
&lt;br /&gt;
It is not clean at all but did not found a better working method. Using config.site it compiles well, but when linking with vlc there are problems !&lt;br /&gt;
&lt;br /&gt;
 /usr/local/arm/2.95.3/arm-linux/bin should contain the cross compiler without the prefix arm-linux-.&lt;br /&gt;
 tar -xvzf SDL-1.2.5.tar.gz&lt;br /&gt;
 cd SDL-1.2.5&lt;br /&gt;
 ./configure --enable-release --target=arm-linux --host=arm-linux \&lt;br /&gt;
 --disable-esd \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr \&lt;br /&gt;
 --x-includes=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/include \&lt;br /&gt;
 --x-libraries=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/lib \&lt;br /&gt;
 --disable-video-opengl&lt;br /&gt;
&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/arm-linux/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
===Glib/GTK+===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf glib-1.2.10.tar.gz&lt;br /&gt;
 cd glib-1.2.10&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 tar -xvzf gtk+-1.2.10.tar.gz&lt;br /&gt;
 cd gtk+-1.2.10&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr --with-glib=../glib-1.2.10&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ffmpeg===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf ffmpeg.tar.gz&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
 ./configure --arch=armv4l --cc=arm-linux-gcc --disable-mmx \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr --enable-shared&lt;br /&gt;
 cd libavcodec&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vlc does not require that you install ffmpeg.&lt;br /&gt;
&lt;br /&gt;
===mad===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf mad-0.14.2b.tar.gz&lt;br /&gt;
 cd mad-0.14.2b&lt;br /&gt;
 ./configure --enable-release --target=arm-linux --host=arm-linux \&lt;br /&gt;
 --disable-esd \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr \&lt;br /&gt;
 --x-includes=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/include \&lt;br /&gt;
 --x-libraries=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/lib \&lt;br /&gt;
 --disable-video-opengl&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/arm-linux/bin:$PATH&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===gpe===&lt;br /&gt;
&lt;br /&gt;
Not described.&lt;br /&gt;
&lt;br /&gt;
===tremor===&lt;br /&gt;
&lt;br /&gt;
Tremor is an integer decoder for the vorbis audio codec. Download the source through subversion at the &amp;quot;xiph.org&amp;quot; website.&lt;br /&gt;
&lt;br /&gt;
 svn co http://svn.xiph.org/trunk/Tremor&lt;br /&gt;
 cd Tremor&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===ogg===&lt;br /&gt;
&lt;br /&gt;
For ogg, it is the same as Tremor.&lt;br /&gt;
 svn co http://svn.xiph.org/trunk/ogg&lt;br /&gt;
 cd ogg&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===flac===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf flac-1.1.0.tar.gz&lt;br /&gt;
 cd flac-1.1.0&lt;br /&gt;
 ./configure --enable-release --host=arm-linux --target=arm-linux \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
&lt;br /&gt;
It will probably fail (due to the xmms plugin), but it is not a problem, we will continue installation by hand.&lt;br /&gt;
 cp -Rf include/FLAC /usr/local/arm/2.95.3/arm-linux/include&lt;br /&gt;
 cd src/libFLAC&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
===libdvbpsi===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf libdvbpsi-0.1.2.tar.gz&lt;br /&gt;
 cd libdvbpsi-0.1.2&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 ./configure --target=arm-linux --host=arm-linux&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===a52===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf a52dec-0.7.4.tar.gz&lt;br /&gt;
 cd a52dec-0.7.4&lt;br /&gt;
 ./configure --enable-release --host=arm-linux --target=arm-linux \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
==Cross compiling vlc itself==&lt;br /&gt;
&lt;br /&gt;
First of all, run the ./bootstrap script. Then run one of the ipkg/rules.*, according to what you want to compile. Finally you just have to type make and you&#039;ll get a stand alone vlc.&lt;br /&gt;
&lt;br /&gt;
Run arm-linux-strip to remove symbols and so the size of the file, and now you can test it easily on your PDA.&lt;br /&gt;
&lt;br /&gt;
Enjoy !&lt;br /&gt;
&lt;br /&gt;
==Version==&lt;br /&gt;
Made by Marc Ariberti and Jean-Paul Saman.&lt;br /&gt;
Adapted to the wiki by [[User:J-b|Jean-Baptiste Kempf]].&lt;/div&gt;</summary>
		<author><name>X-h</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=ARMCompileOldPDA&amp;diff=9770</id>
		<title>ARMCompileOldPDA</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=ARMCompileOldPDA&amp;diff=9770"/>
		<updated>2007-09-05T14:32:30Z</updated>

		<summary type="html">&lt;p&gt;X-h: Update Tremor for subversion (was cvs)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cross compile VLC for ARM-based platforms ==&lt;br /&gt;
&lt;br /&gt;
Last updated: v0.0.2, 19 march 2004&lt;br /&gt;
This document describes all the steps to cross compile vlc for ARM based platforms. It describes how to build a cross compilation toolchain, how to build the libraries needed by vlc and the compilation of the vlc itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document is only a first draft. It does not intend to cover all subjects and is written for vlc version 0.7.2. You may still have some problems at some steps or find better way to do them. If you have any comment do not hesitate to contact us.&lt;br /&gt;
Which platforms are targeted ?&lt;br /&gt;
&lt;br /&gt;
I will describe here how to compile vlc for an ARM based PDA running linux. It includes for example :&lt;br /&gt;
&lt;br /&gt;
* Compaq - iPaq (H36xx, H38xx,...), using Familiar Linux&lt;br /&gt;
** GNU Portable Environment (GPE)&lt;br /&gt;
** Opie&lt;br /&gt;
* YOPY/Linupy&lt;br /&gt;
* Zaurus&lt;br /&gt;
&lt;br /&gt;
== Requirements for cross-compilation ==&lt;br /&gt;
=== Why cross-compiling ? ===&lt;br /&gt;
&lt;br /&gt;
It is of course possible to compile directly on the targeted platform. But there are a lot of great advantages to cross-compile :&lt;br /&gt;
&lt;br /&gt;
* The most important one is probably the speed, because a desktop computer is most of the time faster than a PDA for compilation.&lt;br /&gt;
* Another big problem is that a complete compilation toolchain does take a great amount of disk space. And this space is usually very limited on embedded systems.&lt;br /&gt;
* And there also may not be enough memory to compile big files.&lt;br /&gt;
&lt;br /&gt;
==Building the toolchain==&lt;br /&gt;
===Prerequisite===&lt;br /&gt;
====Importants paths====&lt;br /&gt;
&lt;br /&gt;
During this section, we will use the following paths :&lt;br /&gt;
&lt;br /&gt;
I would personally advise to compile everything as a normal user and then install everything as root.&lt;br /&gt;
&lt;br /&gt;
====${SRCDIR}====&lt;br /&gt;
This is where the sources will be located and where the compilation will be done. (eg: /usr/src or /home/foobar/arm-src).&lt;br /&gt;
&lt;br /&gt;
====${PREFIX}====&lt;br /&gt;
&lt;br /&gt;
This is where you want to install your cross compilation toolchain. It can be either installed system-wide (in /usr/local/arm/2.95.3 for example). Installation steps (i.e. make install) will have to be done as root. Or it can be installed in user-land, for the user&#039;s own use (/home/foobar/arm/2.95.3 for example). In this paper, the chosen prefix is /usr/local/arm/2.95.3, you will have to adapt the commands to what you choose..&lt;br /&gt;
&lt;br /&gt;
====Files needed====&lt;br /&gt;
&lt;br /&gt;
Download the following files and put them in the ${SRCDIR}. Most of them are available on the &amp;quot;VideoLAN website&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* binutils-2.11.2.tar.gz&lt;br /&gt;
* linux-2.4.19.tar.bz2&lt;br /&gt;
* patch-2.4.19-rmk4.bz2&lt;br /&gt;
* gcc-2.95.3.tar.gz&lt;br /&gt;
* gcc-2.95.3.diff.bz2&lt;br /&gt;
* gcc-2.95.3.diffbis.bz2&lt;br /&gt;
* gcc-2.95.3.diff2&lt;br /&gt;
* glibc-2.2.5.tar.gz&lt;br /&gt;
* glibc-linuxthreads-2.2.5.tar.gz&lt;br /&gt;
* SDL-1.2.5.tar.gz&lt;br /&gt;
* glib-1.2.10.tar.gz&lt;br /&gt;
* ffmpeg.tar.gz&lt;br /&gt;
* mad-0.14.2b.tar.gz&lt;br /&gt;
* flac-1.1.0.tar.gz&lt;br /&gt;
* libdvbpsi-0.1.2.tar.gz&lt;br /&gt;
* a52dec-0.7.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
==Binutils==&lt;br /&gt;
&lt;br /&gt;
Compiling binutils is pretty simple :&lt;br /&gt;
 tar -xzf binutils-2.11.2.tar.gz&lt;br /&gt;
 cd binutils-2.11.2&lt;br /&gt;
 ./configure --target=arm-linux --prefix=/usr/local/arm/2.95.3&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Preparing linux kernel==&lt;br /&gt;
&lt;br /&gt;
Before building the glibc library the right kernel header files should be available. Therefor the kernel that is going to be used needs to be prepared so all necessary header files are present. Follow these steps.&lt;br /&gt;
 tar -xzf linux-2.4.19.tar.bz2&lt;br /&gt;
 bunzip2 patch-2.4.19-rmk4.bz2&lt;br /&gt;
 cd linux-2.4.19&lt;br /&gt;
 make mrproper&lt;br /&gt;
 patch -p1 &amp;lt; ../patch-2.4.19-rmk4.bz2&lt;br /&gt;
 make clean ARCH=arm CROSS_COMPILE=arm-linux-&lt;br /&gt;
 make ARCH=arm h3600_config&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not forget&#039;&#039;&#039; to save the configuration even if no changes are made !&lt;br /&gt;
 make ARCH=arm menuconfig&lt;br /&gt;
 make symlinks ARCH=arm CROSS_COMPILE=arm-linux-&lt;br /&gt;
 mkdir -p /usr/local/arm/2.95.3/arm-linux/include&lt;br /&gt;
 cp -Rf include/asm include/asm-arm include/linux \&lt;br /&gt;
 /usr/local/arm/2.95.3/arm-linux/include&lt;br /&gt;
 cd /usr/local/arm/2.95.3/arm-linux&lt;br /&gt;
 ln -s include sys-linux&lt;br /&gt;
&lt;br /&gt;
==Basic cross compiler (gcc)==&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf gcc-2.95.3.tar.gz&lt;br /&gt;
 bunzip2 gcc-2.95.3.diff.bz2&lt;br /&gt;
 bunzip2 gcc-2.95.3.diffbis.bz2&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diff&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diffbis&lt;br /&gt;
 cd gcc-2.95.3&lt;br /&gt;
 ./configure --target=arm-linux --disable-threads --enable-languages=c \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3 --with-headers=linux-2.4.19/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Compiling glibc==&lt;br /&gt;
Depending on your target, you may choose another glibc version (eg: 2.1.3 for linupy 1.4)&lt;br /&gt;
 tar -xvzf glibc-2.2.5.tar.gz&lt;br /&gt;
 cd glibc-2.2.5&lt;br /&gt;
 tar -xvzf ../glibc-linuxthreads-2.2.5.tar.gz&lt;br /&gt;
 CC=arm-linux-gcc ./configure arm-linux --target=arm-linux \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux --enable-add-ons&lt;br /&gt;
&lt;br /&gt;
The following step takes quite a long time!&lt;br /&gt;
 CC=arm-linux-gcc make&lt;br /&gt;
&lt;br /&gt;
If you have problems compiling glibc due to pread/pwrite, edit sysdeps/unix/sysv/linux/kernel-features.h and turn __ASSUME_PREAD_SYSCALL and __ASSUME_PWRITE_SYSCALL from 1 to 0.&lt;br /&gt;
 CC=arm-linux-gcc make install&lt;br /&gt;
&lt;br /&gt;
==Full cross compiler (gcc)==&lt;br /&gt;
&lt;br /&gt;
Now it is time to build a cross-compiler that can built user space libraries too. Follow these steps:&lt;br /&gt;
 rm -Rf gcc-2.95.3&lt;br /&gt;
 tar -xvzf gcc-2.95.3.tar.gz&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diff&lt;br /&gt;
 patch -p1 -d gcc-2.95.3 &amp;lt; gcc-2.95.3.diff2&lt;br /&gt;
 cd gcc-2.95.3&lt;br /&gt;
 ./configure --target=arm-linux --prefix=/usr/local/arm/2.95.3&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==Misc==&lt;br /&gt;
&lt;br /&gt;
Add /usr/local/arm/2.95.3/bin to your PATH. Add the following line (depends on your shell) to your shell&#039;s configuration file :&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
I would advise you to completely log out and then log in again, so that the change would be taken into account. You can now check that when you type arm-linux-gcc, it launches the cross-compiler.&lt;br /&gt;
&lt;br /&gt;
Next are some packages that you may compile by yourself, but I found it was easier to use the precompiled packages. You can take them at &amp;quot;ipkgfind&amp;quot;&amp;gt;. You may find packages with other version numbers which should not be a problem.&lt;br /&gt;
&lt;br /&gt;
* libgcc1_3.1.1-1_arm.ipk This provides libgcc.so.1 which is needed to compile some libraries.&lt;br /&gt;
* xlibs_4.1-5_arm.ipk, xlibs-dev_4.1.0-16_arm.ipk Those are the libraries ans the development files for X windows.&lt;br /&gt;
* zlib1g_1.1.4-3_arm.ipk, zlib1g-dev_1.1.3-fam1_arm.ipk These libraries are needed by some libraries to compile.&lt;br /&gt;
&lt;br /&gt;
Install these packages on your compiler box in /usr/local/arm/2.95.3/arm-linux : You can use the script install.sh :&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # script to install .ipk into the arm-toolchain&lt;br /&gt;
 # usage : ./install.sh foobar.ipk&lt;br /&gt;
&lt;br /&gt;
 if ! tar -xvzf $1 2&amp;gt; /dev/null&lt;br /&gt;
 then&lt;br /&gt;
 ar xv $1 2&amp;gt; /dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 cp data.tar.gz /usr/local/arm/2.95.3/arm-linux&lt;br /&gt;
 cd /usr/local/arm/2.95.3/arm-linux&lt;br /&gt;
 tar -xvzf data.tar.gz&lt;br /&gt;
&lt;br /&gt;
==Setting up Opie cross-compile environment==&lt;br /&gt;
&lt;br /&gt;
Download the Opie SDK from the website [http://opie.handhelds.org/ OPIE website] using the menuitem &amp;quot;Download Opie SDK&amp;quot; or try the direct link here: &amp;quot;Download Opie SDK&amp;quot;. Download all files to your ${SOURCES}/opie directory.&lt;br /&gt;
Opie SDK&lt;br /&gt;
&lt;br /&gt;
The Opie SDK does not come with a README file or installation instructions. I give them here instead. There are two tar files in the download a OpieSDK.tar.gz2 and a kdevelop_src.tar.bz2. The last file is a modified kdevelop for use with the OpieSDK. In this tutorial we will not use that. Unpack OpieSDK.tar.bz2 in your sources cd ${SOURCES}/opie directory.&lt;br /&gt;
 cd ${SOURCES}/opie&lt;br /&gt;
 tar -xjvf OpieSdk.tar.bz2&lt;br /&gt;
&lt;br /&gt;
It creates a directories structure ${SOURCES}/opie/opt/OpieSDK. Inside that directory a script is present to start_kdevelop. Modify this script so that it uses the correct paths for you setup.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 source ${SOURCES}/opie/opt/OpieSdk/dev_env&lt;br /&gt;
&lt;br /&gt;
 export KDEDIR=${SOURCES}/opie/opt/OpieSdk/kde&lt;br /&gt;
 export PATH=${SOURCES}/opie/opt/OpieSdk/kde/bin:$PATH&lt;br /&gt;
 kbuildsycoca&lt;br /&gt;
 kdevelop&lt;br /&gt;
&lt;br /&gt;
Save the script. Do the same with the script arm_source&lt;br /&gt;
 source ${SOURCES}/opie/opt/OpieSdk/dev_env&lt;br /&gt;
 export QTDIR=$QTDIR_ARM&lt;br /&gt;
 export OPIEDIR=$OPIEDIR_ARM&lt;br /&gt;
&lt;br /&gt;
Save the script and modify the script host_source in the same manner as above.&lt;br /&gt;
 source ${SOURCES}/opie/opt/OpieSdk/dev_env&lt;br /&gt;
 export QTDIR=$QTDIR_NAT&lt;br /&gt;
 export OPIEDIR=$OPIEDIR_NAT&lt;br /&gt;
&lt;br /&gt;
Save the script and modify the script dev_env in the same manner as above.&lt;br /&gt;
 export PYTHONPATH=${SOURCES}/opie/opt/OpieSdk/python/opie:${SOURCES}/opie/opt/OpieSdk/python/sip&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/bin:/opt/OpieSdk/host_tools:${SOURCES}/opie/opt/OpieSdk/opie/x86/qt-2.3.7/bin:$PATH&lt;br /&gt;
 export PATH=${SOURCES}/opie/opt/OpieSdk/opie/x86/qmake:$PATH&lt;br /&gt;
 export QTDIR_NAT=${SOURCES}/opie/opt/OpieSdk/opie/x86/qt-2.3.7&lt;br /&gt;
 export OPIEDIR_NAT=${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk&lt;br /&gt;
 export QTDIR_ARM=${SOURCES}/opie/opt/OpieSdk/opie/arm/qt-2.3.7&lt;br /&gt;
 export OPIEDIR_ARM=${SOURCES}/opie/opt/OpieSdk/opie/arm/sdk&lt;br /&gt;
 export OPIE_SDK_BASE=${SOURCES}/opie/opt/OpieSdk/&lt;br /&gt;
 export OPIE_SDK_QMAKE_BASE=${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk/mkspecs/qws/&lt;br /&gt;
 export OPIE_DOC=${SOURCES}/opie/opt/OpieSdk/apidocs&lt;br /&gt;
&lt;br /&gt;
 export LD_LIBRARY_PATH=${SOURCES}/opie/opt/OpieSdk/sip/lib:$OPIEDIR_NAT/lib:$QTDIR_NAT/lib:$LD_LIBRARY_PATH&lt;br /&gt;
 export OPIE_LANGUAGES=de:en:cz:da:dk:es:fr:hu:it:ja:ko:lv:mk:nl:no:pl:pt:pt_BR:ru:sl:zh_CN:zh_TW&lt;br /&gt;
&lt;br /&gt;
The symbolic linke to the tool qmake points now to the wrong place. We need to fix this symbolic link. Here is the way to do that.&lt;br /&gt;
 cd host_tools&lt;br /&gt;
 ln -sf ${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk/qmake/qmake qmake&lt;br /&gt;
 cd ../&lt;br /&gt;
&lt;br /&gt;
Now it is time to fire up our development environment and start hacking in Opie.&lt;br /&gt;
&lt;br /&gt;
==Cross compiling libraries needed by vlc==&lt;br /&gt;
&lt;br /&gt;
Download ipaq-config.site to ${SOURCES}. When downloading source tarballs copy them to your ${SOURCES} directory. Each section is supposed to begin with  cd ${SOURCES}.&lt;br /&gt;
&lt;br /&gt;
===SDL===&lt;br /&gt;
&lt;br /&gt;
It is not clean at all but did not found a better working method. Using config.site it compiles well, but when linking with vlc there are problems !&lt;br /&gt;
&lt;br /&gt;
 /usr/local/arm/2.95.3/arm-linux/bin should contain the cross compiler without the prefix arm-linux-.&lt;br /&gt;
 tar -xvzf SDL-1.2.5.tar.gz&lt;br /&gt;
 cd SDL-1.2.5&lt;br /&gt;
 ./configure --enable-release --target=arm-linux --host=arm-linux \&lt;br /&gt;
 --disable-esd \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr \&lt;br /&gt;
 --x-includes=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/include \&lt;br /&gt;
 --x-libraries=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/lib \&lt;br /&gt;
 --disable-video-opengl&lt;br /&gt;
&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/arm-linux/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
===Glib/GTK+===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf glib-1.2.10.tar.gz&lt;br /&gt;
 cd glib-1.2.10&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 tar -xvzf gtk+-1.2.10.tar.gz&lt;br /&gt;
 cd gtk+-1.2.10&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr --with-glib=../glib-1.2.10&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ffmpeg===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf ffmpeg.tar.gz&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
 ./configure --arch=armv4l --cc=arm-linux-gcc --disable-mmx \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr --enable-shared&lt;br /&gt;
 cd libavcodec&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Vlc does not require that you install ffmpeg.&lt;br /&gt;
&lt;br /&gt;
===mad===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf mad-0.14.2b.tar.gz&lt;br /&gt;
 cd mad-0.14.2b&lt;br /&gt;
 ./configure --enable-release --target=arm-linux --host=arm-linux \&lt;br /&gt;
 --disable-esd \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr \&lt;br /&gt;
 --x-includes=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/include \&lt;br /&gt;
 --x-libraries=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/lib \&lt;br /&gt;
 --disable-video-opengl&lt;br /&gt;
 export PATH=/usr/local/arm/2.95.3/arm-linux/bin:$PATH&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===gpe===&lt;br /&gt;
&lt;br /&gt;
Not described.&lt;br /&gt;
&lt;br /&gt;
===tremor===&lt;br /&gt;
&lt;br /&gt;
Tremor is an integer decoder for the vorbis audio codec. Download the source through subversion at the &amp;quot;xiph.org&amp;quot; website.&lt;br /&gt;
&lt;br /&gt;
 svn co http://svn.xiph.org/trunk/Tremor&lt;br /&gt;
 cd Tremor&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
===ogg===&lt;br /&gt;
&lt;br /&gt;
For ogg, it is the same as Tremor.&lt;br /&gt;
 cvs -d :pserver:anoncvs@xiph.org:/usr/local/cvsroot login&lt;br /&gt;
 cvs -d :pserver:anoncvs@xiph.org:/usr/local/cvsroot co ogg&lt;br /&gt;
 cd ogg&lt;br /&gt;
 CONFIG_SITE=../ipaq-config.site ./configure \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===flac===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf flac-1.1.0.tar.gz&lt;br /&gt;
 cd flac-1.1.0&lt;br /&gt;
 ./configure --enable-release --host=arm-linux --target=arm-linux \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
&lt;br /&gt;
It will probably fail (due to the xmms plugin), but it is not a problem, we will continue installation by hand.&lt;br /&gt;
 cp -Rf include/FLAC /usr/local/arm/2.95.3/arm-linux/include&lt;br /&gt;
 cd src/libFLAC&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
===libdvbpsi===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf libdvbpsi-0.1.2.tar.gz&lt;br /&gt;
 cd libdvbpsi-0.1.2&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 ./configure --target=arm-linux --host=arm-linux&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===a52===&lt;br /&gt;
&lt;br /&gt;
 tar -xvzf a52dec-0.7.4.tar.gz&lt;br /&gt;
 cd a52dec-0.7.4&lt;br /&gt;
 ./configure --enable-release --host=arm-linux --target=arm-linux \&lt;br /&gt;
 --prefix=/usr/local/arm/2.95.3/arm-linux/usr&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
==Cross compiling vlc itself==&lt;br /&gt;
&lt;br /&gt;
First of all, run the ./bootstrap script. Then run one of the ipkg/rules.*, according to what you want to compile. Finally you just have to type make and you&#039;ll get a stand alone vlc.&lt;br /&gt;
&lt;br /&gt;
Run arm-linux-strip to remove symbols and so the size of the file, and now you can test it easily on your PDA.&lt;br /&gt;
&lt;br /&gt;
Enjoy !&lt;br /&gt;
&lt;br /&gt;
==Version==&lt;br /&gt;
Made by Marc Ariberti and Jean-Paul Saman.&lt;br /&gt;
Adapted to the wiki by [[User:J-b|Jean-Baptiste Kempf]].&lt;/div&gt;</summary>
		<author><name>X-h</name></author>
	</entry>
</feed>