Arthur Heymans has uploaded a new patch set (#8) to the change originally created by David Hendricks. ( https://review.coreboot.org/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>
---
M cli_classic.c
M dummyflasher.c
M flash.h
M flashrom.8.tmpl
M flashrom.c
M layout.c
M layout.h
7 files changed, 262 insertions(+), 41 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/23021/8
--
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: newpatchset
Gerrit-Change-Id: Ic5465659605d8431d931053967b40290195cfd99
Gerrit-Change-Number: 23021
Gerrit-PatchSet: 8
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>
David Hendricks has posted comments on this change. ( https://review.coreboot.org/23021 )
Change subject: layout: Add -i <region>[:<file>] support.
......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/#/c/23021/7/flashrom.c
File flashrom.c:
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 […]
Looking back, this seems to have been messed up in translation. My fault. The comment is also confusing given how the code is structured in the upstream codebase with Nico's libflashrom patches merged.
The `else` is incorrect and in do_verify(). We should always read_buf_from_include_args() if `-i region:filename` is used. We should read the full file if `filename` is specified for -w/-v, and then read the `-i region:file` args to update the content in the buffer.
For reference, refer to lines 2058-2091 and 2124-2134 in https://chromium.googlesource.com/chromiumos/third_party/flashrom/+/master/…
--
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: Fri, 19 Jan 2018 21:25:31 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Arthur Heymans 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:
> 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?
Is there a way to change the argument amount on -r/-w/-v since without this change, using -i region:file one always needs a filename next to -r/-w/-v which sort of defeats the purpose of the previous patch.
--
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: Fri, 19 Jan 2018 11:10:01 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Nico Huber has posted comments on this change. ( https://review.coreboot.org/23057 )
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
Patch Set 6: Code-Review+1
(4 comments)
Tried to find some documentation on the matter which raised more
questions. Code looks fine, so far.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c
File buspirate_spi.c:
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@497
PS4, Line 497: bp_commbuf[0] = 0x00;
> Good catch, I'll fix that. […]
Yes, I meant msg_pinfo() but was in doubt anyway. msg_pdbg() is
just fine.
https://review.coreboot.org/#/c/23057/6/buspirate_spi.c
File buspirate_spi.c:
https://review.coreboot.org/#/c/23057/6/buspirate_spi.c@443
PS6, Line 443: 5.5
Where is this written? This page talks about 5.2:
http://dangerousprototypes.com/docs/Bus_Pirate_menu_options_guide#B_Set_PC_…https://review.coreboot.org/#/c/23057/6/buspirate_spi.c@451
PS6, Line 451: " Continue at your own risk.\n");
I did some research, v2 can work with the same firmware and uses the
same microcontroller and USB converter as v3. So that should be fine.
Maybe remove the warning for v2 but keep it at default 115200 because
we can't test it?
https://review.coreboot.org/#/c/23057/6/buspirate_spi.c@473
PS6, Line 473: sleep(1);
Is this specified somewhere? It seems incredibly long.
--
To view, visit https://review.coreboot.org/23057
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: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 6
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
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: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 17 Jan 2018 11:49:49 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
Hello David Hendricks, Paul Menzel, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23057
to look at the new patch set (#6).
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
buspirate_spi: Add support for variable serial speeds
This patch sets the default baud rate for communication between
the host device and the Bus Pirate for hardware versions 3.0
and greater to 2M baud.
It also introduces the ability to manually set the baud rate via
the added 'serialspeed' programmer parameter.
This is done in two parts. Firstly, the requested serial speed is looked up
in a table to determine the appropriate clock divisor and the divisor is sent
to the bus pirate. Then, the system's baud rate for the selected serial port
is set using serial.c's 'serialport_config'. This function's prototype had to
be added to programmer.h.
In testing, using the 2M baud rate was able to significantly decrease
flash times (down from 20+ minutes to less than 2 minutes for an 8MB flash).
Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Signed-off-by: Shawn Anastasio <shawnanastasio(a)yahoo.com>
---
M buspirate_spi.c
M flashrom.8.tmpl
M programmer.h
3 files changed, 134 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/23057/6
--
To view, visit https://review.coreboot.org/23057
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: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 6
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
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: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Hello David Hendricks, Paul Menzel, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23057
to look at the new patch set (#5).
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
buspirate_spi: Add support for variable serial speeds
This patch sets the default baud rate for communication between
the host device and the Bus Pirate for hardware versions 3.0
and greater to 2M baud.
It also introduces the ability to manually set the baud rate via
the added 'serialspeed' programmer parameter.
This is done in two parts. Firstly, the requested serial speed is looked up
in a table to determine the appropriate clock divisor and the divisor is sent
to the bus pirate. Then, the system's baud rate for the selected serial port
is set using serial.c's 'serialport_config'. This function's prototype had to
be added to programmer.h.
In testing, using the 2M baud rate was able to significantly decrease
flash times (down from 20+ minutes to less than 2 minutes for an 8MB flash).
Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Signed-off-by: Shawn Anastasio <shawnanastasio(a)yahoo.com>
---
M buspirate_spi.c
M flashrom.8.tmpl
M programmer.h
3 files changed, 136 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/23057/5
--
To view, visit https://review.coreboot.org/23057
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: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 5
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
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: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Shawn Anastasio has posted comments on this change. ( https://review.coreboot.org/23057 )
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
Patch Set 4:
(4 comments)
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c
File buspirate_spi.c:
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@452
PS4, Line 452: /* Ignore requests to set the serial speed to the default value */
> What about keeping the default? e.g. […]
In the case of a v3 with serialspeed=115200, the intended behavior would occur, but the warning will still be printed.
I think I'll just remove the warning entirely.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@453
PS4, Line 453: msg_pdbg("Ignoring request to set serial speed to default value of %d\n", BP_DEFAULTBAUD);
> Line is too long (even for flashrom's 112 char limit).
Will fix.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@456
PS4, Line 456: msg_pwarn("Bus Pirate hardware version older than 3.0 may not support increased serial speeds."
> Line is too long, and it looks like the output wouldn't fit a […]
I'll fix that.
You raise a fair point about code that may go unused, but in this case since the added code is a single print statement, I don't think the potential for project-damaging behavior is significant.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@497
PS4, Line 497: msg_pdbg("Serial speed is %d baud\n", serialspeeds[serialspeed_index].speed);
> Move into the if body above, serialspeed_index may be off. […]
Good catch, I'll fix that.
As for the visibility, do you mean I should change the log level (use msg_pinfo)? I chose msg_pdbg because a similar statement above which prints out the SPI speed also uses it.
--
To view, visit https://review.coreboot.org/23057
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: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 4
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
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: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 16 Jan 2018 21:36:58 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No