[coreboot] [PATCH]Remove non-CBFS

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Oct 1 09:26:08 CEST 2009


On 01.10.2009 01:57, Kevin O'Connor wrote:
> As an aside, to protect against a power failure, flashrom is going to
> need to know that it shouldn't reflash the "fallback" parts of the
> image.
>   

flashrom currently has a patch review bottleneck, so partial reflashing
is stalled.


> Just to throw my 2cents in -- the coreboot fallback/normal thing has
> been thoroughly confusing to me.  If this is being re-implemented it
> would be nice to see this done in a way that makes sense to users.
>
> One suggestion I have - assuming my "bios savior" analogy is correct -
> would be to truly break up the fallback and normal parts.  A user that
> wants fallback/normal should download two separate copies of
> coreboot-v2 into two separate directories, and then run "make config ;
> make" in both separate directories.  The "normal" config would take
> the directory location of the "fallback" cbfs image, copy it into its
> local directory, and then just add the cbfs files it needs.
>
> In particular, I'd like to be able to go into my "normal" directory
> and run "svn up", "make", and then "flashrom" - and be fairly
> confident that I didn't just blow up my image.  As near as I can tell,
> the current fallback/normal thing recompiles both fallback and normal
> images, and there's a pretty good chance that both images are hosed
> when code changes are made.

You do have a point.
In v3, you have an invariant boot block (which contains the CAR code,
serial code, generic PCI accessor functions and printk) and one
"initram" file and one "stage2" file. initram initializes RAM, stage2 is
roughly what coreboot_ram does now. AFAIK the v3 build process only
builds a "normal" image.

Two problem areas need to be looked at:
1. Can the new build reuse the old bootblock? Does the new build have to
know the old bootblock?
2. How do you merge old and new images?

1. is trivial to integrate in the v3 build and bootblock reuse is easy.
Of course you'd want to replace the bootblock (and the rest of the ROM)
if some bootblock code changed.

2. is a bit more problematic regardless of whether you have v2 or v3. If
you don't want to reflash the old parts of the image, you can't rename
them either. If the old part was called "fallback", it will still be
called "fallback" after flashing some new parts into the ROM. That means
each time you reflash, the new part's name will be the opposite of the
old part's name. Of course, with such a system, calling these things
"fallback" and "normal" makes no sense anymore. After all, we always
want to boot the newly flashed image first and the name doesn't tell us
which one is new. There are solutions to this, but the ones I see will
either require to change the CBFS data structure (LAR3 or CBFS2 anyone?)
or put a horrible hack on top of CBFS. Maybe someone else has better ideas.


Now on to flashrom. You suggested that flashrom should understand CBFS
and only flash the newly added parts of the image. (If I misunderstood
you, please accept my apologies.) Given that flashrom already has a
generic image layout feature, I propose to have cbfstool spit out an
image layout file which is then read by flashrom. This makes flashrom
independent of CBFS and that's a good thing (think upgrade).

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the coreboot mailing list