summaryrefslogtreecommitdiffstats
path: root/flashrom.8.tmpl
diff options
context:
space:
mode:
authorNamyoon Woo <namyoon@chromium.org>2020-10-17 20:25:15 -0700
committerEdward O'Callaghan <quasisec@chromium.org>2020-10-27 11:37:03 +0000
commitf7a08a8ef22fa1e5bbbbbe10d39b7cf46bd5cb6c (patch)
tree53422de0ed371e1d9b42e641fc451ef91ac10c22 /flashrom.8.tmpl
parentcf1e8f7b904ddf639b29b2e1bb0ad681c1aad76d (diff)
downloadflashrom-f7a08a8ef22fa1e5bbbbbe10d39b7cf46bd5cb6c.tar.gz
flashrom-f7a08a8ef22fa1e5bbbbbe10d39b7cf46bd5cb6c.tar.bz2
flashrom-f7a08a8ef22fa1e5bbbbbe10d39b7cf46bd5cb6c.zip
dummyflasher.c: Fix null par data and size param handling
This patch fixes a few bugs that two patches ( `3149822cd45cb2e5841e15d648783748ba1b2ec6` && `3b8fe0f8e907c0ba9f7c7935e950f3e1538d427f`) brought: * Check the presence of 'size' param only if the emulate is VARIABLE_SIZE. * Initialize 'flash->st->par.data' in dummy_init() so that it can probe the VARIABLE_SIZE emulator correct in probe_variable_size(). * Replace atoi() with strtol(). * Revise man page to describe how to use the VARIABLE_SIZE emulation target. TEST: $ flashrom -p dummy:image=dummy.bin,emulate=VARIABLE_SIZE,size=16777216 \ -w ${IMG} -V -f ... Verifying flash... VERIFIED. Writing dummy.bin $ flashrom -p dummy:image=dummy.bin,emulate=VARIABLE_SIZE -w ${IMG} -V -f ... dummy_init: the size parameter is not given. Unhandled programmer parameters (possibly due to another failure): image=dummy.bin, Error: Programmer initialization failed $ flashrom -p dummy:image=dummy.bin,emulate=SST25VF040.REMS -c SST25LF040A -w ${IMG} ... Erasing and writing flash chip... Erase/write done. Verifying flash... VERIFIED. $ man flashrom ... * Dummy vendor VARIABLE_SIZE SPI flash chip (configurable size, page write) Example: flashrom -p dummy:emulate=SST25VF040.REMS To use VARIABLE_SIZE chip, size must be specified to configure the size of the flash chip as a power of two. Example: flashrom -p dummy:emulate=VARIABLE_SIZE,size=16777216,image=dummy.bin ... Signed-off-by: Namyoon Woo <namyoon@google.com> Change-Id: Ie6481943a831b946a91b643b4d79e684c27e48b8 Reviewed-on: https://review.coreboot.org/c/flashrom/+/46536 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'flashrom.8.tmpl')
-rw-r--r--flashrom.8.tmpl11
1 files changed, 11 insertions, 0 deletions
diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl
index db50d5954..02f60dc9b 100644
--- a/flashrom.8.tmpl
+++ b/flashrom.8.tmpl
@@ -646,8 +646,19 @@ vendor):
.sp
.RB "* Macronix " MX25L6436 " SPI flash chip (8192 kB, RDID, SFDP)"
.sp
+.RB "* Dummy vendor " VARIABLE_SIZE " SPI flash chip (configurable size, page write)"
+.sp
Example:
.B "flashrom -p dummy:emulate=SST25VF040.REMS"
+.sp
+To use
+.B VARIABLE_SIZE
+chip,
+.B size
+must be specified to configure the size of the flash chip as a power of two.
+.sp
+Example:
+.B "flashrom -p dummy:emulate=VARIABLE_SIZE,size=16777216,image=dummy.bin"
.TP
.B Persistent images
.sp