Nico Huber has posted comments on this change. ( https://review.coreboot.org/23022 )
Change subject: make args for -r/-w/-v non-positional and optional
......................................................................
Patch Set 6: Code-Review-2
I'm missing a check for spurious arguments. I have no idea how to
implement it (straightforward) together with the non-positional file
names. Currently, if you have a typo in your command line (e.g. forget
a dash before an option), things may just be ignored...
So why make it non-positional?
--
To view, visit https://review.coreboot.org/23022
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iefbcb7dc4fefe26f5afd1292dfd5c1687fa62803
Gerrit-Change-Number: 23022
Gerrit-PatchSet: 6
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 10 Jan 2018 12:48:04 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Nico Huber has posted comments on this change. ( https://review.coreboot.org/23021 )
Change subject: layout: Add -i <region>[:<file>] support.
......................................................................
Patch Set 7:
(10 comments)
There are still some issues when it comes to the updated behaviour due
to that http://crbug.com/263495
* Manpage needs update.
* Separation of this and the next commit makes no sense because the introduced if/else relies on the file arguments to -w/-v being optional.
* I think we need a check for the case that both files to -w/-v and to -i are given (it seems to me the latter would be silently ignored, didn't test though).
https://review.coreboot.org/#/c/23021/7/flashrom.8.tmpl
File flashrom.8.tmpl:
https://review.coreboot.org/#/c/23021/7/flashrom.8.tmpl@227
PS7, Line 227: write
spurious
https://review.coreboot.org/#/c/23021/7/flashrom.8.tmpl@229
PS7, Line 229: For write operations, files specified using
: .B "\-i"
: take precedence over content from the argument to
: .B "\-w."
That's no more true. -i and -w filenames are mutually exclusive, right?
https://review.coreboot.org/#/c/23021/7/flashrom.8.tmpl@252
PS7, Line 252: .B " flashrom \-p prog \-l <layout> \-i foo:foo.bin -i bar:bar.bin -w rom.bin
Hmmm, just realized that this doesn't work. The -i files are just ignored
when -w gets a file passed.
I'd be fine if you document the final behaviour here. But maybe it's yet
easier to squash the two commits...
https://review.coreboot.org/#/c/23021/7/flashrom.c
File flashrom.c:
https://review.coreboot.org/#/c/23021/7/flashrom.c@1380
PS7, Line 1380: if (!entry->included || !entry->file)
: continue;
Optionally:
if (!entry->included)
continue;
if (!entry->file) {
msg_gerr("Error: No image file given for region \"%s\".\n", entry->name);
return 1;
}
I know this is already covered in the next commit for the CLI, but I
would feel much better if the code here looks consistent.
https://review.coreboot.org/#/c/23021/7/flashrom.c@1383
PS7, Line 1383: buf
+ entry->start ?
https://review.coreboot.org/#/c/23021/7/flashrom.c@1464
PS7, Line 1464: const char *filename)
Should fit a single line.
https://review.coreboot.org/#/c/23021/7/flashrom.c@2647
PS7, Line 2647: * processed and merged into newcontents since -i files take priority.
This comment still makes no sense to me. I'd guess it was
written before the if / else decision was introduced.
https://review.coreboot.org/#/c/23021/7/layout.c
File layout.c:
https://review.coreboot.org/#/c/23021/7/layout.c@239
PS7, Line 239: 0
i + 1 ?
https://review.coreboot.org/#/c/23021/7/layout.c@244
PS7, Line 244: continue;
Not needed if we start with `j > i`.
https://review.coreboot.org/#/c/23021/7/layout.c@272
PS7, Line 272: for (i = 0; i < layout.num_entries; i++) {
: free(layout.entries[i].file);
: layout.entries[i].file = NULL;
: layout.entries[i].included = 0;
: }
: layout.num_entries = 0;
This should actually be done in flashrom_layout_release() (before
the `if (layout == get_global_layout())` check).
It's a bit ugly atm, because nobody took the time yet, to untangle
the CLI parts and the static layout struct here. Hmmm, now it
doesn't look like much work: read_romlayout() would allocate a new
layout, normalize_romentries() should work on the layout linked to
the `flashctx`. Everything else doesn't seem to use the static
struct.
--
To view, visit https://review.coreboot.org/23021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Gerrit-Change-Number: 23021
Gerrit-PatchSet: 7
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 10 Jan 2018 12:29:41 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23203 )
Change subject: [WIP]Add support to get layout from a binary fmap file
......................................................................
Patch Set 2: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom_gerrit/870/ : SUCCESS
https://qa.coreboot.org/job/flashrom-customrules/1021/ : SUCCESS
--
To view, visit https://review.coreboot.org/23203
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0e7fad38ed79a84d41358e1f175c36d255786c12
Gerrit-Change-Number: 23203
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 10 Jan 2018 11:58:37 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23203
to look at the new patch set (#2).
Change subject: [WIP]Add support to get layout from a binary fmap file
......................................................................
[WIP]Add support to get layout from a binary fmap file
Already seems to mostly work, but needs to be cleaned up.
Change-Id: I0e7fad38ed79a84d41358e1f175c36d255786c12
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M Makefile
M cli_classic.c
A fmap.c
A fmap.h
M layout.c
5 files changed, 166 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/03/23203/2
--
To view, visit https://review.coreboot.org/23203
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0e7fad38ed79a84d41358e1f175c36d255786c12
Gerrit-Change-Number: 23203
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23203 )
Change subject: [WIP]Add support to get layout from a binary fmap file
......................................................................
Patch Set 1: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom_gerrit/869/ : SUCCESS
https://qa.coreboot.org/job/flashrom-customrules/1020/ : SUCCESS
--
To view, visit https://review.coreboot.org/23203
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0e7fad38ed79a84d41358e1f175c36d255786c12
Gerrit-Change-Number: 23203
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 10 Jan 2018 11:49:31 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23022 )
Change subject: make args for -r/-w/-v non-positional and optional
......................................................................
Patch Set 6: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom_gerrit/867/ : SUCCESS
https://qa.coreboot.org/job/flashrom-customrules/1018/ : SUCCESS
--
To view, visit https://review.coreboot.org/23022
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iefbcb7dc4fefe26f5afd1292dfd5c1687fa62803
Gerrit-Change-Number: 23022
Gerrit-PatchSet: 6
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 09 Jan 2018 22:59:21 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes