| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Cross compiling OSCAM = |
| 4 | |
| 5 | For general information on how to build OSCAM, see BuildingOscam page. |
| 6 | This page contains information about cross compilation. |
| 7 | |
| 8 | = Toolchains / Cross compilers = |
| 9 | A toolchain contains compiler, libraries (libc, openssl, others..) and |
| 10 | headers needed for compilation of programs for a system different than |
| 11 | the one you are building on, the so called ''target system''. Target |
| 12 | system is the architecture/CPU for which the cross compiler can build |
| 13 | binaries. For example SH4 cross compiler can build binaries for SH4 |
| 14 | architecture. Building a toolchain is not an easy process and is |
| 15 | outside of the scope of this page. |
| 16 | |
| 17 | If you are using toolchain/cross compiler to build OSCAM that is not |
| 18 | linked here, please share it with us. |
| 19 | |
| 20 | The pre-built toolchains listed here can be run on any 32-bit |
| 21 | Linux distro or on 64-bit Linux with with 32-bit compat libraries. These |
| 22 | toolchains are provided with ready made instructions how to download, |
| 23 | install and use them to compile your own OSCAM. Basically (minus the |
| 24 | details), the procedure is: |
| 25 | * Download and install toolchain. |
| 26 | * Download or checkout OSCAM source code from SVN, see GettingOscam page for details. |
| 27 | * Cross compile OSCAM by using |
| 28 | {{{ |
| 29 | make CROSS=/my-toolchain/bin/arch-platform- |
| 30 | }}} |
| 31 | |
| 32 | For more cross compilation examples see the end of http://www.streamboard.tv/oscam/browser/trunk/README.build |
| 33 | |
| 34 | = Available cross compilers = |
| 35 | * [#mipsel_ddwrt MIPSEL Router / DD-WRT toolchain] |
| 36 | * [#mips_openwrt MIPS Router / OpenWRT] |
| 37 | * [#mips_fonera MIPS Router / Fonera] |
| 38 | * [#mips_fritzbox MIPS Router Fritzbox] |
| 39 | * [#sh4 SH4] |
| 40 | * [#dm500_ppc Dreambox 500 /DM500 and DM500-S/ and Dbox2 (PPC Tuxbox Old)] |
| 41 | * [#dm7000_ppc Dreambox 600/7000/7020 (PPC Tuxbox)] |
| 42 | * [#dm800_mipsel Dreambox 800/8000/7025 (MIPSEL)] |
| 43 | * [#nslu2_arm ARM NSLU2 UNSLUG] |
| 44 | * [#nslu_openwrt ARM NSLU2 OpenWRT] |
| 45 | * [#coolstream COOLSTREAM ARM] |
| 46 | * [#dockstar_arm DOCKSTAR] |
| 47 | |
| 48 | == MIPSEL Router / DD-WRT toolchain == #mipsel_ddwrt |
| 49 | - Download: [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_MIPS-Router-uclib-0.9.28.bz2] (Size: 37MB) |
| 50 | - Architecture: mipsel LIBC: uclibc |
| 51 | - SSL installed: no (see how to install openssl in toolchain) |
| 52 | - libusb installed: no (see how to install libusb in toolchain) |
| 53 | ==== How to install the toolchain ==== |
| 54 | Run the following commands as '''root''' user. |
| 55 | {{{ |
| 56 | #!sh |
| 57 | cd /tmp |
| 58 | wget http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_MIPS-Router-uclib-0.9.28.bz2 |
| 59 | tar -xvf Toolchain_MIPS-Router-uclib-0.9.28.bz2 |
| 60 | mkdir -p /opt/cross/mipsel |
| 61 | mv toolchains/* /opt/cross/mipsel |
| 62 | }}} |
| 63 | ==== How to install openssl/libcrypto ==== |
| 64 | Run the following commands as '''root''' user. |
| 65 | {{{ |
| 66 | #!sh |
| 67 | cd /tmp |
| 68 | wget http://openssl.org/source/openssl-0.9.8x.tar.gz |
| 69 | tar -xf openssl-0.9.8x.tar.gz |
| 70 | cd openssl-0.9.8x |
| 71 | export TOOLCHAIN=/opt/cross/mipsel/4.1.0-uclibc-0.9.28 |
| 72 | export CC=$TOOLCHAIN/bin/mipsel-linux-uclibc-gcc |
| 73 | export RANLIB=$TOOLCHAIN/bin/mipsel-linux-uclibc-ranlib |
| 74 | ./Configure --prefix=/ linux-generic32 shared |
| 75 | make |
| 76 | make INSTALL_PREFIX=$TOOLCHAIN install_sw |
| 77 | }}} |
| 78 | ==== How to install libusb ==== |
| 79 | Run the following commands as '''root''' user. |
| 80 | {{{ |
| 81 | #!sh |
| 82 | cd /tmp |
| 83 | wget http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 |
| 84 | tar -xf libusb-1.0.9.tar.bz2 |
| 85 | cd libusb-1.0.9 |
| 86 | export TOOLCHAIN=/opt/cross/mipsel/4.1.0-uclibc-0.9.28 |
| 87 | export PATH="$TOOLCHAIN/bin/:$PATH" |
| 88 | ./configure --prefix=/ --host=mipsel-linux-uclibc |
| 89 | make |
| 90 | make DESTDIR=$TOOLCHAIN install |
| 91 | }}} |
| 92 | ==== How to use cross compile OSCAM ==== |
| 93 | Run the following commands as your regular user in the directory where OSCAM source is. |
| 94 | See GettingOscam. |
| 95 | {{{ |
| 96 | #!sh |
| 97 | # Set this variable to the root directory of your toolchain |
| 98 | export TOOLCHAIN=/opt/cross/mipsel/4.1.0-uclibc-0.9.28 |
| 99 | # Default compilation |
| 100 | make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- |
| 101 | # Cross compile with SSL (and libcrypto) support |
| 102 | make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_SSL=1 |
| 103 | # Cross compile libusb (smartreader) support |
| 104 | make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_LIBUSB=1 |
| 105 | # Cross compile with static libusb (smartreader) support |
| 106 | make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/lib/libusb-1.0.a" |
| 107 | }}} |
| 108 | |
| 109 | ** DON'T PANIC! THE LINKS BELLOW WILL BE CONVERTED TO THE ABOVE FORMAT SHORTLY ** |
| 110 | |
| 111 | = Toolchains = |
| 112 | |
| 113 | == MIPS Router / OpenWRT == #mips_openwrt |
| 114 | Little endian Kernel 2.4x - [http://downloads.openwrt.org/kamikaze/7.09/brcm-2.4/OpenWrt-SDK-brcm-2.4-for-Linux-i686.tar.bz2] |
| 115 | |
| 116 | Little endian Kernel 2.6x - [http://downloads.openwrt.org/kamikaze/7.09/brcm47xx-2.6/OpenWrt-SDK-brcm47xx-2.6-for-Linux-i686.tar.bz2] |
| 117 | |
| 118 | == MIPS Router / Fonera == #mips_fonera |
| 119 | [http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/OpenWrt-SDK-atheros-2.6-for-Linux-i686.tar.bz2] |
| 120 | |
| 121 | == MIPS Router Fritzbox == #mips_fritzbox |
| 122 | [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_MIPS-Router-Fritzbox-uclib-0.9.29.tar.bz2] |
| 123 | |
| 124 | == SH4 == #sh4 |
| 125 | [http://streamboard.de.vu/wbb2/tut-pics/toolchains/toolchain-sh4-tuxbox.bz2] |
| 126 | |
| 127 | TDT Tuxbox Toolchain, built on Ubuntu 10.4 with alborland´s easybuild script. |
| 128 | For better supported toolchain you should install [http://stlinux.com/] |
| 129 | |
| 130 | == Dreambox 500 /DM500 and DM500-S/ and Dbox2 (PPC Tuxbox Old) == #dm500_ppc |
| 131 | [http://streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_powerpc-tuxbox-linux_dm500.tar.bz2] |
| 132 | |
| 133 | == Dreambox 600/7000/7020 (PPC Tuxbox) == #dm7000_ppc |
| 134 | [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_powerpc-tuxbox-linux_DreamboxPPC.tar.bz2] |
| 135 | |
| 136 | With SSL support: [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_powerpc-tuxbox-linux_DreamboxPPC.SSL.tar.bz2] |
| 137 | |
| 138 | == Dreambox 800/8000/7025 (MIPSEL) == #dm800_mipsel |
| 139 | [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_mipsel-tuxbox-linux.Dreambox.tar.bz2] |
| 140 | |
| 141 | With SSL support: [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_mipsel-tuxbox-linux.Dreambox.SSL.tar.bz2] |
| 142 | |
| 143 | == ARM NSLU2 UNSLUG == #nslu2_arm |
| 144 | [http://www.streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain_armv5b-softfloat-linux_Unslug.tar.bz2] |
| 145 | |
| 146 | == ARM NSLU2 OpenWRT == #nslu_openwrt |
| 147 | [http://downloads.openwrt.org/kamikaze/7.09/ixp4xx-2.6/OpenWrt-SDK-ixp4xx-2.6-for-Linux-i686.tar.bz2] |
| 148 | |
| 149 | == COOLSTREAM ARM == #coolstream |
| 150 | [http://streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain-cross-arm-cx2450x-linux-gnueabi.tar.bz2] |
| 151 | |
| 152 | == DOCKSTAR == #dockstar_arm |
| 153 | [http://streamboard.de.vu/wbb2/tut-pics/toolchains/Toolchain-armv5te_uclibc_eabi-dockstar.tar.bz2] |