Hello David Hendricks, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/17946
to look at the new patch set (#8).
Change subject: Add a convenient libflashrom interface
......................................................................
Add a convenient libflashrom interface
This adds a minimal libflashrom interface based on the draft in the
wiki. While the glue code in libflashrom.c is build on top of the
existing code instead on …
[View More]overhauling it, the interface in libflashrom.h
is supposed to be stable. So we can keep the interface and adapt
internals later if favoured, without breaking clients.
A new make target, libinstall, is also added. It installs libflashrom.a
and libflashrom.h in lib/ and include/ dirs respectively.
Hooking this into the build would break linking of the CLI and is post-
poned until that got fixed.
v2: Rebase and fixes by Anton Kochkov.
v3: o fl_image_*() rewritten with layout support (touch only included regions).
o Moved read/erase/write/verify operations to flashrom.c.
o Added layout pointer and flags to the flash context.
v4: Removed libflashrom.o from LIB_OBJS until CLI is adapted.
v5: o Incorporated David's comments.
o Added `fl_flashprog_t` as dummy parameter to hide the fact that
we have global state all around, and for future-proofness ofc.
Change-Id: I00f169990830aa17b7dfae5eb74010d40c476181
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M Makefile
M flash.h
M flashrom.c
A libflashrom.c
A libflashrom.h
5 files changed, 720 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/46/17946/8
--
To view, visit https://review.coreboot.org/17946
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I00f169990830aa17b7dfae5eb74010d40c476181
Gerrit-PatchSet: 8
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
[View Less]
Nico Huber has posted comments on this change. ( https://review.coreboot.org/17953 )
Change subject: Add option to read ROM layout from IFD
......................................................................
Patch Set 9:
(2 comments)
I'm haven't tested if it builds now on non-x86. It should try at least :)
https://review.coreboot.org/#/c/17953/7/cli_classic.c
File cli_classic.c:
PS7, Line 60: " --ifd
> Since we only have a few useful single letters available for short opts, …
[View More]I
Done
PS7, Line 574: fl_layout_release(layout);
:
> Hm, it would be nice if this could be called unconditionally, or perhaps ju
Done
--
To view, visit https://review.coreboot.org/17953
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifafff2bf6d5c5e62283416b3269723f81fdc0fa3
Gerrit-PatchSet: 9
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: Yes
[View Less]
Nico Huber has posted comments on this change. ( https://review.coreboot.org/17946 )
Change subject: Add a convenient libflashrom interface
......................................................................
Patch Set 7:
(5 comments)
https://review.coreboot.org/#/c/17946/6/flashrom.c
File flashrom.c:
Line 2507: return 1;
> Would it make sense to add a wrapper function that calls unmap_flash() and
Done
It only contains unmap_flash() for now, since this was also the only
cleanup …
[View More]done before.
PS6, Line 2610:
: }
> "containing" might be a better word for this
Done
Line 2696: }
> Style nit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.g
Done
https://review.coreboot.org/#/c/17946/6/libflashrom.c
File libflashrom.c:
PS6, Line 42: fl_
> I had originally thought fl_ was used when describing flash layout stuff th
I used it for the library interface originally. `struct fl_layout`
is part of it. I can't remember why I used it for the layout internal
parts too. I dropped the fl_ prefix from the layout parts beside
`struct fl_layout` for now. At least until we have an official prefix
for the library.
Line 301: return 1;
> How about adding:
Done
--
To view, visit https://review.coreboot.org/17946
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I00f169990830aa17b7dfae5eb74010d40c476181
Gerrit-PatchSet: 7
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: Yes
[View Less]