[yocto] Adding files to the hddimg

Francois P. Gallichand francois.p.gallichand at ca.abb.com
Tue Jun 24 10:19:04 PDT 2014


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 at chargestorm.se>
Envoyé : 23 juin 2014 08:26
À : Francois P. Gallichand
Cc : Paul Eggleton; yocto at yoctoproject.org
Objet : Re: [yocto] Adding files to the hddimg

* Francois P. Gallichand <francois.p.gallichand at 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



More information about the yocto mailing list