David Hendricks has posted comments on this change. ( https://review.coreboot.org/17945 )
Change subject: Add functions to read/erase/write/verify by layout
......................................................................
Patch Set 6:
I was also able to test with my patches applied on top of yours.
Exmaple syntax in case you want to try it out:
sh tests/tests_v2/test_v2.sh -t single -m layout -l <path to layout file> --layout-region <region to target> -n ./flashrom -o ./flashrom -p <programmer opts>
(there's no old flashrom to use as a base so it's just testing itself)
--
To view, visit https://review.coreboot.org/17945
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic6194cea4c4c430e0cf9d586052508a865b09c86
Gerrit-PatchSet: 6
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: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: No
David Hendricks has uploaded a new change for review. ( https://review.coreboot.org/19406 )
Change subject: test_v2.sh: Copy layout to local tempdir in local-layout mode
......................................................................
test_v2.sh: Copy layout to local tempdir in local-layout mode
The layout file wasn't being copied to the local tempdir when using
layout as the region mode and doing the test entirely locally.
BUG=none
BRANCH=none
TEST=ran test in layout mode locally
Change-Id: Ia2328d367ee3df5ac1c481c16e4502a81d69fd98
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
M tests/tests_v2/test_v2.sh
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/06/19406/1
diff --git a/tests/tests_v2/test_v2.sh b/tests/tests_v2/test_v2.sh
index 4c15c36..766f9ab 100755
--- a/tests/tests_v2/test_v2.sh
+++ b/tests/tests_v2/test_v2.sh
@@ -386,6 +386,8 @@
if [ $DO_REMOTE -eq 1 ]; then
scp root@"${REMOTE_HOST}:$LAYOUT_FILE" "${LOCAL_TMPDIR}/" 2>&1 >/dev/null
+ else
+ cp "$LAYOUT_FILE" "${LOCAL_TMPDIR}/"
fi
fi
elif [ $TEST_TYPE -eq $TEST_TYPE_WRITEPROTECT ]; then
--
To view, visit https://review.coreboot.org/19406
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2328d367ee3df5ac1c481c16e4502a81d69fd98
Gerrit-PatchSet: 1
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Hello Louis Yung-Chieh Lo, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/19387
to look at the new patch set (#2).
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>
---
M cli_classic.c
M flashrom.c
M layout.c
M layout.h
4 files changed, 209 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/87/19387/2
--
To view, visit https://review.coreboot.org/19387
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iefbcb7dc4fefe26f5afd1292dfd5c1687fa62803
Gerrit-PatchSet: 2
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Louis Yung-Chieh Lo <yjlou(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)