X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=doc%2Farm-crosscompile-howto.sgml;h=81a44d805a0d56d367798c12af5f1cf2303c9bfc;hb=5d313c65e44d8963262fdbc5d5d52f5169f3f787;hp=ddfea88aadf605ca88a5706c554fdf18b09c6d42;hpb=a159279989efa0fccb35d58774595bfd81d6c968;p=vlc diff --git a/doc/arm-crosscompile-howto.sgml b/doc/arm-crosscompile-howto.sgml index ddfea88aad..81a44d805a 100644 --- a/doc/arm-crosscompile-howto.sgml +++ b/doc/arm-crosscompile-howto.sgml @@ -3,7 +3,8 @@ Cross compiling VLC for ARM-Linux based platforms Marc Ariberti - v0.0.1, 13 march 2003 + Jean-Paul Saman + v0.0.2, 19 march 2004 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 @@ -26,9 +27,9 @@ I will describe here how to compile vlc for an ARM based PDA running linux. It includes for example : - Compaq - iPaq (H36xx, H38xx,...), using + Compaq - iPaq (H36xx, H38xx,...), using Familiar Linux - Familiar linux + GNU Portable Environment (GPE) Opie @@ -117,7 +118,7 @@ Binutils

Compiling binutils is pretty simple : -tar xzf binutils-2.11.2.tar.gz +tar -xzf binutils-2.11.2.tar.gz cd binutils-2.11.2 ./configure --target=arm-linux --prefix=/usr/local/arm/2.95.3 make @@ -129,7 +130,7 @@ make install Preparing linux kernel

-tar xzf linux-2.4.19.tar.bz2 +tar -xzf linux-2.4.19.tar.bz2 bunzip2 patch-2.4.19-rmk4.bz2 cd linux-2.4.19 patch -p1 < ../patch-2.4.19-rmk4.bz2 @@ -153,7 +154,7 @@ ln -s include sys-linux Basic cross compiler (gcc)

-tar xvzf gcc-2.95.3.tar.gz +tar -xvzf gcc-2.95.3.tar.gz bunzip2 gcc-2.95.3.diff.bz2 bunzip2 gcc-2.95.3.diffbis.bz2 patch -p1 -d gcc-2.95.3 < gcc-2.95.3.diff @@ -172,9 +173,9 @@ make install

Depending on your target, you may choose another glibc version (eg: 2.1.3 for linupy 1.4) -tar xvzf glibc-2.2.5.tar.gz +tar -xvzf glibc-2.2.5.tar.gz cd glibc-2.2.5 -tar xvzf ../glibc-linuxthreads-2.2.5.tar.gz +tar -xvzf ../glibc-linuxthreads-2.2.5.tar.gz CC=arm-linux-gcc ./configure arm-linux --target=arm-linux \ --prefix=/usr/local/arm/2.95.3/arm-linux --enable-add-ons @@ -199,7 +200,7 @@ CC=arm-linux-gcc make install

rm -Rf gcc-2.95.3 -tar xvzf gcc-2.95.3.tar.gz +tar -xvzf gcc-2.95.3.tar.gz patch -p1 -d gcc-2.95.3 < gcc-2.95.3.diff patch -p1 -d gcc-2.95.3 < gcc-2.95.3.diff2 cd gcc-2.95.3 @@ -247,19 +248,84 @@ export PATH=/usr/local/arm/2.95.3/bin:$PATH # script to install .ipk into the arm-toolchain # usage : ./install.sh foobar.ipk -if ! tar xvzf $1 2> /dev/null +if ! tar -xvzf $1 2> /dev/null then ar xv $1 2> /dev/null fi cp data.tar.gz /usr/local/arm/2.95.3/arm-linux cd /usr/local/arm/2.95.3/arm-linux -tar xvzf data.tar.gz +tar -xvzf data.tar.gz

+ + Setting up Opie cross-compile environment +

Download the Opie SDK from the website +using the menuitem "Download Opie SDK" or try the direct link here: . +Download all files to your ${SOURCES}/opie directory. +

+ + Opie SDK +

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. + +cd ${SOURCES}/opie +tar -xjvf OpieSdk.tar.bz2 + + 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. + +#!/bin/sh +source ${SOURCES}/opie/opt/OpieSdk/dev_env +export KDEDIR=${SOURCES}/opie/opt/OpieSdk/kde +export PATH=${SOURCES}/opie/opt/OpieSdk/kde/bin:$PATH +kbuildsycoca +kdevelop + + Save the script. Do the same with the script arm_source + +source ${SOURCES}/opie/opt/OpieSdk/dev_env +export QTDIR=$QTDIR_ARM +export OPIEDIR=$OPIEDIR_ARM + + Save the script and modify the script host_source in the same manner as above. + +source ${SOURCES}/opie/opt/OpieSdk/dev_env +export QTDIR=$QTDIR_NAT +export OPIEDIR=$OPIEDIR_NAT + + Save the script and modify the script dev_env in the same manner as above. + +export PYTHONPATH=${SOURCES}/opie/opt/OpieSdk/python/opie:${SOURCES}/opie/opt/OpieSdk/python/sip +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 +export PATH=${SOURCES}/opie/opt/OpieSdk/opie/x86/qmake:$PATH +export QTDIR_NAT=${SOURCES}/opie/opt/OpieSdk/opie/x86/qt-2.3.7 +export OPIEDIR_NAT=${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk +export QTDIR_ARM=${SOURCES}/opie/opt/OpieSdk/opie/arm/qt-2.3.7 +export OPIEDIR_ARM=${SOURCES}/opie/opt/OpieSdk/opie/arm/sdk +export OPIE_SDK_BASE=${SOURCES}/opie/opt/OpieSdk/ +export OPIE_SDK_QMAKE_BASE=${SOURCES}/opie/opt/OpieSdk/opie/x86/sdk/mkspecs/qws/ +export OPIE_DOC=${SOURCES}/opie/opt/OpieSdk/apidocs + +export LD_LIBRARY_PATH=${SOURCES}/opie/opt/OpieSdk/sip/lib:$OPIEDIR_NAT/lib:$QTDIR_NAT/lib:$LD_LIBRARY_PATH +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 + + 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. + +cd host_tools +ln -sf /home/jpsaman/src/opie/opt/OpieSdk/opie/x86/sdk/qmake/qmake qmake +cd ../ + + Now it is time to fire up our development environment and start hacking in Opie. +

+
+
Cross compiling libraries needed by vlc @@ -280,7 +346,7 @@ tar xvzf data.tar.gz compiler without the prefix arm-linux-. -tar xvzf SDL-1.2.5.tar.gz +tar -xvzf SDL-1.2.5.tar.gz cd SDL-1.2.5 ./configure --enable-release --target=arm-linux --host=arm-linux \ --disable-esd \ @@ -299,14 +365,14 @@ make && make install Glib/GTK+

-tar xvzf glib-1.2.10.tar.gz +tar -xvzf glib-1.2.10.tar.gz cd glib-1.2.10 CONFIG_SITE=../ipaq-config.site ./configure \ --prefix=/usr/local/arm/2.95.3/arm-linux/usr make make install cd .. -tar xvzf gtk+-1.2.10.tar.gz +tar -xvzf gtk+-1.2.10.tar.gz cd gtk+-1.2.10 CONFIG_SITE=../ipaq-config.site ./configure \ --prefix=/usr/local/arm/2.95.3/arm-linux/usr --with-glib=../glib-1.2.10 @@ -319,7 +385,7 @@ make install ffmpeg

-tar xvzf ffmpeg.tar.gz +tar -xvzf ffmpeg.tar.gz cd ffmpeg ./configure --cpu=armv4l --cc=arm-linux-gcc --disable-mmx \ --prefix=/usr/local/arm/2.95.3/arm-linux/usr --enable-shared @@ -334,7 +400,7 @@ make mad

-tar xvzf mad-0.14.2b.tar.gz +tar -xvzf mad-0.14.2b.tar.gz cd mad-0.14.2b ./configure --enable-release --target=arm-linux --host=arm-linux \ --disable-esd \ @@ -354,7 +420,7 @@ make tremor

Tremor is an integer decoder for the vorbis audio codec. Download the - source through CVS at the website. + source through CVS at the website.

Log into CVS using the password : anoncvs. @@ -386,7 +452,7 @@ make flac

-tar xvzf flac-1.1.0.tar.gz +tar -xvzf flac-1.1.0.tar.gz cd flac-1.1.0 ./configure --enable-release --host=arm-linux --target=arm-linux \ --prefix=/usr/local/arm/2.95.3/arm-linux/usr @@ -404,7 +470,7 @@ make install libdvbpsi

-tar xvzf libdvbpsi-0.1.2.tar.gz +tar -xvzf libdvbpsi-0.1.2.tar.gz cd libdvbpsi-0.1.2 ./bootstrap ./configure --target=arm-linux --host=arm-linux @@ -416,7 +482,7 @@ make a52

-tar xvzf a52dec-0.7.4.tar.gz +tar -xvzf a52dec-0.7.4.tar.gz cd a52dec-0.7.4 ./configure --enable-release --host=arm-linux --target=arm-linux \ --prefix=/usr/local/arm/2.95.3/arm-linux/usr @@ -442,4 +508,5 @@ make && make install

+