Professional Documents
Culture Documents
Building Oscam
Building Oscam
= Building OSCAM =
The OSCAM building (compilation) process is fairly straight forward. You get OSCAM
from
subversion (svn) then go to the directory where the OSCAM source code is and
compile
it by running `make`. In the usual case no extra programs and libraries are
required,
except `gcc` (or `clang`), `make`, libc and subversion to get the source code. The
openssl development librairies and headers are required too, in order to built
OSCAM with support for SSL among others. For distributions based on Debian /
Ubuntu, the openssl package to install is `libssl-dev`.
The full documentation of the build system and lots of examples is available
at [[http://www.streamboard.tv/oscam/browser/trunk/README.build]].
'''NOTE:''' Do not use {{{svn checkout}}} to update the source tree, that is the
wrong thing to do! {{{svn checkout}}} should be used only for getting the source
for the first time, to '''update''' the source to latest version you must use
{{{svn update}}}.
The above targets are shortcuts that are running {{{config.sh}}} tool
which deals with OSCAM configuration. You can use the tool to control and view
OSCAM build parameters from the command line. You can read
[http://www.streamboard.tv/oscam/browser/trunk/README.config config.sh --help] to
see what the tool offers. Here are some examples:
{{{
#!sh
# Enable WEBIF and SSL
./config.sh --enable WEBIF WITH_SSL
# Disable everything and enable webif, one module and one card reader
./config.sh --disable all --enable WEBIF MODULE_NEWCAMD READER_BULCRYPT
}}}
Once the patch is applied build OSCAM like you normally do, test it and
post the results.
=== Building OSCAM with support for smartreader (libusb) === #libusb
To build OSCAM with libusb (smartreader) support on you have to
install libusb first. If your distribution do not have libusb
or libusb-dev package installed you have to install them or
install libusb from source.
Now to build OSCAM with libusb support you need the following commands:
{{{
#!sh
make USE_LIBUSB=1
# To build OSCAM with static libusb you have to change LIBUSB_LIB variable to point
to the static library
make USE_LIBUSB=1 LIBUSB_LIB=/usr/local/lib/libusb-1.0.a
# Since OS X is kind of special to build with static libusb you have to use the
following command
make USE_LIBUSB=1 LIBUSB_LIB="/usr/local/lib/libusb-1.0.a -lobjc -framework IOKit
-framework CoreFoundation"
# If libusb is installed by macports or with different than the default prefix (for
example /opt/local)
make USE_LIBUSB=1 EXTRA_FLAGS="-I/opt/local/include -L/opt/local/lib"
To install PCSC from source, just download pcsclite from their site,
unarchive it and build it without any options. These following commands
would download, compile and install pcsclite in {{{/usr/local}}}.
{{{
cd /tmp
wget https://pcsclite.apdu.fr/files/pcsc-lite-1.8.25.tar.bz2
tar -xf pcsc-lite-1.8.25.tar.bz2
cd pcsc-lite-1.8.25
./configure
make
sudo make install
}}}
Now to build OSCAM with PCSC support you need the following commands:
{{{
#!sh
make USE_PCSC=1
=== Building OSCAM with SH4 with STAPI support === #sh4_stapi
All of the examples posted in this page should work just fine. If there
is a special OS X case it'll be pointed out (libusb static build require
listing of additional libraries, see [#libusb].