OSCam/en/Self-made: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „Kategorie:OSCam {{OSCamHomeLinks}} == OSCam selbstgemacht == === Intro === Nachfolgend wird der Weg vom Auschecken bis hin zur kompilierten OSCam '''im Grobe...“) |
Admin (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
(2 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
{{OSCamHomeLinks}} | {{OSCamHomeLinks}} | ||
== OSCam | == Self-made OSCam == | ||
=== | === Introduction === | ||
This article describes the steps one must execute in order to build OSCam from source. | |||
All instructions quoted here have been tested on a Linux PC running '''[http://www.debian.org/ Debian]''' 6 - Squeeze. | |||
=== | === Environment === | ||
You need a Linux PC. Of course, it doesn't have to be a physical box, a virtual machine (VM) works just as well [[Datei:Smiley_wink.png]]. | |||
We recommend the free [http://www.vmware.com/products/player/ VMware Player]. | |||
You can download your preferred [http://en.wikipedia.org/wiki/Linux_distribution Linux distribution], as an ISO or as a virtual machine. | |||
As mentioned above, the contents of this article were tested on a Debian distribution. It should work almost the same way with Ubuntu. | |||
=== | === Required Packages === | ||
The following packages are needed for building OSCam: | |||
apt-get install cvs subversion | apt-get install cvs subversion | ||
apt-get install autoconf libccid automake libtool gettext make cmake | apt-get install autoconf libccid automake libtool gettext make cmake | ||
Zeile 31: | Zeile 31: | ||
apt-get install libusb-1.0-0 libusb-1.0-0-dev | apt-get install libusb-1.0-0 libusb-1.0-0-dev | ||
=== | === Directory Contents === | ||
root@srv01:/var/shares/linux# tree oscam -L 2 -d | root@srv01:/var/shares/linux# tree oscam -L 2 -d | ||
oscam | oscam | ||
+-- bin # | +-- bin # this is where the compiled binary will be placed | ||
¦ +-- archive # | ¦ +-- archive # here we archive other OScam binaries | ||
+-- make # | +-- make # this directory is where we "make" OScam | ||
+-- svn-sb # | +-- svn-sb # this is where the code is downloaded | ||
¦ +-- branches # | ¦ +-- branches # Don't create this! It is automatically created by subversion | ||
¦ +-- tags # | ¦ +-- tags # Don't create this! It is automatically created by subversion | ||
¦ +-- trunk # | ¦ +-- trunk # Don't create this! It is automatically created by subversion | ||
+-- toolchains # optional, | +-- toolchains # optional, contains toolchains for building OScam for other platforms; see [http://en.wikipedia.org/wiki/Cross_compiler Cross-Compiler] | ||
+-- mipsel # optional - mipsel-Toolchain, | +-- mipsel # optional - mipsel-Toolchain, e.g. for Dbox2 | ||
+-- ppc # optional - ppc-Toolchain, | +-- ppc # optional - ppc-Toolchain, e.g. for Dbox | ||
+-- tdt # optional - sh4-Toolchain, | +-- tdt # optional - sh4-Toolchain, e.g. for Kathrein | ||
=== | === Checking out the source code with Subversion === | ||
==== | ==== Initial checkout ==== | ||
We execute this only once, when we checkout the sources for the first time: | |||
oscamRoot='/var/shares/linux/oscam' # | oscamRoot='/var/shares/linux/oscam' # modify this path to suit! | ||
svnDir='svn-sb' # | svnDir='svn-sb' # change this name to suit! | ||
cd $oscamRoot | cd $oscamRoot | ||
svn co http://streamboard. | svn co http://streamboard.de.vu/svn/oscam $svnDir | ||
==== Update ==== | ==== Update ==== | ||
After the initial checkout, you only need to update the source code when something is changed in the [http://en.wikipedia.org/wiki/Apache_Subversion#Repository_access Repository]. Like so: | |||
oscamRoot='/var/shares/linux/oscam' | oscamRoot='/var/shares/linux/oscam' # path where we have the source code | ||
svnDir='svn-sb' | svnDir='svn-sb' # matches the name in initial checkout | ||
svnBranch='trunk' | svnBranch='trunk' # this is the subversion branch | ||
cd $oscamRoot | cd $oscamRoot | ||
svn up $svnDir/$svnBranch | svn up $svnDir/$svnBranch | ||
=== | === Compilation === | ||
There's nothing magic about this process, even though it only takes a few seconds [[Datei:Smiley_wink.png]]: | |||
# | # Modify variables as needed! ****************************** | ||
oscamRoot='/var/shares/linux/oscam' | oscamRoot='/var/shares/linux/oscam' | ||
ver='1.00' | ver='1.00' | ||
Zeile 72: | Zeile 72: | ||
# ********************************************************** | # ********************************************************** | ||
cd $oscamRoot | cd $oscamRoot | ||
# | # update the source code *********************************** | ||
svn up $svnDir/$svnBranch | svn up $svnDir/$svnBranch | ||
# | # archive the current build (optional) ********************* | ||
mv $oscamRoot/bin/oscam* $oscamRoot/bin/archive/ | mv $oscamRoot/bin/oscam* $oscamRoot/bin/archive/ | ||
# | # | ||
cd $oscamRoot/make | cd $oscamRoot/make | ||
# i686 | # building for i686 with a Web Interface ******************* | ||
rm -fr $oscamRoot/make/* | rm -fr $oscamRoot/make/* | ||
cmake -DLIBUSBDIR=/usr -DWEBIF=1 -DCS_CONFDIR=/var/keys ../$svnDir/$svnBranch/$svnBuildDir | cmake -DLIBUSBDIR=/usr -DWEBIF=1 -DCS_CONFDIR=/var/keys ../$svnDir/$svnBranch/$svnBuildDir | ||
# | # if you have a multi-core CPU... | ||
make -j4 # | make -j4 # issue 4 parallel compiler jobs | ||
# ... | # ... otherwise running 'make' will suffice | ||
# | # rename the binary to reflect version number... | ||
if [ -x "oscam" ]; then mv -f oscam ../bin/oscam-i686-$ver-$(svnversion -n ../$svnDir/$svnBranch/$svnBuildDir)-wi; fi; | if [ -x "oscam" ]; then mv -f oscam ../bin/oscam-i686-$ver-$(svnversion -n ../$svnDir/$svnBranch/$svnBuildDir)-wi; fi; | ||
if [ -x "utils/list_smargo" ]; then mv -f utils/list_smargo ../bin/; fi; | if [ -x "utils/list_smargo" ]; then mv -f utils/list_smargo ../bin/; fi; | ||
=== | === Compiling for other platforms === | ||
[http://de.wikipedia.org/wiki/Cross-Compiler Cross-Compiling] | [http://de.wikipedia.org/wiki/Cross-Compiler Cross-Compiling] is the magic word. | ||
To compile OSCam for other platforms, we need additional [http://en.wikipedia.org/wiki/Toolchain Toolchains]. | |||
You can find more information on Toolchains and "'''''Cross-Compiling'''''" [[Streamboard:oscam/wiki/crosscompiling|'''»here«''']]. | |||
==== | ==== Example: DM800 ==== | ||
Toolchain- | Toolchain-Data: | ||
# toolchain-mipsel.cmake | # toolchain-mipsel.cmake | ||
set (OSCAM_SYSTEM_NAME Tuxbox) | set (OSCAM_SYSTEM_NAME Tuxbox) | ||
Zeile 100: | Zeile 100: | ||
set (CMAKE_C_COMPILER /var/shares/linux/oscam/toolchains/mipsel/bin/mipsel-unknown-linux-gnu-gcc) | set (CMAKE_C_COMPILER /var/shares/linux/oscam/toolchains/mipsel/bin/mipsel-unknown-linux-gnu-gcc) | ||
set (CMAKE_SYSTEM_PROCESSOR mips) | set (CMAKE_SYSTEM_PROCESSOR mips) | ||
Checking out the source code and compilation: | |||
# | # Modify variables as needed! ****************************** | ||
oscamRoot='/var/shares/linux/oscam' | oscamRoot='/var/shares/linux/oscam' | ||
ver='1.00' | ver='1.00' | ||
Zeile 109: | Zeile 109: | ||
# ********************************************************** | # ********************************************************** | ||
cd $oscamRoot | cd $oscamRoot | ||
# | # update the source code *********************************** | ||
svn up $svnDir/$svnBranch | svn up $svnDir/$svnBranch | ||
# | # archive previous build (optional) ************************ | ||
mv $oscamRoot/bin/oscam* $oscamRoot/bin/archive/ | mv $oscamRoot/bin/oscam* $oscamRoot/bin/archive/ | ||
# | # |
Aktuelle Version vom 23. Juli 2012, 00:31 Uhr
OSCam Übersicht OSCam Home OSCam Accueil OSCam Home
Self-made OSCam
Introduction
This article describes the steps one must execute in order to build OSCam from source. All instructions quoted here have been tested on a Linux PC running Debian 6 - Squeeze.
Environment
You need a Linux PC. Of course, it doesn't have to be a physical box, a virtual machine (VM) works just as well . We recommend the free VMware Player.
You can download your preferred Linux distribution, as an ISO or as a virtual machine. As mentioned above, the contents of this article were tested on a Debian distribution. It should work almost the same way with Ubuntu.
Required Packages
The following packages are needed for building OSCam:
apt-get install cvs subversion apt-get install autoconf libccid automake libtool gettext make cmake apt-get install patch ncurses-bin gcc g++ flex bison pkg-config libpng3 # zlib (development headers) - zlib1g-dev apt-get install tar bzip2 gzip zlib1g-dev # for sa and aes: apt-get install libssl-dev libssl0.9.8 # for pcsc: apt-get install libpcsclite1 libpcsclite-dev # for smartreader branch: apt-get install libusb-1.0-0 libusb-1.0-0-dev
Directory Contents
root@srv01:/var/shares/linux# tree oscam -L 2 -d oscam +-- bin # this is where the compiled binary will be placed ¦ +-- archive # here we archive other OScam binaries +-- make # this directory is where we "make" OScam +-- svn-sb # this is where the code is downloaded ¦ +-- branches # Don't create this! It is automatically created by subversion ¦ +-- tags # Don't create this! It is automatically created by subversion ¦ +-- trunk # Don't create this! It is automatically created by subversion +-- toolchains # optional, contains toolchains for building OScam for other platforms; see Cross-Compiler +-- mipsel # optional - mipsel-Toolchain, e.g. for Dbox2 +-- ppc # optional - ppc-Toolchain, e.g. for Dbox +-- tdt # optional - sh4-Toolchain, e.g. for Kathrein
Checking out the source code with Subversion
Initial checkout
We execute this only once, when we checkout the sources for the first time:
oscamRoot='/var/shares/linux/oscam' # modify this path to suit! svnDir='svn-sb' # change this name to suit! cd $oscamRoot svn co http://streamboard.de.vu/svn/oscam $svnDir
Update
After the initial checkout, you only need to update the source code when something is changed in the Repository. Like so:
oscamRoot='/var/shares/linux/oscam' # path where we have the source code svnDir='svn-sb' # matches the name in initial checkout svnBranch='trunk' # this is the subversion branch cd $oscamRoot svn up $svnDir/$svnBranch
Compilation
There's nothing magic about this process, even though it only takes a few seconds :
# Modify variables as needed! ****************************** oscamRoot='/var/shares/linux/oscam' ver='1.00' svnDir='svn-sb' svnBranch='trunk' svnBuildDir='' # ********************************************************** cd $oscamRoot # update the source code *********************************** svn up $svnDir/$svnBranch # archive the current build (optional) ********************* mv $oscamRoot/bin/oscam* $oscamRoot/bin/archive/ # cd $oscamRoot/make # building for i686 with a Web Interface ******************* rm -fr $oscamRoot/make/* cmake -DLIBUSBDIR=/usr -DWEBIF=1 -DCS_CONFDIR=/var/keys ../$svnDir/$svnBranch/$svnBuildDir # if you have a multi-core CPU... make -j4 # issue 4 parallel compiler jobs # ... otherwise running 'make' will suffice # rename the binary to reflect version number... if [ -x "oscam" ]; then mv -f oscam ../bin/oscam-i686-$ver-$(svnversion -n ../$svnDir/$svnBranch/$svnBuildDir)-wi; fi; if [ -x "utils/list_smargo" ]; then mv -f utils/list_smargo ../bin/; fi;
Compiling for other platforms
Cross-Compiling is the magic word. To compile OSCam for other platforms, we need additional Toolchains. You can find more information on Toolchains and "Cross-Compiling" »here«.
Example: DM800
Toolchain-Data:
# toolchain-mipsel.cmake set (OSCAM_SYSTEM_NAME Tuxbox) set (CMAKE_SYSTEM_NAME Linux) set (CMAKE_C_COMPILER /var/shares/linux/oscam/toolchains/mipsel/bin/mipsel-unknown-linux-gnu-gcc) set (CMAKE_SYSTEM_PROCESSOR mips)
Checking out the source code and compilation:
# Modify variables as needed! ****************************** oscamRoot='/var/shares/linux/oscam' ver='1.00' svnDir='svn-sb' svnBranch='trunk' svnBuildDir='' # ********************************************************** cd $oscamRoot # update the source code *********************************** svn up $svnDir/$svnBranch # archive previous build (optional) ************************ mv $oscamRoot/bin/oscam* $oscamRoot/bin/archive/ # cd $oscamRoot/make # mipsel *************************************************** rm -fr $oscamRoot/make/* cmake -DLIBUSBDIR=/var/shares/linux/oscam/lib-mipsel/usr -DWEBIF=1 -DCS_CONFDIR=/var/keys -DCMAKE_TOOLCHAIN_FILE=../toolchains/toolchain-mipsel.cmake ../$svnDir/$svnBranch/$svnBuildDir make -j4 if [ -x "oscam" ]; then mv oscam ../bin/oscam-mipsel-$ver-$(svnversion -n ../$svnDir/$svnBranch/$svnBuildDir)-wi; fi;
Diese Seite in anderen Sprachen - This page in other languages - Cette page dans d'autres langues - Queste pagine in altre Lingue
[[OSCam/de/{{#titleparts:OSCam/en/Self-made|3|3}}|Deutsch]] [[OSCam/en/{{#titleparts:OSCam/en/Self-made|3|3}}|English]] [[OSCam/fr/{{#titleparts:OSCam/en/Self-made|3|3}}|Français]] [[OSCam/it/{{#titleparts:OSCam/en/Self-made|3|3}}|Italiano]]