[yocto] Porting a middleware to Yocto

Khem Raj raj.khem at gmail.com
Tue Apr 11 09:31:34 PDT 2017


On Mon, Apr 10, 2017 at 11:20 PM, Eswaran Vinothkumar (BEG/PJ-IOT-EL)
<Vinothkumar.Eswaran at de.bosch.com> wrote:
> Hallo,
>
>
>
> For our new project we are planning to use Yocto as a build system to build
> customized Linux distribution. I have already created a BSP for our
> customized hardware with Linux kernel, U-boot and UBIFS rootfs image.
>
>
>
> We are internally using a middleware which acts as an abstraction to
> underlying operating system and provides APIs to application layers. Now the
> task is to port the middleware to Yocto. The middleware contains lot of make
> files and folders which are interdependent and I am at lost on how to start.
>
> I have some 20 directories which contains makefiles and autotool
> configure.ac files to generate lib files.
>
>
>
> As of now I have planned to create a new Yocto layer called meta-middleware
> and a recipe file for individual folders. I then create a package group
> which will include all these recipes and can include this package group as
> dependency in the recipes of meta-application layer. I am facing a problem
> like I have to include headers from other recipes. In this case to include
> the headers , is it enough to add “DEPENDS = recipename” ?
>
> I know my question is relatively vague, but anybody who ported middleware
> from another build systems like ptxdist would have faced similar issues. Any
> input on how you planned to port these source files to Yocto would be
> helpful.
>

This is a common usecase I have faced multiple times, where people are
coming from monolithic build systems. So
task 1:
segregate this monolith into components which have their own life or
you can treat the whole monolith as one component. Choice is yours.

task 2: if you want to componentize it then choose a component build
system e.g. autoconf, cmake or if nothing just plain make and convert
your components to be able to ask for external dependencies for other
components without needing to cross reference them. E.g. let it expect
a given lib or header is coming from standard sysroot

Task3: Let a component be able to generate .so or binaries using its
own component build system. It should also be able to stage the
headers and libs for APIs its exposing for other components to
interact with it.

Task4: Write recipes and express the dependencies as you might have
then well known by now.

Task5: Write logical package groups

Task6: Expose the middleware via SDKs for application developers.

>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
> Vinothkumar Eswaran
> BEG-PT/PJ-IOT1
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list