Jump to content


Photo

Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM)


  • Please log in to reply
7 replies to this topic

#1 yopah

  • New Member
  • 2 posts

0
Neutral

Posted 10 May 2019 - 14:16

I've been searching around for a smoother way to crosscompile Oscam so that it runs on the latest OpenPLi, in particular for my STB (which is a Vu+ Zero 4K). I have done this in the past for an entirely different mipsel receiver. Being completely honest, I don't really have my Vu Zero 4k yet (it's still shipping), so all my assumptions about the toolkit are made by manually inspecting the latest release zips.

 

I have tried cloning the Oscam repo, properly configured it (barebones without webif or SSL), and used the latest release of stbgcc-6.3 to try to crosscompile. Unlike the toolkit I had used for mipsel, the stbgcc-6.3 does not have headers/stubs for openssl -- which causes the crosscompile to fail (see the output bellow).

 

There are a few crude ways to work-around this (ie., compile my own version of libraries with stbgcc-6.3 and statically link them in the binary), however I would like to humbly ask what is the proper way to crosscompile Oscam so that it runs on latest OpenPLi.

user@host:/home/build/oscam-vu$ make CROSS=/home/build/stbgcc-6.3-1.6/bin/arm-linux-gnueabihf- CC_OPTS="-mcpu=cortex-a15 -O2"
+-------------------------------------------------------------------------------
| OSCam ver: 1.20_svn rev: 11518 target: arm-linux-gnueabihf
| Tools:
|  CROSS    = /home/build/stbgcc-6.3-1.6/bin/arm-linux-gnueabihf-
|  CC       = /home/build/stbgcc-6.3-1.6/bin/arm-linux-gnueabihf-gcc
| Settings:
|  CONF_DIR = /usr/local/etc
|  CC_OPTS  = -mcpu=cortex-a15 -O2
|  CC_WARN  = -W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition
|  CFLAGS   =
|  LDFLAGS  = -Wl,--gc-sections
|  LIBS     = -lm -lpthread -ldl
|  UseFlags =
| Config:
|  Addons   : HAVE_DVBAPI IRDETO_GUESSING
|  Protocols: CCCAM
|  Readers  : NAGRA NAGRA_MERLIN IRDETO CONAX CRYPTOWORKS SECA VIACCESS VIDEOGUARD
|  CardRdrs : INTERNAL
|  Compiler : arm-linux-gnueabihf-gcc (crosstool-NG ) 6.3.0
|  Config   : build/arm-linux-gnueabihf/config.mak
|  Binary   : Distribution/oscam-1.20_svn11518-arm-linux-gnueabihf
+-------------------------------------------------------------------------------
CC      cscrypt/aes.c
CC      cscrypt/bn_add.c
CC      cscrypt/bn_asm.c
CC      cscrypt/bn_ctx.c
CC      cscrypt/bn_div.c
CC      cscrypt/bn_exp.c
CC      cscrypt/bn_lib.c
CC      cscrypt/bn_mul.c
CC      cscrypt/bn_print.c
CC      cscrypt/bn_shift.c
CC      cscrypt/bn_sqr.c
CC      cscrypt/bn_word.c
CC      cscrypt/mem.c
CC      cscrypt/des.c
CC      cscrypt/i_cbc.c
CC      cscrypt/i_ecb.c
CC      cscrypt/i_skey.c
CC      cscrypt/md5.c
CC      cscrypt/rc6.c
CC      cscrypt/sha1.c
CC      cscrypt/mdc2.c
In file included from cscrypt/mdc2.c:3:0:
cscrypt/mdc2.h:62:25: fatal error: openssl/des.h: No such file or directory
 #include <openssl/des.h>
                         ^
compilation terminated.
make[1]: *** [Makefile:423: build/arm-linux-gnueabihf/cscrypt/mdc2.o] Error 1
make: *** [Makefile:376: all] Error 2



Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #2 WanWizard

  • Forum Moderator
    PLi® Core member
  • 46,376 posts

+751
Excellent

Posted 10 May 2019 - 14:27

Make sure you have a working build environment, clone the OpenPLi OE repo, and do a "MACHINE=vuzero4k bitbake -c build -p enigma2-plugin-softcams-oscam" ? It will produce an openplI specific ipk you can install.

 

( disclaimer, never tried this, but it should work )


Currently in use: VU+Duo 4K (2xFBC S2), Amiko Viper T2C (T2), SAB Alpha Triple HD (S2+T2), Zgemma H3.T2C (T/C), Zgemma H6 (fallback), VU+Zero (fallback)

Many answers to your question can be found in our new and improved wiki.

note: I do not provide support via PM !

 


Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #3 betacentauri

  • PLi® Core member
  • 5,097 posts

+234
Excellent

Posted 10 May 2019 - 14:28

Why not using Oscam from the feed?

One way would be to set up a complete build environment. Will take several GB space and you should have a quite fast PC. Otherwise you need days to compile everything.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #4 betacentauri

  • PLi® Core member
  • 5,097 posts

+234
Excellent

Posted 10 May 2019 - 14:32

Better use this in the build directory
"MACHINE=vuzero4k bitbake enigma2-plugin-softcams-oscam"
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #5 yopah

  • New Member
  • 2 posts

0
Neutral

Posted 10 May 2019 - 14:52

Thank you for your time @WanWizard and @betacentauri.

My motivation is to always have the latest fixes in the Oscam code, without having to bother OpenPLi maintainers to update the plugin for minor changes (that may not be that useful for everyone). I totally understand your argument, why make a "clandestine" binary if a totally free and open way exists to contribute to maintaining the OpenPLi distribution... to which my honest answer is laziness and taking the shortest path to my goals.

 

I was kind of avoiding having to clone the whole OpenPLi build environment just to change the binary in one of the plugins, but it does make sense that this is the smoother way to do it (ie., to use the right shared libraries).

Thank you both very much for the "MACHINE=vuzero4k bitbake enigma2-plugin-softcams-oscam" tip, I may try it later if I build the courage to go that route.

 

PS: I am not running any of the latest OpenPLi releases, so I really don't know just how up to date the plugin is... simply got used to build to my aging (and unofficial) OpenPli STB, and I kind of liked having that option.


Edited by yopah, 10 May 2019 - 14:52.


Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #6 betacentauri

  • PLi® Core member
  • 5,097 posts

+234
Excellent

Posted 10 May 2019 - 15:50

If you e.g. are still using OpenPLi 4 and build the binary with latest build environment (develop branch), the resulting binary won’t most probably not work as latest version eg needs other OpenSSL versions as you have installed.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #7 Pr2

  • PLi® Contributor
  • 3,365 posts

+146
Excellent

Posted 11 May 2019 - 21:08

You don't need to have a full OpenPLi build environment to build OScam.

There is a script develop to help people compile OScam on there own called Simplebuild, there are thread about it on streamboard. All you need is a running Linux distribution.


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: Crosscompiling Oscam for OpenPLi (Vu Zero 4k/ARM) #8 fairbird

  • Senior Member
  • 404 posts

+17
Neutral

Posted 11 May 2019 - 21:15

You need to Download and Install OpenSSl

 

read here

How to install openssl/libcrypto

and

How to install libusb

http://www.streamboa.../crosscompiling


DM500s
DM800

DM800se

DM920UHD





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users