Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Nikolai Artemiev, Peter Marheine.

Anastasia Klimchuk uploaded patch set #2 to this change.

View Change

[RFC] dummyflasher: Wire variable size feature via opaque infra

Wire "variable size" feature in dummy programmer via opaque
infra. This patch fixes the broken build with CONFIG_DUMMY=no.

Dummy registers both spi and opaque structs at the same time.
The reason why this combination is needed: opaque master is needed
to reuse opaque chip and fix the building with CONFIG_DUMMY=no, at
the same time spi master is needed to reuse existing functionality
in dummy_spi_send_command.

Fixes: https://ticket.coreboot.org/issues/365

TEST=the following scenarious run successfully

Testing build

$ make clean && make CONFIG_DUMMY=no
$ flashrom -h : dummy is not in the list
$ make clean && make CONFIG_EVERYTHING=yes
$ flashrom -h : dummy is in the list

Testing "variable size" feature

$ flashrom -p dummy:size=8388608,emulate=VARIABLE_SIZE -V
$ flashrom -p dummy:size=8388608,emulate=VARIABLE_SIZE -r /tmp/dump.bin -V
$ head -c 8388608 </dev/urandom >/tmp/image.bin
$ flashrom -p dummy:image=/tmp/image.bin,size=8388608,emulate=VARIABLE_SIZE -w /tmp/dump.bin -V

Testing standard flow

$ flashrom -p dummy:emulate=W25Q128FV -V
$ flashrom -p dummy:emulate=W25Q128FV -r /tmp/dump.bin -V
$ head -c 16777216 </dev/urandom >/tmp/image.bin
$ flashrom -p dummy:image=/tmp/image.bin,emulate=W25Q128FV -w /tmp/dump.bin -V

Change-Id: I76402bfdf8b1a75489e4509fec92c9a777d0cf58
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M dummyflasher.c
M flashchips.c
M include/chipdrivers.h
3 files changed, 109 insertions(+), 73 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/88/64488/2

To view, visit change 64488. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I76402bfdf8b1a75489e4509fec92c9a777d0cf58
Gerrit-Change-Number: 64488
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev@google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Felix Singer <felixsinger@posteo.net>
Gerrit-CC: Namyoon Woo <namyoon@google.com>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Thomas Heijligen <src@posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev@google.com>
Gerrit-Attention: Peter Marheine <pmarheine@chromium.org>
Gerrit-MessageType: newpatchset