[yocto] forcing a task to run while building an image

Joshua Immanuel josh at hipro.co.in
Fri Feb 3 01:57:30 PST 2012


Hello Sathishkumar,

On Fri, 2012-02-03 at 14:21 +0530, Sathishkumar Duraisamy wrote:
> The following is the scenario, you are in. If I wrong, please correct
> me.
> " You have your development program/application in some place. You
> want to build and include it in your rootfs. And you don't want to
> edit the recipe/other things for each build of rootfs." 

Let me explain (though I've mentioned in many places in bits and
pieces). At present situation, when we build an image (say
'core-image-minimal') everything goes under one partition. But, for my
use-case I am trying to generate two sets of images denoting different
partitions as I already mentioned in
https://lists.yoctoproject.org/pipermail/yocto/2012-January/006611.html
So, in order to do that, I've to identify the different partitions in my
etc/fstab file. This is done by denoting filesystems by their uuids. 

So, every time I build my custom-image I have to construct
the /etc/fstab file with the generated uuids (by using uuidgen) and set
the same uuids in the generated images using tune2fs. Setting the uuid
to generated images is done by overriding image_types.bbclass file. 

Similarly constructing the fstab file is done by adding
base-files_3.0.14.bbappend in my custom layer.

So, I have to force the base-files:do_install task to run whenever we
build the custom-image. Otherwise the uuids in the /etc/fstab will be
the older ones and the uuids set to the generated images will be the
newer ones. They will not match thereby defeating the whole purpose of
building partition based images.

In this context, I was trying to create a global variables to store the
uuids in order to be shared across multiple packages (i.e base-files
and image_types) But that too doesn't look like a piece of cake.

Am I trying something too weird?

Sorry for bombarding the list over and over again with the same issue.

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/4a5468e9/attachment.pgp>


More information about the yocto mailing list