All of lore.kernel.org
 help / color / mirror / Atom feed
* Third Party Components Integration in Yocto
@ 2014-05-06 14:57 Meenakumari Shedole
  2014-05-06 15:46 ` Alex J Lennon
  0 siblings, 1 reply; 7+ messages in thread
From: Meenakumari Shedole @ 2014-05-06 14:57 UTC (permalink / raw)
  To: yocto, Beauchesne, Gwenole

[-- Attachment #1: Type: text/html, Size: 5053 bytes --]

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

* Re: Third Party Components Integration in Yocto
  2014-05-06 14:57 Third Party Components Integration in Yocto Meenakumari Shedole
@ 2014-05-06 15:46 ` Alex J Lennon
  2014-05-08 10:05   ` Meenakumari Shedole
  0 siblings, 1 reply; 7+ messages in thread
From: Alex J Lennon @ 2014-05-06 15:46 UTC (permalink / raw)
  To: Meenakumari Shedole, yocto, Beauchesne, Gwenole

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


On 06/05/2014 15:57, Meenakumari Shedole wrote:
> Hi,
>
> To add 3rd party components in yocto we created bb file and modified
> local.conf file.
> After a yocto build, 3rd party component executing the binaries and
> rpm packages but executed binaries are not loading inside the rpm
> packages, rpm package is empty.
>
> Used below function in bb file. 
> do_install () {
> install -d ${D}${bindir}
> install -m 0755 bb-example ${D}${bindir}
> }
>

Hi Meena,

That seems a little odd as files in ${bindir} should be packaged into
the default output package as I understand it

ref: http://www.embeddedlinux.org.cn/OEManual/recipes_packages.html

If it were successfully installed but not packaged for any reason (e.g.
in this case not a part of FILES_${PN}) then you should see a warning
about an installed-vs-packaged file issue.

If you enter a devshell with bitbake -c devshell recipe-foo then do you
see the installed bb-example file in within ../image/ tree?

Have you also tried looking (from the devshell) in
../temp/log.do_install, ../temp/log.do_xxx to see what is happening?

Cheers,

Alex

> can anyone please suggest me how to move further.
>
> Regards
> Meena
>
>
>
> ::DISCLAIMER::
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any
> liability on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of
> the author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction,
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior
> written consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error
> please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for
> viruses and other defects.
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>

-- 

Dynamic Devices Ltd <http://www.dynamicdevices.co.uk/>

Alex J Lennon / Director
1 Queensway, Liverpool L22 4RA

mobile: +44 (0)7956 668178

Linkedin <http://www.linkedin.com/in/alexjlennon> Skype
<skype:alexjlennon?add>

This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended
recipient(s). Any unauthorized disclosure, dissemination, distribution,
copying or the taking of any action in reliance on the information
herein is prohibited. E-mails are not secure and cannot be guaranteed to
be error free as they can be intercepted, amended, or contain viruses.
Anyone who communicates with us by e-mail is deemed to have accepted
these risks. Company Name is not responsible for errors or omissions in
this message and denies any responsibility for any damage arising from
the use of e-mail. Any opinion and other statement contained in this
message and any attachment are solely those of the author and do not
necessarily represent those of the company.


[-- Attachment #2.1: Type: text/html, Size: 10242 bytes --]

[-- Attachment #2.2: ddlogo-4.png --]
[-- Type: image/png, Size: 3997 bytes --]

[-- Attachment #2.3: linkedin.png --]
[-- Type: image/png, Size: 631 bytes --]

[-- Attachment #2.4: skype.png --]
[-- Type: image/png, Size: 800 bytes --]

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

* Re: Third Party Components Integration in Yocto
  2014-05-06 15:46 ` Alex J Lennon
@ 2014-05-08 10:05   ` Meenakumari Shedole
  2014-05-08 10:22     ` Alex J Lennon
  0 siblings, 1 reply; 7+ messages in thread
From: Meenakumari Shedole @ 2014-05-08 10:05 UTC (permalink / raw)
  To: Alex J Lennon, yocto


[-- Attachment #1.1: Type: text/plain, Size: 4398 bytes --]

Thanks Alex,

Yes I installed  FILES_${PN} all package folders are creating
Tried devshell  but there is no installed bb-example in image/usr/include/...empty include folder. Bb-example is not loading inside image/......
Analysed  log_devshell , log_package, do_install, do_make.

Even I compared with other recipes folder structures  it is going right direction but only the binaries are not loading.

I guess I missed something in do_install ? no proper path?
After do_compile and make, at  do_install binaries are not able to load.


Regards
Meena

From: Alex J Lennon [mailto:ajlennon@dynamicdevices.co.uk]
Sent: Tuesday, May 06, 2014 9:17 PM
To: Meenakumari Shedole; yocto@yoctoproject.org; Beauchesne, Gwenole
Subject: Re: [yocto] Third Party Components Integration in Yocto


On 06/05/2014 15:57, Meenakumari Shedole wrote:
Hi,

To add 3rd party components in yocto we created bb file and modified local.conf file.
After a yocto build, 3rd party component executing the binaries and rpm packages but executed binaries are not loading inside the rpm packages, rpm package is empty.

Used below function in bb file.

do_install () {

  install -d ${D}${bindir}

  install -m 0755 bb-example ${D}${bindir}

}


Hi Meena,

That seems a little odd as files in ${bindir} should be packaged into the default output package as I understand it

ref: http://www.embeddedlinux.org.cn/OEManual/recipes_packages.html

If it were successfully installed but not packaged for any reason (e.g. in this case not a part of FILES_${PN}) then you should see a warning about an installed-vs-packaged file issue.

If you enter a devshell with bitbake -c devshell recipe-foo then do you see the installed bb-example file in within ../image/ tree?

Have you also tried looking (from the devshell) in ../temp/log.do_install, ../temp/log.do_xxx to see what is happening?

Cheers,

Alex


can anyone please suggest me how to move further.

Regards
Meena


::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.
----------------------------------------------------------------------------------------------------------------------------------------------------



--

[Dynamic Devices Ltd]<http://www.dynamicdevices.co.uk/>

Alex J Lennon / Director
1 Queensway, Liverpool L22 4RA

mobile: +44 (0)7956 668178

[Linkedin]<http://www.linkedin.com/in/alexjlennon>[Skype]<skype:alexjlennon?add>

This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Company Name is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.

[-- Attachment #1.2: Type: text/html, Size: 18236 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 3997 bytes --]

[-- Attachment #3: image002.png --]
[-- Type: image/png, Size: 631 bytes --]

[-- Attachment #4: image003.png --]
[-- Type: image/png, Size: 800 bytes --]

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

* Re: Third Party Components Integration in Yocto
  2014-05-08 10:05   ` Meenakumari Shedole
@ 2014-05-08 10:22     ` Alex J Lennon
  2014-05-09  5:56       ` Meenakumari Shedole
  0 siblings, 1 reply; 7+ messages in thread
From: Alex J Lennon @ 2014-05-08 10:22 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: yocto

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

Hi Meena,

On 08/05/2014 11:05, Meenakumari Shedole wrote:
>
> Thanks Alex,
>
>  
>
> Yes I installed  FILES_${PN} all package folders are creating
>
> Tried devshell  but there is no installed bb-example in
> image/usr/include/...empty include folder. Bb-example is not loading
> inside image/......
>
> Analysed  log_devshell , log_package, do_install, do_make.
>

OK so that's helpful. I have had similar problems myself with files that
don't get installed and thus aren't packaged. In my experience it is
usually to do with the path to the source file one is trying to install.

i.e. So for some reason the bb-example file isn't where it should be to
be copied across to the target folder in the image tree.

Where does bb-example come from? Can you share the whole recipe? Can you
see it where you think it should be in the devshell folder or the folder
above?

If you included bb-example as a file:// entry added to SRC_URI then it
will be copied across to the working directory ${WORKDIR}

You might want to try something like

  install -m 0755 ${WORKDIR}/bb-example ${D}${bindir}

Alternatively if bb-example is output from a build process then it will
be in the source directory ${S}

In which case try

  install -m 0755 ${S}/bb-example ${D}${bindir}
 
Hope this helps!

Alex

>  
>
> Even I compared with other recipes folder structures  it is going
> right direction but only the binaries are not loading.
>
>  
>
> I guess I missed something in do_install ? no proper path?
>
> After do_compile and make, at  do_install binaries are not able to load.
>
>  
>
>  
>
> Regards
>
> Meena
>
>  
>
> *From:*Alex J Lennon [mailto:ajlennon@dynamicdevices.co.uk]
> *Sent:* Tuesday, May 06, 2014 9:17 PM
> *To:* Meenakumari Shedole; yocto@yoctoproject.org; Beauchesne, Gwenole
> *Subject:* Re: [yocto] Third Party Components Integration in Yocto
>
>  
>
>  
>
> On 06/05/2014 15:57, Meenakumari Shedole wrote:
>
>     Hi,
>
>      
>
>     To add 3rd party components in yocto we created bb file and
>     modified local.conf file.
>
>     After a yocto build, 3rd party component executing the binaries
>     and rpm packages but executed binaries are not loading inside the
>     rpm packages, rpm package is empty.
>
>      
>
>     Used below function in bb file. 
>
>     *do_install* () {
>
>       install *-*d *$*{D}${bindir}
>
>       install *-*m 0755 bb*-*example *$*{D}${bindir}
>
>     }
>
>      
>
>
> Hi Meena,
>
> That seems a little odd as files in ${bindir} should be packaged into
> the default output package as I understand it
>
> ref: http://www.embeddedlinux.org.cn/OEManual/recipes_packages.html
>
> If it were successfully installed but not packaged for any reason
> (e.g. in this case not a part of FILES_${PN}) then you should see a
> warning about an installed-vs-packaged file issue.
>
> If you enter a devshell with bitbake -c devshell recipe-foo then do
> you see the installed bb-example file in within ../image/ tree?
>
> Have you also tried looking (from the devshell) in
> ../temp/log.do_install, ../temp/log.do_xxx to see what is happening?
>
> Cheers,
>
> Alex
>
>
> can anyone please suggest me how to move further.
>
>  
>
> Regards
>
> Meena
>
>
>
> ::DISCLAIMER::
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any
> liability on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of
> the author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction,
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior
> written consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error
> please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for
> viruses and other defects.
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>


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

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

* Re: Third Party Components Integration in Yocto
  2014-05-08 10:22     ` Alex J Lennon
@ 2014-05-09  5:56       ` Meenakumari Shedole
  2014-05-09  9:11         ` Burton, Ross
  2014-05-09 11:51         ` Alex J Lennon
  0 siblings, 2 replies; 7+ messages in thread
From: Meenakumari Shedole @ 2014-05-09  5:56 UTC (permalink / raw)
  To: Alex J Lennon; +Cc: yocto

[-- Attachment #1: Type: text/html, Size: 17805 bytes --]

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

* Re: Third Party Components Integration in Yocto
  2014-05-09  5:56       ` Meenakumari Shedole
@ 2014-05-09  9:11         ` Burton, Ross
  2014-05-09 11:51         ` Alex J Lennon
  1 sibling, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2014-05-09  9:11 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: yocto

On 9 May 2014 06:56, Meenakumari Shedole <meenakumari.s@hcl.com> wrote:
> install: cannot stat `bb-example': No such file or directory

Your compile task didn't actually work.

Ross


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

* Re: Third Party Components Integration in Yocto
  2014-05-09  5:56       ` Meenakumari Shedole
  2014-05-09  9:11         ` Burton, Ross
@ 2014-05-09 11:51         ` Alex J Lennon
  1 sibling, 0 replies; 7+ messages in thread
From: Alex J Lennon @ 2014-05-09 11:51 UTC (permalink / raw)
  To: Meenakumari Shedole; +Cc: yocto

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


On 09/05/2014 06:56, Meenakumari Shedole wrote:
> Thanks for your response Alex.
>
> I gone with all these steps but not helpful.
>

Hi Meena,

I'm sorry to hear that. I think your installation line is still
incorrect, and should probably be ${S}/bb-example or ${WORKDIR}/bb-example

I'm not sure what is in the source archive you are using
'bb-example.tar.bz2' though, but you're specifying make in your recipe
so I imagine you are attempting to build something? Perhaps that's not
working?

If the compile is failing you should see some errors in the log files we
discussed.

If you upload bb-example.tar.bz2 somewhere for me I will take a look at
it for you.

>       install -m 0755 bb-example ${D}${bindir}

That said, I don't want to overcomplicate things for you, but I'm
assuming you're trying to understand how the build system works so it
might be worth us taking a step back here and looking at some simple
examples that do work to understand the process.

I've commited a very simple autotools based project to git hub here,
https://github.com/DynamicDevices/bbexample

This will build an executable called bbexample with a dependency on a
shared library. It'll print out a couple of Hello World messages.

Building on the host for test
========================

You can check this all works on your build PC - independently of the
Yocto environment - with something like the following:
(Note that I've taken the hyphen out of the name of the executable as it
was causing me trouble with autotools configuration)

git clone  git://github.com/DynamicDevices/bbexample.git
cd bbexample
./autogen.sh
./configure
make

At the end of this process you will have an executable 'bbexample' in
your build directory

If you run it with:

./bbexample

You will see

Hello Yocto World...
Hello World (from a shared library!)

So we know this builds and works on your host.

Building and Packaging from a Git Commit
=====================================

Next we can create a recipe that makes use of this project within Yocto
to cross-compile, package the bbexample executable and the shared
library it depends upon.
   
I've created an example layer, using the yocto-layer command, that
contains a recipe to build the bbexample project.

(a) You can git clone and add this layer to your conf/bblayer.conf file

cd sources
git clone  git://github.com/DynamicDevices/meta-example.git

e.g. in conf/local/conf

BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) +
'/../..')}"

BBLAYERS = " \
  ${BSPDIR}/sources/poky/meta \
  ${BSPDIR}/sources/poky/meta-yocto \
  ...
  ${BSPDIR}/sources/meta-example \
  ...
"

(b) Alternatively if you don't want to do that just grab the recipe text
from github and put it somewhere suitable in your source tree.

https://github.com/DynamicDevices/meta-example/blob/master/recipes-example/bbexample/bbexample_1.0.bb

Next run

bitbake bbexample

This will go through fetching the source, unpacking, configuring,
compiling, installing and packaging

Depending on the machine you are targetting the resulting package will
be somewhere in the tmp/deploy tree

e.g. I am building RPMs for Raspberry Pi here so

tmp/deploy/rpm/arm6_vfp/bbexample-1.0-r0.0.armv6_vfp.rpm

You can do something like this to see where it is

cd tmp/deploy
find -name bbexample*

A quick check of the package contents with

rpm -qlp rpm/armv6_vfp/bbexample-1.0-r0.0.armv6_vfp.rpm

shows the executable and the shared library are packaged as we want them

/usr
/usr/bin
/usr/bin/bbexample
/usr/lib
/usr/lib/libbbexample.so.1
/usr/lib/libbbexample.so.1.0.0

You can then add the recipe to your output image by adding something
like this to your conf/local/conf

IMAGE_INSTALL_append = " bbexample"

Building and Packaging from a remote release tarball
===================================================

Now that's still not quite what you are doing, as you are using a source
tarball instead of a git commit from what I can see

So I've created another two recipes, bbexample-rt and bbexample-lt which
show the process for using a remote tarball, and a local tarball

If you run

bitbake bbexample-rt

Bitbake will pull down the archive from

https://github.com/DynamicDevices/bbexample/archive/bbexample-v1.0.tar.gz

It'll unpack the archive, build, install, package and so forth.

As above you'll see the files in the generated archive, something similar to

rpm -qlp tmp/deploy/rpm/armv6_vfp/bbexample-rt-1.0-r0.2.armv6_vfp.rpm

Note that if you look in the recipe you'll see I am redefining the
source directory to be appropriate for the structure of the downloaded
tarball.

This is _critical_ as otherwise bitbake won't find the files...

# Make sure our source directory (for the build) matches the directory
structure in the tarball
# A tagged tarball from github contains a folder which includes the
github tag, so deal with it here
S = "${WORKDIR}/bbexample-bbexample-v${PV}"

https://github.com/DynamicDevices/meta-example/blob/master/recipes-example/bbexample/bbexample-rt_1.0.bb

You can check if your source directory is set correctly for the tarball
you are trying to build by running bitbake -c devshell recipename
If you drop into a directory that is more or less empty (perhaps apart
from patches) then this is a good indicator ${S} is incorrect. I usually
cd .. up one level and can then usually see another folder which does
contain the correct sources, and it is this folder name you need to set
the source directory to in the recipe with ${S} =
"${WORKDIR}/correctfoldername"

Building and Packaging from a local release tarball
============================================

Lastly we can do the same thing with a local tarball using the
bbexample-lt recipe I've provided. I've put a copy of the tarball we
used in bbexample-rt into the bbexample-1.0 folder in the bbexample
recipe folder. I've also added a search path into the recipe so the
bbexample-lt recipe finds the file there

e.g.

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

So to build this recipe run

bitbake bbexample-lt

(You'll probably get some warnings during these builds as each recipe is
building the same target files and thus overwriting shared files
generated by the other recipes. You can ignore these)

If we look at the resulting package(s) we should see the appropriate files

rpm -qlp tmp/deploy/rpm/armv6_vfp/bbexample-lt-1.0-r0.0.armv6_vfp.rpm

/usr
/usr/bin
/usr/bin/bbexample
/usr/lib
/usr/lib/libbbexample.so.1
/usr/lib/libbbexample.so.1.0.0

...

I hope this helps to provide a bit of background, and perhaps a starting
point for a working build of an example package

Cheers,

Alex



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

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

end of thread, other threads:[~2014-05-09 11:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06 14:57 Third Party Components Integration in Yocto Meenakumari Shedole
2014-05-06 15:46 ` Alex J Lennon
2014-05-08 10:05   ` Meenakumari Shedole
2014-05-08 10:22     ` Alex J Lennon
2014-05-09  5:56       ` Meenakumari Shedole
2014-05-09  9:11         ` Burton, Ross
2014-05-09 11:51         ` Alex J Lennon

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.