Jump to content


Photo

Oscam build in pli4 now also ok without using cmake.


  • Please log in to reply
3 replies to this topic

#1 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 26 May 2014 - 12:04

This is ter info for all persons who build their own pli4 image or perhaps ussefull for those who are developping image based on pli.

 

Those who build are I guess all aware that oscam can be compiled with using make or cmake. In the very beginning it was only possible using cmake. Then some persons added make... configure possibility. Later on some persons improved it all but at the end wanted to remove cmake (while it was only documented for and with cmake).

It's a whole saga on this story.

 

The way how to configure when not using cmake has been documented now since about 2 years , but divers from the general standard using  ./configure(not avbl by oscam) followed by make . That's why in a bb enviroment it did not worked out.

 

I now found the way how to compile oscam binary whitout using cmake in a project like pli4.

 

Here an example for the bitbake file binary only build ...

 

DESCRIPTION = "Oscam binary, freshly compiled"
LICENSE = "GPLv3"
SRCREV ?= "${AUTOREV}"
MODULE = "trunk"
PV = "svn${SRCPV}"
PR = "r3"

DEPENDS = "libusb1 openssl"
RDEPENDS_${PN} = "openssl"
RPROVIDES_${PN} = "oscamcvr"

EXTRA_OEMAKE = "CROSS=${TMPDIR}/sysroots/${BUILD_ARCH}-linux/usr/bin/mips32el-oe-linux/mipsel-oe-linux- \
OSCAM_BIN=Distribution/oscampli4 USE_SSL=1 USE_LIBUSB=1 LIBUSB_LIB=${TMPDIR}/sysroots/${MACHINE}/lib/libusb-1.0.a"

INHIBIT_PACKAGE_STRIP = "1"

SVNDIR = "${DL_DIR}/svn/cvroscam"
SRC_URI = "svn://streamboard.tv/svn/oscam;module=trunk;protocol=http;scmdata=keep"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

S = "${WORKDIR}/${MODULE}"

PACKAGES = "${PN} enigma2-plugin-softcams-oscamcvr-utils-list-smargo"
FILES_${PN} = "/usr/bin/oscamcvr"
FILES_enigma2-plugin-softcams-oscamcvr-utils-list-smargo = "/usr/bin/list_smargo"



do_install () {
    install -d ${D}/usr/bin
    install -m 0755 ${S}/Distribution/oscampli4 ${D}/usr/bin/oscamcvr
    install -m 0755 ${S}/Distribution/list_smargo* ${D}/usr/bin/list_smargo
}

this I put it in a file called for example oscamcvr.bb

 

It will build the oscam binary for mipsel32 . standard oscam configs with libusb static ssl dynamic included. It will also build the list_smargo utility in a separate ipk file.



Re: Oscam build in pli4 now also ok without using cmake. #2 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 29 May 2014 - 21:16

here the oscamcvr.bb file for oscam binary with_ssl Libusb static . Also the list_smargo utility. Slightly modified

 

Tested and works on vuduo2 and dm8000

 

DESCRIPTION = "Oscam binary, freshly compiled"
LICENSE = "GPLv3"
SRCREV ?= "${AUTOREV}"
MODULE = "trunk"
PV = "svn${SRCPV}"
PR = "r5"

DEPENDS = "libusb1 openssl"
RDEPENDS_${PN} = "openssl"
RPROVIDES_${PN} = "oscamcvr"

INHIBIT_PACKAGE_STRIP = "1"

S = "${WORKDIR}/${MODULE}"

SVNDIR = "${DL_DIR}/svn/cvroscam"
SRC_URI = "svn://streamboard.tv/svn/oscam;module=trunk;protocol=http;scmdata=keep"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

do_compile_prepend () {
	${S}/config.sh --restore --enable WITH_SSL
}

EXTRA_OEMAKE = "CROSS=${TMPDIR}/sysroots/${BUILD_SYS}/usr/bin/${DEFAULTTUNE}-oe-${TARGET_OS}/${TARGET_SYS}- \
OSCAM_BIN=Distribution/oscampli4 USE_LIBUSB=1 LIBUSB_LIB='${TMPDIR}/sysroots/${MACHINE}/lib/libusb-1.0.a -lrt' \
CONF_DIR=/etc/tuxbox/config"

do_install () {
	install -d ${D}/usr/bin
	install -m 0755 ${S}/Distribution/oscampli4 ${D}/usr/bin/oscamcvr
	install -m 0755 ${S}/Distribution/list_smargo* ${D}/usr/bin/list_smargo
}

PACKAGES = "${PN} enigma2-plugin-softcams-oscamcvr-utils-list-smargo"
FILES_${PN} = "/usr/bin/oscamcvr"
FILES_enigma2-plugin-softcams-oscamcvr-utils-list-smargo = "/usr/bin/list_smargo"

If someone has a better option for this oe-extramake rule CROSS=${TMPDIR}/sysroots/${BUILD_SYS}/usr/bin/${DEFAULTTUNE}-oe-${TARGET_OS}/${TARGET_SYS}- You're welcome.



Re: Oscam build in pli4 now also ok without using cmake. #3 radxnl

  • Senior Member
  • 1,527 posts

+57
Good

Posted 29 May 2014 - 21:42

here you go, 2 improvements:

EXTRA_OEMAKE = "CROSS=${TARGET_PREFIX} \
OSCAM_BIN=Distribution/oscampli4 USE_LIBUSB=1 LIBUSB_LIB='${STAGING_DIR_TARGET}/lib/libusb-1.0.a -lrt' \

 



Re: Oscam build in pli4 now also ok without using cmake. #4 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 May 2014 - 08:47

thanks radxnl I could not find these two bitbake vars. This work's good.

 

I also find out another possible error , that's poisening off target include headers with that off base system include headers . Will not always occur and mostly it does not mather since they are equal in most cases.

This can be avoided to occur by just adding.

 

includedir="${STAGING_DIR_TARGET}/usr/include"
oldincludedir="${STAGING_DIR_TARGET}/usr/include"

This means that the bb file for the build off oscam binary : complete standard configs see the config.sh --restore. Then just added extra ssl --enable WITH-SSL  since this is a non standard extra.

Also added libusb and this static. That's done with use flags. The cor

DESCRIPTION = "Oscam binary, freshly compiled"
LICENSE = "GPLv3"
SRCREV ?= "${AUTOREV}"
MODULE = "trunk"
PV = "svn${SRCPV}"
PR = "r6"
# includedir added to avoid the possible poisening off target headers by base system headers.
includedir="${STAGING_DIR_TARGET}/usr/include"
oldincludedir="${STAGING_DIR_TARGET}/usr/include"

DEPENDS = "libusb1 openssl"
RDEPENDS_${PN} = "libusb1 openssl"
RPROVIDES_${PN} = "oscamcvr"

INHIBIT_PACKAGE_STRIP = "1"

S = "${WORKDIR}/${MODULE}"

SVNDIR = "${DL_DIR}/svn/cvroscam"
SRC_URI = "svn://streamboard.tv/svn/oscam;module=trunk;protocol=http;scmdata=keep"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

do_compile_prepend () {
	${S}/config.sh --restore --enable WITH_SSL
}

EXTRA_OEMAKE = "CROSS=${TARGET_PREFIX} \
OSCAM_BIN=Distribution/oscampli4 USE_LIBUSB=1 LIBUSB_LIB='${STAGING_DIR_TARGET}/lib/libusb-1.0.a -lrt' \
CONF_DIR=/etc/tuxbox/config"

do_install () {
	install -d ${D}/usr/bin
	install -m 0755 ${S}/Distribution/oscampli4 ${D}/usr/bin/oscamcvr
	install -m 0755 ${S}/Distribution/list_smargo* ${D}/usr/bin/list_smargo
}

PACKAGES = "${PN} enigma2-plugin-softcams-oscamcvr-utils-list-smargo"
FILES_${PN} = "/usr/bin/oscamcvr"
FILES_enigma2-plugin-softcams-oscamcvr-utils-list-smargo = "/usr/bin/list_smargo"

 

rect bb file is then :




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users