[OE-core] How to use WIC to generate raw flash images

Rick Altherr raltherr at google.com
Mon Jan 23 18:44:30 UTC 2017


https://bugzilla.yoctoproject.org/show_bug.cgi?id=10957

On Mon, Jan 23, 2017 at 2:34 AM, Ed Bartosh <ed.bartosh at linux.intel.com>
wrote:

> On Fri, Jan 20, 2017 at 10:37:15AM -0800, Rick Altherr wrote:
> > For OpenBMC (based on Yocto), the target is an SoC that has an external
> > boot flash connected via SPI.  Right now, we have a class (
> > https://github.com/openbmc/openbmc/blob/master/meta-
> phosphor/classes/image-overlay.bbclass)
> > used by our top-level image recipe (
> > https://github.com/openbmc/openbmc/blob/master/meta-
> phosphor/common/recipes-phosphor/images/obmc-phosphor-image.bb)
> > that manually constructs a flash image from the kernel, rootfs, etc.
>
> This is indeed very interesting work. We definitely need support of flash
> images in oe-core.
>
> > I'd like to move to an upstream-supported approach and I think that is
> WIC.
>
> > What I don't understand is:
> > - How do I build a raw flash image where it is divided into partitions
> but
> > has no partition table?
>
> Wic doesn't support this type of images, but it shouldn't be hard to add
> option to skip partitioning to .wks syntax and wic code.
>
> > - How do I set padding to be 0xFF instead of 0x00?
> The same thing here. Currently wic images are sparse files created by
> os.ftruncate, but it's not a big deal to fill them with 0xFF
>
> > - How do I include u-boot in the image?
>
> This can be done by using/extending rawcopy plugin or writing similar
> one.
>
> > Do I need to add a new imager plugin to support writing raw images with
> > non-zero padding and no partition table?  For U-Boot, do I add a new
> > bootimg plugin?
>
> This sounds reasonable. Can you create a bug for this in bugzilla to
> discuss design and implementation details?
>
> --
> Regards,
> Ed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170123/9d65b04d/attachment-0002.html>


More information about the Openembedded-core mailing list