Attention is currently required from: Sam McNally, Nicola Corna, Paul Menzel, Stefan Reinauer, David Hendricks, Daniel Campello, Arthur Heymans, Carl-Daniel Hailfinger.
Daniel Campello has uploaded a new patch set (#28) to the change originally created by David Hendricks. ( https://review.coreboot.org/c/flashrom/+/23021 )
Change subject: layout: Add -i <region>[:<file>] support
......................................................................
layout: Add -i <region>[:<file>] support
Add an optional sub-parameter to the -i parameter to allow building the
image to be written from multiple files. This will also allow regions to
be read from flash and written to separate image files.
This is a rebase of a patch that was ported from chromiumos. A lot of
things have changed, but the idea is the same.
Original patch by Louis Yung-Chieh Lo <yjlou(a)chromium.org>:
Summary: Support -i partition:file feature for both read and write.
Commit: 9c7525f
Review URL: http://codereview.chromium.org/6611015
Ported version by Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
and Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>:
Summary: [PATCH 2/6] layout: Add -i <region>[:<file>] support.
Review URL: https://mail.coreboot.org/pipermail/flashrom/2013-October/011729.html
Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
Signed-off-by: Daniel Campello <campello(a)chromium.org>
Co-Authored-by: Edward O'Callaghan <quasisec(a)google.com>
Co-Authored-by: Daniel Campello <campello(a)chromium.org>
---
M cli_classic.c
M flashrom.8.tmpl
M flashrom.c
M layout.c
M layout.h
5 files changed, 234 insertions(+), 27 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/23021/28
--
To view, visit https://review.coreboot.org/c/flashrom/+/23021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Gerrit-Change-Number: 23021
Gerrit-PatchSet: 28
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: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: Sam McNally <sammc(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sam McNally <sammc(a)google.com>
Gerrit-Attention: Nicola Corna <nicola(a)corna.info>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Sam McNally, Nicola Corna, Paul Menzel, Stefan Reinauer, David Hendricks, Daniel Campello, Arthur Heymans, Carl-Daniel Hailfinger.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/23021 )
Change subject: layout: Add -i <region>[:<file>] support
......................................................................
Patch Set 27:
(8 comments)
Patchset:
PS27:
Thanks for taking this over. I have to say, however, that it was
only stalled because of the follow-up(s) to adapt the CLI, where
we couldn't find a consensus yet. I think we really should have
a discussion about the command-line syntax, and that should
happen on the mailing list. Some pointers for a start:
CB:23022
CB:30979
https://flashrom.org/Per_region_file_argumentshttps://mail.coreboot.org/pipermail/flashrom/2018-January/015327.html
It seems some code was lost in the rebase PS16 and re-invented
later. So I'm not really sure how to re-review this. I tried to
diff various patch sets to figure out why what changed since
PS15, but it's really hard. If we have to start over, I'd prefer
smaller patches. For instance, the internals in `flashrom.c`
could be done first. With just NULL file pointers in the
romentries, it would even be a consistent program.
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/23021/comment/4f94262c_c9c25943
PS27, Line 319: tempstr = strdup(optarg);
If register_include_arg() is not going to own it, we should pass it `const`
and handle the duplication inside.
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/23021/comment/12b74e22_253b9897
PS16, Line 1337: %s
> Done
Still, somebody took the time to implement better error messages.
I don't see why we should drop that. But I also don't really mind.
https://review.coreboot.org/c/flashrom/+/23021/comment/2104e891_90b0b4ff
PS16, Line 1367: when writing
Any other case when this is used? or, why remove this?
File layout.c:
https://review.coreboot.org/c/flashrom/+/23021/comment/3f76aefb_04f30fe7
PS21, Line 253: goto out;
The intention obviously was to report all overlapping regions.
If we decide to bail out, there is no need for the variable and goto.
File layout.c:
https://review.coreboot.org/c/flashrom/+/23021/comment/7dbf3015_103da5a9
PS27, Line 147: tmp->file = strdup(file);
else?
https://review.coreboot.org/c/flashrom/+/23021/comment/0a777dbc_81acde8f
PS27, Line 155: include_region
Could be exported as part of the libflashrom API, e.g.
flashrom_layout_include_region_file()
https://review.coreboot.org/c/flashrom/+/23021/comment/9400830d_d51ddf70
PS27, Line 221: }
Looks like somewhere in the rebasing reporting of the file names got lost.
--
To view, visit https://review.coreboot.org/c/flashrom/+/23021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Gerrit-Change-Number: 23021
Gerrit-PatchSet: 27
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: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: Sam McNally <sammc(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sam McNally <sammc(a)google.com>
Gerrit-Attention: Nicola Corna <nicola(a)corna.info>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Gerrit-Comment-Date: Thu, 15 Apr 2021 21:27:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daniel Campello <campello(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons.
Jack Rosenthal has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52215 )
Change subject: cli_classic: prevent corruption of flash when stdout/stderr is closed
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
BTW, it looks like I don't have submit permissions in this repo. You'll need to click submit for me when you're ready for this to merge.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52215
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I751c9dd88ad1d30283b94bd2185b4f8f25569c8f
Gerrit-Change-Number: 52215
Gerrit-PatchSet: 2
Gerrit-Owner: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Thu, 15 Apr 2021 19:46:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons.
Jack Rosenthal has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52215 )
Change subject: cli_classic: prevent corruption of flash when stdout/stderr is closed
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> Looks nice, thank you! […]
Thanks :-)
Agree on STANDALONE. I tried to follow the existing conventions in this file by using it, but I think it's worth coming back to this later and see if cleanup is possible.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52215
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I751c9dd88ad1d30283b94bd2185b4f8f25569c8f
Gerrit-Change-Number: 52215
Gerrit-PatchSet: 2
Gerrit-Owner: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Thu, 15 Apr 2021 19:43:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Attention is currently required from: Jack Rosenthal, Angel Pons.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52215 )
Change subject: cli_classic: prevent corruption of flash when stdout/stderr is closed
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
Looks nice, thank you!
NB. I wonder why we have these STANDALONE guards. The only target
defining this seems to be libflashrom for a libpayload environment,
which doesn't include the CLI.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52215
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I751c9dd88ad1d30283b94bd2185b4f8f25569c8f
Gerrit-Change-Number: 52215
Gerrit-PatchSet: 2
Gerrit-Owner: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Thu, 15 Apr 2021 19:32:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52383
to look at the new patch set (#2).
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
flashrom.c: allow - as filename for stdin/stdout
Allows - as filename for -r/-w/-v options
Signed-off-by: Daniel Campello <campello(a)chromium.org>
Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
---
M cli_classic.c
M flashrom.c
2 files changed, 23 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/52383/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nico Huber, Angel Pons, Nikolai Artemiev.
Hello build bot (Jenkins), Nico Huber, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52362
to look at the new patch set (#3).
Change subject: cli_classic: Make -r/-w/-v argument optional
......................................................................
cli_classic: Make -r/-w/-v argument optional
Makes filename optional from -r/-w/-v since the -i parameter allows
building the image to be written from multiple files, and regions to be
read from flash and written to separate image files,
Signed-off-by: Daniel Campello <campello(a)chromium.org>
Change-Id: I15384b92cb987a6ea1bb4369ef415488b9cf7f41
---
M cli_classic.c
M flashrom.c
2 files changed, 81 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/52362/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/52362
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I15384b92cb987a6ea1bb4369ef415488b9cf7f41
Gerrit-Change-Number: 52362
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: newpatchset