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 13: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1073/ : SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/915/ : 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: 13
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: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 22 Jan 2018 08:19:01 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23025 )
Change subject: Modify test_v2.sh to work with upstream
......................................................................
Patch Set 7: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1075/ : SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/917/ : SUCCESS
--
To view, visit https://review.coreboot.org/23025
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: I9ace99fdb8d779804fe1887fe49f6409f8aff02e
Gerrit-Change-Number: 23025
Gerrit-PatchSet: 7
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 22 Jan 2018 08:19:01 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
David Hendricks has uploaded this change for review. ( https://review.coreboot.org/23353
Change subject: WIP: Add romentry flags and function to append a single layout entry
......................................................................
WIP: Add romentry flags and function to append a single layout entry
This is an experimental patch to make the partial writes work as
originally intended in patch 23022.
Currently, if no layout is specified then a fallback layout with an
entry covering the entire address space of the chip is used to write
to the chip. If a layout is specified then only the entries in the
layout are used. Consequently, "-i region:fill -w filename" is used
then the -w arg will be ignored.
This hopes to fix the latter case by appending the layout specified
by the user with an entry covering the entire chip when an argument
to '-w' is used.
One upside is that We can potentially get rid of the fallback layout
by using this mechanism to append a "complete chip" entry whenever
'-w' is used.
Signed-off-by: David Hendricks <david.hendricks(a)gmail.com>
Change-Id: I9eb4a7751681c639028d6854d877558daf59e567
---
M cli_classic.c
M layout.c
M layout.h
3 files changed, 46 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/53/23353/1
diff --git a/cli_classic.c b/cli_classic.c
index a1f1cad..09da268 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -554,6 +554,20 @@
if (layoutfile) {
layout = get_global_layout();
+
+ if (filename) {
+ struct romentry entry = {
+ .start = 0,
+ .end = fill_flash->chip->total_size * 1024 - 1,
+ .included = true,
+ .name = "complete flash",
+ .file = filename,
+ .flags = ROMENTRY_FLAG_IGNORE_OVERLAP,
+ };
+ if (append_layout(&entry))
+ goto out_shutdown;
+ }
+
} else if (ifd && (flashrom_layout_read_from_ifd(&layout, fill_flash, NULL, 0) ||
process_include_args(layout))) {
ret = 1;
diff --git a/layout.c b/layout.c
index 4912a33..0b17a1f 100644
--- a/layout.c
+++ b/layout.c
@@ -48,6 +48,30 @@
return &flashctx->fallback_layout.base;
}
+/* FIXME: read_romlayout() should probably be modified to call this */
+int append_layout(const struct romentry *entry)
+{
+ if (layout.num_entries >= MAX_ROMLAYOUT) {
+ msg_gerr("Cannot add any more layout entries.\n");
+ return 1;
+ }
+
+ layout.entries[layout.num_entries].start = entry->start;
+ layout.entries[layout.num_entries].end = entry->end;
+ layout.entries[layout.num_entries].included = entry->included;
+ strncpy(layout.entries[layout.num_entries].name,
+ entry->name, sizeof(layout.entries[layout.num_entries].name));
+ layout.entries[layout.num_entries].file = entry->file;
+ layout.entries[layout.num_entries].flags = entry->flags;
+ msg_gdbg("appended romlayout %08x - %08x named \"%s\"\n",
+ layout.entries[layout.num_entries].start,
+ layout.entries[layout.num_entries].end,
+ layout.entries[layout.num_entries].name);
+ layout.num_entries++;
+
+ return 0;
+}
+
#ifndef __LIBPAYLOAD__
int read_romlayout(const char *name)
{
@@ -243,6 +267,10 @@
if (l->entries[i].end < l->entries[j].start)
continue;
+ if ((l->entries[i].flags & ROMENTRY_FLAG_IGNORE_OVERLAP) ||
+ (l->entries[j].flags & ROMENTRY_FLAG_IGNORE_OVERLAP))
+ continue;
+
msg_gdbg("Regions %s [0x%08x-0x%08x] and "
"%s [0x%08x-0x%08x] overlap\n",
l->entries[i].name, l->entries[i].start,
diff --git a/layout.h b/layout.h
index 9131b06..881b85a 100644
--- a/layout.h
+++ b/layout.h
@@ -38,12 +38,15 @@
#define MAX_ROMLAYOUT 32
+#define ROMENTRY_FLAG_IGNORE_OVERLAP (1 << 0)
+
struct romentry {
chipoff_t start;
chipoff_t end;
bool included;
char name[256];
char *file;
+ unsigned int flags;
};
struct flashrom_layout {
@@ -62,6 +65,7 @@
struct flashrom_flashctx;
const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx);
+int append_layout(const struct romentry *const entry);
int process_include_args(struct flashrom_layout *);
int included_regions_overlap(const struct flashrom_layout *const flashrom_layout);
int get_num_include_args_with_files(const struct flashrom_layout *const layout);
--
To view, visit https://review.coreboot.org/23353
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9eb4a7751681c639028d6854d877558daf59e567
Gerrit-Change-Number: 23353
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Hello Carl-Daniel Hailfinger, Arthur Heymans, Nicola Corna, Paul Menzel, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23021
to look at the new patch set (#13).
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, 281 insertions(+), 37 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/23021/13
--
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: 13
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>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23025 )
Change subject: Modify test_v2.sh to work with upstream
......................................................................
Patch Set 6: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1070/ : SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/912/ : SUCCESS
--
To view, visit https://review.coreboot.org/23025
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: I9ace99fdb8d779804fe1887fe49f6409f8aff02e
Gerrit-Change-Number: 23025
Gerrit-PatchSet: 6
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 22 Jan 2018 01:38:55 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes