[yocto] creating global variables in a recipes

Joshua Immanuel josh at hipro.co.in
Thu Feb 2 23:13:49 PST 2012


Hello Chris,

Thanks for the reply.

On Thu, 2012-02-02 at 08:17 -0700, Chris Larson wrote:
> > My use-case is that I am creating an /etc/fstab file via
> > base-files.bbappend recipe. In that fstab, I use uuid (generated via
> > uuidgen) to denote different partition filesystems. So, I have to
> > use this uuid in the extended image_types.bbclass file to set them
> > to the generated partition images appropriately (via tune2fs).
> >
> > One more approach I can think of is to echo the uuid to some file in
> > the deploy images directory (while creating the fstab file) and read
> > them back in image_types class. But this process looks messy.
> 
> I'd say generate them in the configuration metadata via inline python
> or an anonymous python function, then use those variables both in the
> base-files recipe and images. 

Please bear with my ignorance. What do you mean by "generating them in
configuration metadata"? In which file should I do that?

At present as an ugly hack I exported the uuids in the
build/conf/local.conf. 

Regards
Joshua
-- 
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20120203/8cac5546/attachment.pgp>


More information about the yocto mailing list