Skip to main content

Linux port?

7 replies [Last post]
csweeney
Offline
Joined: 2009-04-11
Points: 0

(Question from webinar and training session).

A Linux port does exist - CableLabs uses it internally for testing and debugging.
However, certain parts of the port are not licensed for open source distribution.
There is a chance that will change. CableLabs can make no commitment.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jim007
Offline
Joined: 2009-11-23
Points: 0

I have some doubts regarding the mpe apis and mpeos apis, when we port ri stack into host specific(STB)

*****is MPE apis same as HAL(Hardware Abstraction Layer) and is there a need for separate HAL when we port Ri on linux based STB
****is mpeos apis same as OSAL(Operating system Abstraction Layer), is there a need of separate OSAl when we already have Mpeos apis ,,

The above questions is come out when am trying to port OCAP Ri on STlinux based STB

Thanks in advance

swati_V
Offline
Joined: 2012-07-09
Points: 0

hi jim,
i need your help in porting ocap ri on linux. i have hackberry board with linux on it..
i am very new to this project and going step by step. i have downloaded full source
code from cablelabs site. nw i want to port ocap onto linux.
please help me in this.. how can i do this porting? from where i should start? please guide me in this..

amirn
Offline
Joined: 2009-05-06
Points: 0

MPE is really the platform independent layer. You should not have to change it, unless you are adding new functionality or fixing a bug.
MPE APIs do not call into platform specific APIs.

However MPE APis will call into MPEOS APIs or are directly translated to MPEOS call (via a marco). For example mpe_mediaDecode is really mpeos_mediaDecode.

So the MPEOS layer is the one you need to provide a platform specific implementation for. Again, with the example above, mpeos_mediaDecode is your platform specific implementation for mpe_mediaDecode.

The reason for separating MPE from MPEOS is that in some cases, the implementation can be made into a generic form. For example SI table parsing or Object Carousel. These are available to you in OCAP-RI and can be used for any platform.

With that in mind. If you have access to a HAL, that is what you will use to implement most of MPEOS APIs.
For MPEOS APIs such as threads, mutex, time, socket, file system (see RI_Linux or RI_Win32).. you can either use Posix Linux calls or your own OSAL.

ronpressman
Offline
Joined: 2009-11-09
Points: 0

Hi,

I need to do a port of OCAP-RI onto a linux based setTop box.

I have gone through a VID-OCAP-PG.pdf available in the trunk.
This is specific, using vidiom SDK and porting kit,

Is there other way, where we can port the RI without using vidiom's SDK. or porting kit.
I mean without using vidiom stuff,how do I go about doing a port?

What things I need to rewrite to do a port?.
The SDK is specific to for each box,where and how do I get it/whom to contact?

any inputs will be of great help.

thanks

amirn
Offline
Joined: 2009-05-06
Points: 0

Hi,

The VID-OCAP-PG document is outdated and sometimes contains errors.
You could use it to scope out porting effort and as an introduction to the porting layer APIs
But not as a technical base for your port.

Note also that the Vidiom SDK and ClientSimulator platform is no longer part of the OCAP-RI distribution. The only available platform is the RI Emulator platform (which is ported to a PC). It is now available either on Linux or Windows.

If you want to start a port of the OCAP-RI stack on a vendor specific platform, you will need:

1. An SDK or a set of drivers from that vendor
2. A toolchain to build the ocap-ri porting layer on that platorm (e.g, Linux, MIPS, Intel compilers/linker).
3. You will need to update the OCAP-RI build system, so you can create an executable for that platform/os.

To add a new target to the ocap-ri build, you will need to provide target specific defintions and build rules.
These are usually defined in OCAP-1.0/target. For example "CableLabs/simulator/Linux/debug" is where the build rules are defined for the Linux RI-Emulator build.

The output for that target is then created in OCAP-1.0/bin/CableLabs/silulator/Linux/debug.

The target is set with an environment variable (OCAPTC) that you can define as bellow:
/
//

Regarding the porting layer. I think some documents are available in the CableLabs java.net site for the ocap-ri project.

The OCAP-RI has a typical stack architecture. From top to bottom, you have JAVA/JNI/Native Code

The Native Code layer has 2 parts: a platform independent layer (MPE) and a porting layer (MPEOS).

The MPEOS is the layer you will need to modify port the stack to your platform.
The mpeos code usually resides in OCAP-1.0/mpe/os/
For the RI-Platform you can find the code in OCAP-1.0/mpe/os/RI_Common and OCAP-1.0/mpe/os/RI_Win32 or OCAP-1.0/mpe/os/RI_Linux

There are essentially 3 categories of APIs:
1. Core system APIs (thread, time, sync, mutex,..)
2. TV centric APIs (media, section filtering, graphics).
3. Devices specific APIs (Display, POD/CableCard, Storage)

If you use a Linux based set-top, you may be able tgo re-use the RI_Linux implementation for the core APIs (assuming you have posix enabled kernel on you set-top).
Foir all the other APIs, you will have to rely on the vendor specific SDK or drivers.

rocky_peter
Offline
Joined: 2010-04-13
Points: 0

Hi

Thanks for your info.

As you mention, "you can able to find some documents for porting in the cablelabs java.net site" but i didnt find any porting documents on this site except VID-OCAP-PG.pdf.

please help me to develop the Knowledge on porting the OCAP.

Regards

A .Peter Jerald

greg80303
Offline
Joined: 2008-07-03
Points: 0

Unfortunately, the document you refer is the only real documentation for porting teams at this time -- and that document is severely out-of-date as it was inherited from an older project.

Your only real resource for porting is the existing RI Platform port itself. See the implementation files in $OCAPROOT/mpe/os/RI_Common and in either $OCAPROOT/mpe/os/RI_Win32 or $OCAPROOT/mpe/os/RI_Linux

Greg