Cross compiling OSCAM
For general information on how to build OSCAM, see BuildingOscam page. This page contains information about cross compilation.
Toolchains / Cross compilers
A toolchain contains compiler, libraries (libc, openssl, others..) and headers needed for compilation of programs for a system different than the one you are building on, the so called target system. Target system is the architecture/CPU for which the cross compiler can build binaries. For example SH4 cross compiler can build binaries for SH4 architecture. Building a toolchain is not an easy process and is outside of the scope of this page.
If you are using toolchain/cross compiler to build OSCAM that is not linked here, please share it with us in our forum.
forum: https://board.streamboard.tv/ Note: Registration Needed
The pre-built toolchains listed here can be run on any 32-bit Linux distro or on 64-bit Linux with with 32-bit compat libraries. These toolchains are provided with ready made instructions how to download, install and use them to compile your own OSCAM. Basically (minus the details), the procedure is:
- Download and install toolchain.
- Download or checkout OSCAM source code from SVN, see GettingOscam page for details.
- Cross compile OSCAM by using
make CROSS=/my-toolchain/bin/arch-platform-
For more cross compilation examples see the end of https://trac.streamboard.tv/oscam/browser/trunk/README.build
Available Cross Compilers
- Android Embedded Devices (Wetekplay "WeOS",SmartPhone,Tablet,...)
- Broadcom ARM and MIPSEL
- COOLSTREAM ARM
- Dreambox 500 /DM500 and DM500-S/ and Dbox2 (PPC Tuxbox Old)
- Dreambox 600/7000/7020 (PPC Tuxbox)
- Dreambox 800/8000/7025 (MIPSEL)
- DOCKSTAR
- MIPSEL Router / DD-WRT toolchain
- MIPS Router / OpenWRT
- MIPS Router / Fonera
- MIPS Router Fritzbox
- Mipsel Pli4 Dreambox hd800se,8000 VU+ Currently
- ARM NSLU2 UNSLUG
- ARM NSLU2 OpenWRT
- SH4
Android
Building OSCam for Android is quite easy. Just follow these instructions: Before Beginning some steps say {releasenumber} change it for your NDK release Ex:. 16b,14b,13b,...
OSCam can be compiled on Android since commit r8339.
Download Android NDK (Native Development Kit)
- Download Android NDK from https://developer.android.com/ndk/downloads/ or use this command below to download the latest NDK, please read the Note marked below before anything or use tested NDK r13b or r14b.
cd / wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip
Note: Tested in r13b and r14b so if something go wrong at one step because you are using above r14b, download one of this version below and clean all folders created and repeat the steps below, the reason why versions above r14b don't work check 'Very important note...' below.
NDK 14b
cd / wget https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip
NDK 13b
cd / wget https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
Very Important Note for NDK above 14b and 14b included :
All versions above NDK 14b use Clang to Compile out of the box (Standalone Toolchain) since you need to import the openssl you need to deploy the android ndk toolchain using clang. Issue reported in GithubAndroid-NDK and the issue are been reported two times in Openssl Github one in Openssl github issue #3826 reported by deveee and the 2nd in Openssl Github issue #6879 reported by Screamfox, Google says they don't fix this issue since gcc is deprecated read here Google Changelog r14b i belive this can be solved with a workaround and if some one have found a workaround please notice us in our forum (Link on the top of page) or edit correctly this wiki page [Registration Required].
You can continue compiling OpenSSL with NDK r13b/r14b if you have any version below 14b you can continue this tutorial.
Install the Toolchain (NDK)
- Unzip the NDK.
unzip android-ndk-r{releasenumber}-linux-x86_64.zip
Note: Install Unzip required, install it using: apt install unzip.
- Go to the NDK directory after decompressed(Unziped).
cd /android-ndk-r{releasenumber}
- Inside the NDK directory go to the /android-ndk-r{releasenumber}/build/tools
cd build/tools
- Inside the build/tools directory export toolchain,
export TOOLCHAIN=/android-toolchain
- Still in the same directory (/android-ndk-r{releasenumber}/build/tools) and type this to install the toolchain,
./make_standalone_toolchain.py --arch arm --api 21 --install-dir /android-toolchain
Download and Install OpenSSl
- Download OpenSSL
cd / wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
Note: not tested in latest version please test it in newest version and say in forum if it's working on latest version or edit the OpenSSL link above and edit tar -xf command and cd command below (Next steps "8,9") to the version you have tested to keep this tutorial up to date.
- Extract the tar.gz
tar -xf openssl-1.0.1g.tar.gz
- Go to the directory you extracted.
cd openssl-1.0.1g
- Export the gcc in the Android Toolchain.
export CC=/android-toolchain/bin/arm-linux-androideabi-gcc
- Export the Ran Library to Android Toolchain.
export RANLIB=/android-toolchain/bin/arm-linux-androideabi-ranlib
- type ./configure to before make and make instal_sw, this step is to set configuration before done and install the OpenSSL.
./Configure --prefix=/android-toolchain/sysroot/usr android make make install_sw
Download the latest SVN and Cross Compile for Android Devices
- Download the latest SVN from Oscam/trunk repo.
cd / svn checkout https://svn.streamboard.tv/oscam/trunk oscam-svn cd oscam-svn ./config.sh --enable WEBIF WITH_SSL IPV6SUPPORT
- Cross Compile OSCam with Android Toolchain
make static EXTRA_FLAGS="-pie" LIB_RT= LIB_PTHREAD= CROSS=/android-toolchain/bin/arm-linux-androideabi-
Table about the Android Versions and API
Note: Change the parameter in step 6 if needed " --api 21 " to the version of your device look table below.
Android Code Name | Version Number | Linux Kernel Version | Initial Release Date | API LEVEL | Security Patches |
(No codename) | 1.0 | ? | September 23, 2008 | 1 | Unsupported |
Petit Four | 1.1 | 2.6.X | February 9, 2009 | 2 | Unsupported |
Cupcake | 1.5 | 2.6.27 | April 27, 2009 | 3 | Unsupported |
Donut | 1.6 | 2.6.29 | September 15, 2009 | 4 | Unsupported |
Eclair | 2.0 – 2.1 | 2.6.29 | October 26, 2009 | 5 – 7 | Unsupported |
Froyo | 2.2 – 2.2.3 | 2.6.32 | May 20, 2010 | 8 | Unsupported |
Gingerbread | 2.3 – 2.3.7 | 2.6.35 | December 6, 2010 | 9 – 10 | Unsupported |
Honeycomb | 3.0 – 3.2.6 | 2.6.36 | February 22, 2011 | 11 – 13 | Unsupported |
Ice Cream Sandwich | 4.0 – 4.0.4 | 3.0.1 | October 18, 2011 | 14 – 15 | Unsupported |
Jelly Bean | 4.1 – 4.3.1 | 3.0.31 to 3.4.39 | July 9, 2012 | 16 – 18 | Unsupported |
KitKat | 4.4 – 4.4.4 | 3.10 | October 31, 2013 | 19 – 20 | Unsupported |
Lollipop | 5.0 – 5.1.1 | 3.16.1 | November 12, 2014 | 21 – 22 | Unsupported |
Marshmallow | 6.0 – 6.0.1 | 3.18.10 | October 5, 2015 | 23 | Supported |
Nougat | 7.0 – 7.1.2 | 4.4.1 | August 22, 2016 | 24 – 25 | Supported |
Oreo | 8.0 – 8.1 | 4.10 | August 21, 2017 | 26 – 27 | Supported |
Android P | 9.0 | ? | July 25, 2018 (beta 4) | 28 | In beta, not yet supported |
Edit a APK and join the OSCam Binary Cross Compiled before.
Coming Soon..
Dreambox 800/8000/7025 (MIPSEL)
- Download: https://files.streamboard.tv/toolchains/Toolchain_mipsel-tuxbox-linux.Dreambox.tar.bz2
- Download (SSL support): https://files.streamboard.tv/toolchains/Toolchain_mipsel-tuxbox-linux.Dreambox.SSL.tar.bz2
- Architecture: mipsel
- SSL installed: no / yes
- libusb installed: no (see how to install libusb in toolchain)
How to install the toolchain
Run the following commands as NORMAL (non-root user).
cd /tmp sudo mkdir -p /opt/cross wget https://files.streamboard.tv/toolchains/Toolchain_mipsel-tuxbox-linux.Dreambox.tar.bz2 sudo tar -xf Toolchain_mipsel-tuxbox-linux.Dreambox.tar.bz2 -C /opt/cross
How to install openssl/libcrypto
Run the following commands as NORMAL (non-root user).
cd /tmp wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz tar -xf openssl-1.0.1g.tar.gz cd openssl-1.0.1g export TOOLCHAIN=/opt/cross/mipsel-unknown-linux-gnu export CC=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu-gcc export RANLIB=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu-ranlib ./Configure --prefix=$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/ linux-generic32 shared make sudo make install
How to install libusb
Run the following commands as NORMAL (non-root user).
cd /tmp wget http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 tar -xf libusb-1.0.9.tar.bz2 cd libusb-1.0.9 export TOOLCHAIN=/opt/cross/mipsel-unknown-linux-gnu export PATH="$TOOLCHAIN/bin:$PATH" ./configure --prefix=$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/ --host=mipsel-unknown-linux-gnu --enable-shared=no make make install
How to install pcsc
Run the following commands as NORMAL (non-root user).
cd /tmp wget http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 tar -xf libusb-1.0.9.tar.bz2 cd libusb-1.0.9 export TOOLCHAIN=/opt/cross/mipsel-unknown-linux-gnu export PATH="$TOOLCHAIN/bin:$PATH" ./configure --prefix=$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr --host=mipsel-unknown-linux-gnu make make install cd /tmp wget https://alioth.debian.org/frs/download.php/3757/pcsc-lite-1.8.6.tar.bz2 tar -xf pcsc-lite-1.8.6.tar.bz2 cd pcsc-lite-1.8.6 ./configure CC=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu-gcc-4.3.2 --disable-libudev --host=mipsel-unknown-linux-gnu --prefix=$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr --exec-prefix=$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr --disable-shared LIBUSB_LIBS="-L$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/lib -lusb-1.0" LIBUSB_CFLAGS="-I$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/include/libusb-1.0" make make install
How to use cross compile OSCAM
Run the following commands as your regular user in the directory where OSCAM source is. See GettingOscam.
# Set this variable to the root directory of your toolchain export TOOLCHAIN=/opt/cross/mipsel-unknown-linux-gnu # Default compilation make CROSS=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu- # Cross compile with SSL (and libcrypto) support make CROSS=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu- USE_SSL=1 # Cross compile libusb (smartreader) support make CROSS=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu- USE_LIBUSB=1 # Cross compile with static libusb (smartreader) support make CROSS=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu- USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/lib/libusb-1.0.a -lrt" # Cross compile with pcsc support make CROSS=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu- USE_PCSC=1 EXTRA_FLAGS="-I$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/include/PCSC" # Cross compile with static libusb, pcsc, SSL support make CROSS=$TOOLCHAIN/bin/mipsel-unknown-linux-gnu- CONF_DIR=/etc/tuxbox/config/ USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/lib/libusb-1.0.a -lrt" USE_PCSC=1 USE_SSL=1 EXTRA_FLAGS="-I$TOOLCHAIN/mipsel-unknown-linux-gnu/sys-root/usr/include/PCSC"
MIPSEL Router / DD-WRT toolchain
- Download: https://files.streamboard.tv/toolchains/Toolchain_MIPS-Router-uclib-0.9.28.bz2 (Size: 37MB)
- Architecture: mipsel LIBC: uclibc
- SSL installed: no (see how to install openssl in toolchain)
- libusb installed: no (see how to install libusb in toolchain)
How to install the toolchain
Run the following commands as NORMAL (non-root user).
cd /tmp wget https://files.streamboard.tv/toolchains/Toolchain_MIPS-Router-uclib-0.9.28.bz2 tar -xvf Toolchain_MIPS-Router-uclib-0.9.28.bz2 sudo mkdir -p /opt/cross/mipsel sudo mv toolchains/* /opt/cross/mipsel
How to install openssl/libcrypto
Run the following commands as NORMAL (non-root user).
cd /tmp wget http://openssl.org/source/openssl-0.9.8x.tar.gz tar -xf openssl-0.9.8x.tar.gz cd openssl-0.9.8x export TOOLCHAIN=/opt/cross/mipsel/4.1.0-uclibc-0.9.28 export CC=$TOOLCHAIN/bin/mipsel-linux-uclibc-gcc export RANLIB=$TOOLCHAIN/bin/mipsel-linux-uclibc-ranlib ./Configure --prefix=/ linux-generic32 shared make sudo make INSTALL_PREFIX=$TOOLCHAIN install_sw
How to install libusb
Run the following commands as NORMAL (non-root user).
cd /tmp wget http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 tar -xf libusb-1.0.9.tar.bz2 cd libusb-1.0.9 export TOOLCHAIN=/opt/cross/mipsel/4.1.0-uclibc-0.9.28 export PATH="$TOOLCHAIN/bin/:$PATH" ./configure --prefix=/ --host=mipsel-linux-uclibc make sudo make DESTDIR=$TOOLCHAIN install
How to use cross compile OSCAM
Run the following commands as your regular user in the directory where OSCAM source is. See GettingOscam.
# Set this variable to the root directory of your toolchain export TOOLCHAIN=/opt/cross/mipsel/4.1.0-uclibc-0.9.28 # Default compilation make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- # Cross compile with SSL (and libcrypto) support make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_SSL=1 # Cross compile libusb (smartreader) support make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_LIBUSB=1 # Cross compile with static libusb (smartreader) support make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/lib/libusb-1.0.a"
Mipsel PLI4 Dreambox HD800E,8000 VU+
- Download (New PLI4 SSL LIBUSB PCSC gcc 4.8.1): https://www.dropbox.com/s/3hczxy3u189kgfa/Mipsel-Tuxbox-Pli4-gcc481-libc217-openssl101g-libusb109-pcsclite1811.tar.bz2?dl=1
- Architecture : mipsel linux-3.2 gcc 4.8.1
- SSL installed : yes ver 1.0.1g
- libusb installed : yes ver 1.0.9
- pcsc installed : yes ver 1.8.11
How to install the Mipsel Pli4 toolchain
Run the following commands as NORMAL (non-root user).
cd /tmp sudo mkdir /opt/cross wget -O Mipsel-Tuxbox-Pli4-gcc481-libc217-openssl101g-libusb109-pcsclite1811.tar.bz2 https://www.dropbox.com/s/3hczxy3u189kgfa/Mipsel-Tuxbox-Pli4-gcc481-libc217-openssl101g-libusb109-pcsclite1811.tar.bz2?dl=1 sudo tar xf Mipsel-Tuxbox-Pli4-gcc481-libc217-openssl101g-libusb109-pcsclite1811.tar.bz2 -C /opt/cross !!Note: do not use tar -xf but tar xf !!
How to use cross compile OSCAM
Run the following commands as your regular user in the directory where OSCAM source is. See GettingOscam.
# Set this variable to the root directory of your toolchain export TOOLCHAIN=/opt/cross/mipsel-tuxbox-linux-gnu export PATH="$TOOLCHAIN/bin:$PATH" # Default compilation make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- # Cross compile with SSL (and libcrypto) support make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- USE_SSL=1 # Cross compile libusb (smartreader) support make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- USE_LIBUSB=1 # Cross compile with static libusb (smartreader) support make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/mipsel-tuxbox-linux-gnu/sysroot/usr/lib/libusb-1.0.a" # Cross compile with pcsc support make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- USE_PCSC=1 EXTRA_FLAGS="-I$TOOLCHAIN/mipsel-tuxbox-linux-gnu/sysroot/usr/include/PCSC" # Cross compile with libusb, pcsc, SSL support make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- CONF_DIR=/etc/tuxbox/config/ USE_LIBUSB=1 USE_PCSC=1 USE_SSL=1 EXTRA_FLAGS="-I$TOOLCHAIN/mipsel-tuxbox-linux-gnu/sysroot/usr/include/PCSC" # Cross compile with static libusb, pcsc, SSL support make CROSS=$TOOLCHAIN/bin/mipsel-tuxbox-linux-gnu- CONF_DIR=/etc/tuxbox/config/ USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/mipsel-tuxbox-linux-gnu/sysroot/usr/lib/libusb-1.0.a -lrt" USE_PCSC=1 USE_SSL=1 EXTRA_FLAGS="-I$TOOLCHAIN/mipsel-tuxbox-linux-gnu/sysroot/usr/include/PCSC"
Available toolchains
MIPS Router / OpenWRT
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
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
MIPS Router / Fonera
MIPS Router Fritzbox
https://files.streamboard.tv/toolchains/Toolchain_MIPS-Router-Fritzbox-uclib-0.9.29.tar.bz2
SH4
https://files.streamboard.tv/toolchains/toolchain-sh4-tuxbox.bz2
TDT Tuxbox Toolchain, built on Ubuntu 10.4 with alborland´s easybuild script. For better supported toolchain you should install http://stlinux.com/
Dreambox 500 /DM500 and DM500-S/ and Dbox2 (PPC Tuxbox Old)
https://files.streamboard.tv/toolchains/Toolchain_powerpc-tuxbox-linux_dm500.tar.bz2
Dreambox 600/7000/7020 (PPC Tuxbox)
https://files.streamboard.tv/toolchains/Toolchain_powerpc-tuxbox-linux_DreamboxPPC.tar.bz2
With SSL support: https://files.streamboard.tv/toolchains/Toolchain_powerpc-tuxbox-linux_DreamboxPPC.SSL.tar.bz2
ARM NSLU2 UNSLUG
https://files.streamboard.tv/toolchains/Toolchain_armv5b-softfloat-linux_Unslug.tar.bz2
ARM NSLU2 OpenWRT
http://downloads.openwrt.org/kamikaze/7.09/ixp4xx-2.6/OpenWrt-SDK-ixp4xx-2.6-for-Linux-i686.tar.bz2
COOLSTREAM ARM
https://files.streamboard.tv/toolchains/Toolchain-cross-arm-cx2450x-linux-gnueabi.tar.bz2
DOCKSTAR
https://files.streamboard.tv/toolchains/Toolchain-armv5te_uclibc_eabi-dockstar.tar.bz2
BROADCOM ARM (and MIPSEL)
https://docs.broadcom.com/docs/12358538
For VU+ Solo4K (ARM based) use: /opt/cross/stbgcc-4.8-1.5/bin/arm-linux-gnueabihf-
Attachments (1)
-
libnxp.so.gz
(70.2 KB
) - added by 13 years ago.
When compiling for Coolstream, you will add this library file for internal reader support.
Download all attachments as: .zip