[yocto] Explicitly Adding Common Packages (ie Java) and Creating Users

Andy Gikling agikling at lasx.com
Sun Mar 25 18:05:02 PDT 2012


All,

First time submitter here.  Overall, I feel that the Yocto documentation has gotten me extremely far very quickly.  I'm working on a Sugarbay image that successfully boots my Sandybridge Mini-ITX computer!  The first image I made even supported my Ethernet adaptor out of the box!

Very cool.  Thank you to all the contributors - this project is really sweet!

I'd like to ask two specific questions:

Question 1:
The ADT manual instructs you to install the Target Management (RSE) framework into Eclipse.  Presumably, one would want to use these tools to do remote debugging on their Yocto target.  Unfortunately, the primary vehicle to doing streamlined remote debugging with Target Management is to run the rseserver and this requires java.  Many of Yocto's base images don't come with java support (for example core-image-minimal).  So I set out to figure out how to add this into my project.  Makes sense right?

I was never able build an image that contains the meta-oracle-master layer using the config files only.  (The documentation on how to do this is sparse.  Even the readme file in the layer's download is a one-liner on how to use it... why?)  I was able to get an image to build using hob though.  When I boot the image I have two new folders now; "/usr/java/" and "/usr/jdk1.7.0_02/" both of which contain a "/bin" folder with "java" in it.

The problem is I can't seem to execute any of them what-so-ever.  I just need to be able to call "java -version" and I just can't get er' to go no matter what I do!

I've tried adding various locations to my $PATH and I've also tried navigating to the folder directly and calling "./java" to no avail.  What folder should I expect my java executable to be in?  Why can't I use it?  The jdk is clearly there - I must be missing something very obvious.

There really should be some documentation on this because Java is so common as it's a requirement for the tools suggested in the ADT manual.  Documentation on this topic would fit really well with other common first-timer question of "How do I explicitly add a package to my Yocto image, such as OpenSSH, GDB, or Java?"

The brief sections about this topic in the official guides are not very clear to me.  It seems like explicitly adding a custom package might even fit in the quick start guide.

Question 2:
I was able to get the OpenSSH package added to my Yocto build using hob (when I can't get things to work by editing the .conf files I try hob and it feels like cheating... but it seems to work much better for me.)  All I want to do now is set it up but I can't make new users!

The default Yocto login account on my target is "root" but I can't call "useradd andy" because useradd is not included in my core-image-minimal build.  This makes configuring sshd quite a bit harder.

Any ideas?  Is there a way to add user accounts at build time or do I have to add the "useradd" package?

Once I understand some of these issues better I'm going to make a sweet video for beginners.  There are really a lot of pitfalls that I've hurdled and I wish I could share them with everyone. But, I've got to get my feet under me first.

Thanks for your time!

~Andy Gikling
Electrical Engineer
LasX Industries Inc.
agikling at lasx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20120325/d43af071/attachment.html>


More information about the yocto mailing list