* Adding files to the hddimg @ 2014-06-13 13:57 Francois P. Gallichand 2014-06-18 15:42 ` Francois P. Gallichand 0 siblings, 1 reply; 6+ messages in thread From: Francois P. Gallichand @ 2014-06-13 13:57 UTC (permalink / raw) To: yocto@yoctoproject.org [-- Attachment #1.1: Type: text/plain, Size: 359 bytes --] Hello, I'm relatively new to yocto and this is maybe something that is pretty basic but how can I add my own files in the bootimg (.hddimg) using a custom recipes? And I really means the boot image file, not the rootfs image. Thanks, François Gallichand Engineer - Software Group ABB Group Analytical Business (418)877-2944 x268 [ABB logo] [-- Attachment #1.2: Type: text/html, Size: 2909 bytes --] [-- Attachment #2: image001.png --] [-- Type: image/png, Size: 3279 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding files to the hddimg 2014-06-13 13:57 Adding files to the hddimg Francois P. Gallichand @ 2014-06-18 15:42 ` Francois P. Gallichand 2014-06-18 16:43 ` Paul Eggleton 0 siblings, 1 reply; 6+ messages in thread From: Francois P. Gallichand @ 2014-06-18 15:42 UTC (permalink / raw) To: yocto@yoctoproject.org [-- Attachment #1.1: Type: text/plain, Size: 1797 bytes --] Hello All, 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? Thanks for any help. Francois François Gallichand Engineer - Software Group ABB Group Analytical Business (418)877-2944 x268 [ABB logo] From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Francois P Gallichand Sent: Friday, June 13, 2014 9:58 AM To: yocto@yoctoproject.org Subject: [yocto] Adding files to the hddimg Hello, I'm relatively new to yocto and this is maybe something that is pretty basic but how can I add my own files in the bootimg (.hddimg) using a custom recipes? And I really means the boot image file, not the rootfs image. Thanks, François Gallichand Engineer - Software Group ABB Group Analytical Business (418)877-2944 x268 [ABB logo] [-- Attachment #1.2: Type: text/html, Size: 8173 bytes --] [-- Attachment #2: image001.png --] [-- Type: image/png, Size: 3279 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding files to the hddimg 2014-06-18 15:42 ` Francois P. Gallichand @ 2014-06-18 16:43 ` Paul Eggleton 2014-06-18 17:20 ` Francois P. Gallichand 0 siblings, 1 reply; 6+ messages in thread From: Paul Eggleton @ 2014-06-18 16:43 UTC (permalink / raw) To: Francois P. Gallichand; +Cc: yocto 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding files to the hddimg 2014-06-18 16:43 ` Paul Eggleton @ 2014-06-18 17:20 ` Francois P. Gallichand 2014-06-23 12:26 ` Anders Darander 0 siblings, 1 reply; 6+ messages in thread From: Francois P. Gallichand @ 2014-06-18 17:20 UTC (permalink / raw) To: Paul Eggleton; +Cc: yocto@yoctoproject.org 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.eggleton@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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding files to the hddimg 2014-06-18 17:20 ` Francois P. Gallichand @ 2014-06-23 12:26 ` Anders Darander 2014-06-24 17:19 ` Francois P. Gallichand 0 siblings, 1 reply; 6+ messages in thread From: Anders Darander @ 2014-06-23 12:26 UTC (permalink / raw) To: Francois P. Gallichand; +Cc: Paul Eggleton, yocto@yoctoproject.org * Francois P. Gallichand <francois.p.gallichand@ca.abb.com> [140618 19:22]: > 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. Well, then I guess the question if what kinds of file is it, and how do you want to copy them into the .hddimg? Should they be copied into the rootfs in the .hddimg? If so, I'd suggest to create a standard bitbake recipe and just install those files into the rootfs. If it's something else, I think you need to explain it a little bit more. Cheers, Anders > Any suggestions? -- Anders Darander ChargeStorm AB / eStorm AB ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Adding files to the hddimg 2014-06-23 12:26 ` Anders Darander @ 2014-06-24 17:19 ` Francois P. Gallichand 0 siblings, 0 replies; 6+ messages in thread From: Francois P. Gallichand @ 2014-06-24 17:19 UTC (permalink / raw) To: Anders Darander; +Cc: Paul Eggleton, yocto@yoctoproject.org Hello Anders, I don't want to copy files into the rootfs, I know how to do that. It's really in the hddimg that I need to copy files, at the same level as the rootfs. To make a short story, here's what I want to do. I want to use a usb drive to install a system so I "dd" the hddimg to this usb drive. The idea is to boot this usb drive on the target system so it can be used to accomplish various task, like installing a new system or updating or configuring an existing one. So to do that, I need to put the required files to install or configure the system also on the key. You could argue that I can still do all of this even if I put everything in the rootfs. However, I use squashfs for the rootfs (to save space), and also the files on the key must be modifiable by a user using a Windows computer (which is easy since this is a VFAT partition but not the rootfs that's not even writable). Like I mentionned in previous email, one way to achieve that is to extend the bootimg.bbclass, but I tried that and it didn't work (and I don't know why). After talking to some people, I guess that the simple solution is to write a separate script that does what I need i.e.once I build the hddimg, it just mount the hddimg and copy the required stuff on it. It's just that I would have liked to do that in the Yocto environment, but it's no big priority. The resulting real question however is how to extend a .bbclass and why what I tried before didn't work? Any idea about that? Regards, Francois ________________________________________ De : Anders Darander <anders@chargestorm.se> Envoyé : 23 juin 2014 08:26 À : Francois P. Gallichand Cc : Paul Eggleton; yocto@yoctoproject.org Objet : Re: [yocto] Adding files to the hddimg * Francois P. Gallichand <francois.p.gallichand@ca.abb.com> [140618 19:22]: > 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. Well, then I guess the question if what kinds of file is it, and how do you want to copy them into the .hddimg? Should they be copied into the rootfs in the .hddimg? If so, I'd suggest to create a standard bitbake recipe and just install those files into the rootfs. If it's something else, I think you need to explain it a little bit more. Cheers, Anders > Any suggestions? -- Anders Darander ChargeStorm AB / eStorm AB ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-24 17:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-06-13 13:57 Adding files to the hddimg Francois P. Gallichand 2014-06-18 15:42 ` Francois P. Gallichand 2014-06-18 16:43 ` Paul Eggleton 2014-06-18 17:20 ` Francois P. Gallichand 2014-06-23 12:26 ` Anders Darander 2014-06-24 17:19 ` Francois P. Gallichand
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.