[yocto] Adding files to the hddimg
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Jun 18 09:43:26 PDT 2014
Hi Francois,
On Wednesday 18 June 2014 15:42:08 Francois P. Gallichand wrote:
> I realized that I may not have been specific enough on my problem since I
> haven't had any reply or found a solution yet.
>
> Essentially, I need to be able to add some files to the image file itself
> (.hddimg, not the rootfs) and be able to do that automatically (and ideally
> from a custom recipe).
>
> What I have tried so far is to extend the bootimg.bbclass. So I created my
> own class, myclass.bbclass, with the following content:
>
> Inherit bootimg
>
> myclass_do_bootimg() {
> do_bootimg
> cp <some files> ${HDDDIR}
> }
>
> EXPORT_FUNCTIONS do_bootimg
>
> And I patched image-live.bbclass to replace the "inherit bootimg" by
> "inherit myclass" (I don't know if there is a better way to do that?). But
> it seems that myclass_do_bootimg is never called, but do_bootimg is.
>
> I also tried the following myclass.bbclass without any more success.
>
> Inherit bootimg
>
> do_some_function() {
> cp <some files> ${HDDDIR}
> }
>
> addtask some_function after do_booimg
>
> Can someone tell me what I'm doing wrong?
I might be wrong here but it seems to me that what you want to modify is the
initramfs - is that right? In which case, that is constructed from an image
recipe pointed to by INITRD_IMAGE - by default this is core-image-minimal-
initramfs, but you can point to your own modified image by setting INITRD_IMAGE
within the image recipe (or at the configuration level).
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list