Hello Paul,

Thanks for the reply. But that's not really what I want to achieve. Really, I 
just want to copy some files into the .hddimg file that is built as a result of 
running bitbake. Like I said, I tried to extend the bootimg.bbclass, which is 
responsible for creating the .hddimg file, but it's not working and I don't 
know why.

Any suggestions?

Regards,
Francois

François Gallichand
Engineer - Software Group
ABB Group
Analytical Business
(418)877-2944 x268



-----Original Message-----
From: Paul Eggleton [mailto:paul.eggle...@linux.intel.com] 
Sent: Wednesday, June 18, 2014 12:43 PM
To: Francois P. Gallichand
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Adding files to the hddimg

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
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to