All of lore.kernel.org
 help / color / mirror / Atom feed
* Porting a middleware to Yocto
@ 2017-04-11  6:20 Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  8:34 ` Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eswaran Vinothkumar (BEG/PJ-IOT-EL) @ 2017-04-11  6:20 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

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.


Mit freundlichen Grüßen / Best regards

Vinothkumar Eswaran
BEG-PT/PJ-IOT1


[-- Attachment #2: Type: text/html, Size: 4783 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Porting a middleware to Yocto
  2017-04-11  6:20 Porting a middleware to Yocto Eswaran Vinothkumar (BEG/PJ-IOT-EL)
@ 2017-04-11  8:34 ` Alexander Kanavin
  2017-04-11  8:34 ` Jussi Kukkonen
  2017-04-11 16:31 ` Khem Raj
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2017-04-11  8:34 UTC (permalink / raw)
  To: yocto

On 04/11/2017 09:20 AM, Eswaran Vinothkumar (BEG/PJ-IOT-EL) wrote:
> 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.

Without seeing the source code, it is difficult to provide useful help.

If the 20 different things are all set up through a common autoconf 
configuration file, it's probably best to write one recipe for the whole 
thing, and then split it into sub-packages after it has been built.

How does the configuration/compilation/insallation procedure look like? 
What are the commands you need to type?

Alex



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Porting a middleware to Yocto
  2017-04-11  6:20 Porting a middleware to Yocto Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  8:34 ` Alexander Kanavin
@ 2017-04-11  8:34 ` Jussi Kukkonen
  2017-04-11 16:31 ` Khem Raj
  2 siblings, 0 replies; 4+ messages in thread
From: Jussi Kukkonen @ 2017-04-11  8:34 UTC (permalink / raw)
  To: Eswaran Vinothkumar (BEG/PJ-IOT-EL); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2760 bytes --]

On 11 April 2017 at 09:20, Eswaran Vinothkumar (BEG/PJ-IOT-EL) <
Vinothkumar.Eswaran@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” ?
>

Yes, a DEPENDS should be all that's needed in the normal case. The
assumption is that the recipe you depend on installs the headers and
libraries like it should -- these will then be made available in the
sysroot of the recipe you are compiling (the location and nature of this
sysroot depends on the version of yocto). If your autotools setup is well
behaving the recipes should be fairly straight forward to write.

If you have issues with not finding headers, start by making sure that the
recipe you depend on installs things correctly: see e.g.
$WORKDIR/sysroot-destdir/ to see files that should become available in the
sysroot of a anyone depending on this recipe. If that looks fine, make sure
the depending project is doing something sane to find the headers (like
using pkg-config): see e.g. $WORKDIR/temp/log.do_configure.

Better advice probably requires you to actually show a problem case and
mention the version of Yocto you are using.

HTH,
  Jussi


> 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.
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
> *Vinothkumar Eswaran BEG-PT/PJ-IOT1*
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #2: Type: text/html, Size: 5227 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Porting a middleware to Yocto
  2017-04-11  6:20 Porting a middleware to Yocto Eswaran Vinothkumar (BEG/PJ-IOT-EL)
  2017-04-11  8:34 ` Alexander Kanavin
  2017-04-11  8:34 ` Jussi Kukkonen
@ 2017-04-11 16:31 ` Khem Raj
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2017-04-11 16:31 UTC (permalink / raw)
  To: Eswaran Vinothkumar (BEG/PJ-IOT-EL); +Cc: yocto

On Mon, Apr 10, 2017 at 11:20 PM, Eswaran Vinothkumar (BEG/PJ-IOT-EL)
<Vinothkumar.Eswaran@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@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-11 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11  6:20 Porting a middleware to Yocto Eswaran Vinothkumar (BEG/PJ-IOT-EL)
2017-04-11  8:34 ` Alexander Kanavin
2017-04-11  8:34 ` Jussi Kukkonen
2017-04-11 16:31 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.