Hi Evade,

The main purpose of Yocto ADT is for setting up a development environment on 
your host which allows you to cross develop applications for your target.  And 
there're two key components help you to achieve this: cross-toolchain and 
sysroot. That's why the sysroot provides you a collection of target libs and 
all the main focus of ADT manual is for how to customize your sysroot to meet 
your special development needs.

Seems you're more interested in generate a SDK for host?

Thanks,
Jessica

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Evade Flow
Sent: Tuesday, October 09, 2012 3:11 PM
To: [email protected]
Subject: [yocto] Control which host components are included in ADT output?

I have a question about the ADT and how it selects host SDK components.
If I type:

% bitbake meta-toolchain-sdk

I wind up getting hundreds of target libs when I extract the generated
tarball:

% pwd
/opt/poky/1.2.1/sysroots
% ls armv5te-poky-linux-gnueabi/usr/lib | wc -l
696

but a relatively small number of host libs:

% ls i686-pokysdk-linux/usr/lib | wc -l
53

Is this normal? Taking libxml2 as an example:

% ls -1 armv5te-poky-linux-gnueabi/usr/lib/libxml*
armv5te-poky-linux-gnueabi/usr/lib/libxml2.la
armv5te-poky-linux-gnueabi/usr/lib/libxml2.so
armv5te-poky-linux-gnueabi/usr/lib/libxml2.so.2
armv5te-poky-linux-gnueabi/usr/lib/libxml2.so.2.7.8
% ls -1 i686-pokysdk-linux/usr/lib/libxml*
zsh: no matches found: i686-pokysdk-linux/usr/lib/libxml*

It seems desirable to have libxml2 be part of the SDK I give to my development 
team. We have a lot of test applications that can be run on the host, and I 
don't like the thought of somebody wasting time chasing a bug that turns out to 
be due to the fact that he is linking against a different (system-installed) 
version of libxml2 rather than the target version.

Skimming the ADT manual, this section seems to hint at a solution:

 - 
http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html#adt-package

But I can't quite follow all the steps. :-% It says (using libglade as an 
example):

  First, you should generate the ipk file for the libglade package and
  add it into a working opkg repository. Use these commands:

    $ bitbake libglade
    $ bitbake package-index


Being totally new to opkg, this lost me. What does the 'package-index'
target actually do?  Does bitbake "add it [libglade] into a working opkg 
repository" for me, or am I supposed to take the output of the command and do 
something with it? I had a look in these two locations for 'package-index' and 
came up empty:

 - http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html
 - http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html

What's the best place to look for these kinds of references when I get stuck on 
something?

The ADT docs go on to say:

  Next, source the environment setup script found in the Yocto Project
  files. Follow that by setting up the installation destination to point
  to your sysroot as <sysroot_dir>. Finally, have an OPKG configuration
  file <conf_file> that corresponds to the opkg repository you have just
  created.

     $ opkg-cl -f <conf_file> -o <sysroot_dir> update
     $ opkg-cl -f <cconf_file> -o <sysroot_dir> \
        --force-overwrite install libglade
     $ opkg-cl -f <cconf_file> -o <sysroot_dir> \
        --force-overwrite install libglade-dbg
     $ opkg-cl -f <conf_file> -o <sysroot_dir> \
        --force-overwrite install libglade-dev

<sysroot_dir> I understand, but what is <conf_file>? Did bitbake generate this 
for me? Am I supposed to create one by hand? Where? These instructions are a 
little hard to follow due to the use of placeholders rather than concrete 
arguments. I think a complete, explicit example would help a lot here.

Also, it seems likely that the above commands would only install a libglade 
compiled for the target? How would I generate a libglade for the host?

Another question is: is there a way to tune the ADT tarball to be a better fit 
for my needs so that I don't need to add so many packages by hand 
after-the-fact?

Any advice much appreciated, thanks!
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to