All of lore.kernel.org
 help / color / mirror / Atom feed
* Explicitly Adding Common Packages (ie Java) and Creating Users
@ 2012-03-26  1:05 Andy Gikling
  2012-03-28 10:33 ` Paul Eggleton
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Gikling @ 2012-03-26  1:05 UTC (permalink / raw)
  To: yocto

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

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@lasx.com

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

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

* Re: Explicitly Adding Common Packages (ie Java) and Creating Users
  2012-03-26  1:05 Explicitly Adding Common Packages (ie Java) and Creating Users Andy Gikling
@ 2012-03-28 10:33 ` Paul Eggleton
  2012-03-28 17:14   ` Zhang, Jessica
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2012-03-28 10:33 UTC (permalink / raw)
  To: Andy Gikling; +Cc: yocto

Hi Andy,

On Sunday 25 March 2012 21:05:02 Andy Gikling wrote:
> 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?"

I'm afraid I don't know the answer to this, but maybe someone else can help - 
Jessica, Nitin, any ideas on this one?
 
> 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?

We have useradd.bbclass as well as a few recipes that use it as examples; this 
class is typically used from a recipe to add accounts necessary for running 
daemons themselves (e.g. dbus) although in principle it could be used to add 
any account at build time.

If you want to include the useradd utility in the root filesystem, you would 
need to include the "shadow" package, which is easy to do with Hob.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Explicitly Adding Common Packages (ie Java) and Creating Users
  2012-03-28 10:33 ` Paul Eggleton
@ 2012-03-28 17:14   ` Zhang, Jessica
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Jessica @ 2012-03-28 17:14 UTC (permalink / raw)
  To: Paul Eggleton, Andy Gikling; +Cc: yocto

Hi Andy,

Please see my comments below regarding RSE...

Thanks,
Jessica

-----Original Message-----
From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
Sent: Wednesday, March 28, 2012 3:33 AM
To: Andy Gikling
Cc: Zhang, Jessica; Kamble, Nitin A; yocto@yoctoproject.org
Subject: Re: [yocto] Explicitly Adding Common Packages (ie Java) and Creating Users

Hi Andy,

On Sunday 25 March 2012 21:05:02 Andy Gikling wrote:
> 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?"

[JZ]

For using RSE, you don't need java for the target image, but you do need to add tcf-agent which facilitate the remote communication underline RSE, on the host side, the tcf plugin will communicate with the remote tcf-agent for all the related remote interactions.  We have a tcf_agent recipe file which you can use to add it to the image.




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

end of thread, other threads:[~2012-03-28 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-26  1:05 Explicitly Adding Common Packages (ie Java) and Creating Users Andy Gikling
2012-03-28 10:33 ` Paul Eggleton
2012-03-28 17:14   ` Zhang, Jessica

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.