Arthur Heymans has uploaded a new patch set (#5) 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, 280 insertions(+), 35 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/23021/5
--
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: 5
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: 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 4:
(3 comments)
Almost there...
https://review.coreboot.org/#/c/23021/4/flashrom.c
File flashrom.c:
https://review.coreboot.org/#/c/23021/4/flashrom.c@1400
PS4, Line 1400: if(
nit: add a space between if and open paren
https://review.coreboot.org/#/c/23021/4/layout.c
File layout.c:
https://review.coreboot.org/#/c/23021/4/layout.c@270
PS4, Line 270: goto out;
Perhaps it will be more useful to just keep going here so that the user knows all of the regions which overlap.
https://review.coreboot.org/#/c/23021/4/layout.c@272
PS4, Line 272:
extra line?
--
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: 4
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: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 07 Jan 2018 12:48:49 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
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 3: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom_gerrit/859/ : SUCCESS
https://qa.coreboot.org/job/flashrom-customrules/1009/ : 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: 3
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 06 Jan 2018 23:29:47 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Arthur Heymans has uploaded a new patch set (#4) 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, 283 insertions(+), 35 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/23021/4
--
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: 4
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: build bot (Jenkins) <no-reply(a)coreboot.org>
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 2: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom_gerrit/857/ : SUCCESS
https://qa.coreboot.org/job/flashrom-customrules/1007/ : 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: 2
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 06 Jan 2018 23:15:31 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Arthur Heymans has uploaded a new patch set (#2) to the change originally created by David Hendricks. ( https://review.coreboot.org/23022 )
Change subject: make args for -r/-w/-v non-positional and optional
......................................................................
make args for -r/-w/-v non-positional and optional
Ported from chromiumos:
https://chromium-review.googlesource.com/#/c/60515/
This makes a filename following -r, -w, and -v operations non-
positional. The first argument that does not begin with a hyphen (-)
is the filename for -r/-w/-v. If no such argument exists, then
-r/-w/-v options apply to files specified for individually included
regions via -i.
This has a few side-effects:
1. It allows us to omit the ROM-sized filename entirely when a
filename is provided for a particular region when using -i. For
example, "flashrom -i FOO:foo.bin -r".
2. It allows, for better or worse, the filename be specified anywhere
on the command line after the program name. Our scripts and docs
should still specify the file after -r/-w/-v for clarity.
For our purposes, if a filename is given for every included region
(-i region:filename) then the user does not need to specify a filename
after -r/-w/-v. However, if any -i option does not specify a filename,
then a file must be specified after -r/-w/-v.
The syntax will be backwards compatible for now so that one can still
mix -i options with and without the added filename specifier for each
region.
BUG=chromium:263495
BRANCH=none
TEST=manual (see notes below)
1. Write random data to RW_UNUSED region (on snow in this case)
without requiring an argument to -w. See that only RW_UNUSED
is erased and written, and that verify works:
dd if=/dev/urandom of=rw_unused.bin bs=1k count=1 conv=notrunc
flashrom -p host -i RW_UNUSED:rw_unused.bin -w -V
flashrom -p host -i RW_UNUSED:rw_unused.bin -v -V
2. Same as above, but specify a dummy file to test syntax
backwards compatibility:
dd if=/dev/urandom of=rw_unused.bin bs=1k count=1 conv=notrunc
dd if=/dev/urandom of=random_4M.bin bs=1M count=4
flashrom -p host -i RW_UNUSED:rw_unused.bin -w random_4M.bin -V
flashrom -p host -i RW_UNUSED:rw_unused.bin -v random_4M.bin -V
3. Test that dumping RW_UNUSED and GBB regions without -r arg dumps
two files and that they can be used to verify the content:
flashrom -p host -i RW_UNUSED:rw_unused.bin -i GBB:gbb.bin -r
flashrom -p host -i RW_UNUSED:rw_unused.bin -i GBB:gbb.bin -v
4. Same as above, but with dummy file:
flashrom -p host -i RW_UNUSED:rw_unused.bin -i GBB:gbb.bin -r x.bin
flashrom -p host -i RW_UNUSED:rw_unused.bin -i GBB:gbb.bin -v x.bin
Change-Id: Iefbcb7dc4fefe26f5afd1292dfd5c1687fa62803
Reviewed-on: https://gerrit.chromium.org/gerrit/60515
Reviewed-by: Yung-Chieh Lo <yjlou(a)chromium.org>
Commit-Queue: David Hendricks <dhendrix(a)chromium.org>
Tested-by: David Hendricks <dhendrix(a)chromium.org>
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M cli_classic.c
M flashrom.8.tmpl
2 files changed, 97 insertions(+), 23 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/22/23022/2
--
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: newpatchset
Gerrit-Change-Id: Iefbcb7dc4fefe26f5afd1292dfd5c1687fa62803
Gerrit-Change-Number: 23022
Gerrit-PatchSet: 2
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Nico Huber has abandoned this change. ( https://review.coreboot.org/23024 )
Change subject: test_v2.sh: Copy layout to local tempdir in local-layout mode
......................................................................
Abandoned
Was only restored by accident.
--
To view, visit https://review.coreboot.org/23024
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ia2328d367ee3df5ac1c481c16e4502a81d69fd98
Gerrit-Change-Number: 23024
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Nico Huber has restored this change. ( https://review.coreboot.org/23022 )
Change subject: make args for -r/-w/-v non-positional and optional
......................................................................
Restored
--
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: restore
Gerrit-Change-Id: Iefbcb7dc4fefe26f5afd1292dfd5c1687fa62803
Gerrit-Change-Number: 23022
Gerrit-PatchSet: 1
Gerrit-Owner: 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>