[yocto] Modify RFS before final image is created

Paul Eggleton paul.eggleton at linux.intel.com
Mon Apr 28 01:55:07 PDT 2014


Hi Tobias,

On Friday 25 April 2014 11:16:20 Tobias Blom wrote:
> On 25 apr 2014, at 09:22, Tobias Blom <tobias.blom at techne-dev.se> wrote:
> > I have run into a problem that I’m not able to figure out how to solve,
> > and turn to the list to ask for general directions.
> > 
> > I need to modify my root FS just before the final image is created. The
> > problem is that I do now know where to implement my code.
> > 
> > More specific, I want to copy a couple of RPM-packages to the final RFS,
> > packages that have just been installed. The reason is to be able to
> > perform a rollback later on.
>
> I’ll answer my own question. It seem ROOTFS_POSTPROCESS_COMMAND or
> ROOTFS_POSTINSTALL_COMMAND is the way to go.

Yep, adding to ROOTFS_POSTPROCESS_COMMAND is the expected way to do this.
 
> I did however run into a problem when running my script. Using variable ${D}
> in my ROOTFS_POSTINSTALL_COMMAND gives the “wrong” path - it points to
> …/image and I’d expect it to contain the path to …/rootfs. It seem the
> variable is replaced before my function is executed.
> 
> I solved this by using variable ${IMAGE_ROOTFS} instead.

Right, IMAGE_ROOTFS is the variable that points to the directory structure 
being created for the image.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list