diff options
author | Daniel Campello <campello@chromium.org> | 2021-04-13 10:47:25 -0600 |
---|---|---|
committer | Edward O'Callaghan <quasisec@chromium.org> | 2021-04-27 23:41:53 +0000 |
commit | 45d50a101e8073191e6d88143990ed91d3bfe815 (patch) | |
tree | ae1493908fd9a015e09283c8af9609917a59288d /layout.h | |
parent | 3f19ba95f1ea2fbd83f96fe9aa3ee78651e33899 (diff) | |
download | flashrom-45d50a101e8073191e6d88143990ed91d3bfe815.tar.gz flashrom-45d50a101e8073191e6d88143990ed91d3bfe815.tar.bz2 flashrom-45d50a101e8073191e6d88143990ed91d3bfe815.zip |
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@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@student.tuwien.ac.at>
and Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@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@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Signed-off-by: Daniel Campello <campello@chromium.org>
Co-Authored-by: Edward O'Callaghan <quasisec@google.com>
Co-Authored-by: Daniel Campello <campello@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/23021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'layout.h')
-rw-r--r-- | layout.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -40,6 +40,7 @@ struct romentry { chipoff_t end; bool included; char *name; + char *file; }; struct flashrom_layout { @@ -56,6 +57,7 @@ struct single_layout { struct layout_include_args { char *name; + char *file; struct layout_include_args *next; }; @@ -66,5 +68,6 @@ const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const f int process_include_args(struct flashrom_layout *l, const struct layout_include_args *const args); const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t); const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *); +int included_regions_overlap(const struct flashrom_layout *const flashrom_layout); #endif /* !__LAYOUT_H__ */ |