Bug 10957 - wic: support generating raw flash images
Summary: wic: support generating raw flash images
Status: NEW
Alias: None
Product: Wic
Classification: Yocto Project Subprojects
Component: wic (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Trevor Woerner
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-01-23 18:44 UTC by Rick Altherr
Modified: 2026-07-30 15:28 UTC (History)
13 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Altherr 2017-01-23 18:44:02 UTC
For SoCs that boot from a raw flash device (such as Aspeed AST2500), an image's U-Boot, kernel image, and rootfs are combined into a single image suitable for writing directly the flash.  Specifically:
- there is no partition table (but the contents are organized into parition-like ranges)
- padding is 0xFF instead of 0x00
- U-Boot is written as a raw binary at a fixed location

WIC, today, assumes that a partition table (msdos or gpt) will be written, padding is all zeros, and boot files are copied into a filesystem.  A new imager plugin and bootimg source plugin are likely required to add the raw flash features.

Discussion on oe-core mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2017-January/131533.html
Comment 1 Ed Bartosh 2017-01-23 21:55:41 UTC
from the first look we can do this the following way:

- Implement wks option to skip creating partition table for existing imager plugin or implement new imager plugin if modification is not feasible.

- Implement wks option to set padding. Would it be enough to pad partitions or it's better to pad the image?

- Use existing wks option --fixed-size in to set partition sizes

- implement --offset wks option if partition content needs to be written with an offset from the partition start (is this u-boot case?)

- Use rawcopy or/and fsimage plugin or write new plugin to populate partitions

I think it's better to use existing functionality than create new plugins.

Comments?
Comment 2 Ed Bartosh 2017-03-02 12:12:47 UTC
There is a tool developed for similar purpose: http://git.denx.de/?p=u-boot.git;a=tree;f=tools/binman;h=706dfe34f9557807ffa7eeab80c502145d3cddbc;hb=HEAD

It's tightly coupled with uboot, so probably we can't use it, but we should look at least look at a possibility to reuse it's ideas.
Comment 3 Maciej Pijanowski 2019-06-12 14:19:47 UTC
I'm interested in this feature. Has anyone started working on that? If not, I will try to take a look at it.
Comment 4 Armin Kuster 2019-07-19 22:42:48 UTC
(In reply to comment #3)
> I'm interested in this feature. Has anyone started working on that? If not,
> I will try to take a look at it.

you are more than welcome to take this issue as it sounds like you have interest in this subject.  If you don't have an bug account, you may want to recreate on.

thank you for helping.
- armpit
Comment 5 Randy MacLeod 2023-10-24 14:24:46 UTC
Bulk move from 4.99 or 0.00 to 5.99