Attention is currently required from: Matt DeVillier.
Anastasia Klimchuk has posted comments on this change by Matt DeVillier. ( https://review.coreboot.org/c/flashrom/+/85160?usp=email )
Change subject: cli_classic: Add option to use first detected chip if multiple found
......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
Comment to the patch in general:
1) this needs update of the manpage, the source is at doc/classic_cli_manpage.rst
This source will generate manpage, and also a webpage https://flashrom.org/classic_cli_manpage.html
We have doc how to update docs: https://flashrom.org/how_to_add_docs.html
2) this needs to be added to the doc of Recent Development doc/release_notes/devel.rst
Now is the special time we prepare new release, so devel.rst is being modified in CB:85156
Given that you have another patch, which also changed command line options, perhaps you can do a separate patch with both features explained? But keep in mind there is CB:85156 in flight
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/85160/comment/09288e46_0b7c71b5?us… :
PS2, Line 133: " --use-first-chip in cases where multiple chips are detected, use the first one found\n"
This is potentially dangerous option: because same IDs can be not only between the chips in the same family. It could be same IDs for the chips in unrelated families, and even from different vendors. This feature can result in flashrom thinking it is processing an entirely different chip, not the one it actually is.
Usually in such situation we want to protect the users from accidentally using the feature. You can never fully protect, but at least to some extent. Basically, we want to only the people who know exactly what they are doing, to use the feature.
The approach used in the similar cases in the past was:
1) make default option safe (you did this already)
2) make the option name very scary, so that no one uses it out of curiosity
Existing examples of 2) are options such as `allow_brick` and `force_I_want_a_brick`
This comment is about naming: we need to come up a name that's scary enough.
I will be thinking about it on the background, but maybe you can think too :) If you have ideas, please tell!
--
To view, visit https://review.coreboot.org/c/flashrom/+/85160?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I0427b1ef80e4eca16623f0fc9119d79f7dd62551
Gerrit-Change-Number: 85160
Gerrit-PatchSet: 2
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Comment-Date: Sat, 16 Nov 2024 12:05:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Anastasia Klimchuk has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/52362?usp=email )
Change subject: cli_classic.c: Make -r/-w/-v argument optional
......................................................................
Abandoned
The work continues in CB:85159
--
To view, visit https://review.coreboot.org/c/flashrom/+/52362?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: abandon
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I15384b92cb987a6ea1bb4369ef415488b9cf7f41
Gerrit-Change-Number: 52362
Gerrit-PatchSet: 23
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Attention is currently required from: Peter Marheine.
Hello Peter Marheine, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/85156?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: doc: Release notes for v1.5.0
......................................................................
doc: Release notes for v1.5.0
Change-Id: I0663779020e84cd6d89d33f23a7b5514f8efa2f4
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
M doc/release_notes/devel.rst
M doc/release_notes/index.rst
A doc/release_notes/v_1_5.rst
3 files changed, 240 insertions(+), 186 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/56/85156/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/85156?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I0663779020e84cd6d89d33f23a7b5514f8efa2f4
Gerrit-Change-Number: 85156
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Attention is currently required from: Matt DeVillier.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/85160?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by build bot (Jenkins)
Change subject: cli_classic: Add option to use first detected chip if multiple found
......................................................................
cli_classic: Add option to use first detected chip if multiple found
In many cases, when flashrom detects multiple chips, it is simply unable
to distinguish between similar chips in the same family (eg, W25Q64).
In these instances, we may want to programmatically use the first chip
found, so add a parameter enabling this.
TEST=read flash on google/link with --use-first-chip option, which
previously required specifying the chip using -c.
Change-Id: I0427b1ef80e4eca16623f0fc9119d79f7dd62551
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
---
M cli_classic.c
1 file changed, 20 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/60/85160/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/85160?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I0427b1ef80e4eca16623f0fc9119d79f7dd62551
Gerrit-Change-Number: 85160
Gerrit-PatchSet: 2
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/85160?usp=email )
Change subject: cli_classic: Add option to use first detected chip if multiple found
......................................................................
cli_classic: Add option to use first detected chip if multiple found
In many cases, when flashrom detects multiple chips, it is simply unable
to distinguish between similar chips in the same family (eg, W25Q64).
In these instances, we may want to programmatically use the first chip
found, so add a parameter enabling this.
TEST=read flash on google/link with --use-first-chip option, which
previously required specifying the chip using -c.
Change-Id: I0427b1ef80e4eca16623f0fc9119d79f7dd62551
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
---
M cli_classic.c
1 file changed, 20 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/60/85160/1
diff --git a/cli_classic.c b/cli_classic.c
index 8f37019..280e632 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -51,6 +51,7 @@
OPTION_WP_LIST,
OPTION_PROGRESS,
OPTION_SACRIFICE_RATIO,
+ OPTION_USE_FIRST_CHIP
#if CONFIG_RPMC_ENABLED == 1
OPTION_RPMC_READ_DATA,
OPTION_RPMC_WRITE_ROOT_KEY,
@@ -90,6 +91,7 @@
char *referencefile;
const char *chip_to_probe;
int sacrifice_ratio;
+ bool use_first_chip;
#if CONFIG_RPMC_ENABLED == 1
bool rpmc_read_data;
@@ -106,7 +108,7 @@
static void cli_classic_usage(const char *name)
{
printf("Usage: %s [-h|-R|-L|"
- "\n\t-p <programmername>[:<parameters>] [-c <chipname>]\n"
+ "\n\t-p <programmername>[:<parameters>] [-c <chipname>| --use-first-chip]\n"
"\t\t(--flash-name|--flash-size|\n"
"\t\t [-E|-x|(-r|-w|-v) <file>]\n"
"\t\t [(-l <layoutfile>|--ifd| --fmap|--fmap-file <file>) [-i <region>[:<file>]]...]\n"
@@ -128,6 +130,7 @@
" -N | --noverify-all verify included regions only (cf. -i)\n"
" -x | --extract extract regions to files\n"
" -l | --layout <layoutfile> read ROM layout from <layoutfile>\n"
+ " --use-first-chip in cases where multiple chips are detected, use the first one found\n"
" --wp-disable disable write protection\n"
" --wp-enable enable write protection\n"
" --wp-list list supported write protection ranges\n"
@@ -971,6 +974,9 @@
/* It is okay to convert invalid input to 0. */
options->sacrifice_ratio = atoi(optarg);
break;
+ case OPTION_USE_FIRST_CHIP:
+ options->use_first_chip = true;
+ break;
#if CONFIG_RPMC_ENABLED == 1
case OPTION_RPMC_READ_DATA:
options->rpmc_read_data = true;
@@ -1068,6 +1074,7 @@
{"output", 1, NULL, 'o'},
{"progress", 0, NULL, OPTION_PROGRESS},
{"sacrifice-ratio", 1, NULL, OPTION_SACRIFICE_RATIO},
+ {"use-first-chip", 0, NULL, OPTION_USE_FIRST_CHIP},
#if CONFIG_RPMC_ENABLED == 1
{"get-rpmc-status", 0, NULL, OPTION_RPMC_READ_DATA},
{"write-root-key", 0, NULL, OPTION_RPMC_WRITE_ROOT_KEY},
@@ -1196,13 +1203,18 @@
}
if (chipcount > 1) {
- msg_cinfo("Multiple flash chip definitions match the detected chip(s): \"%s\"",
- flashes[0].chip->name);
- for (i = 1; i < chipcount; i++)
- msg_cinfo(", \"%s\"", flashes[i].chip->name);
- msg_cinfo("\nPlease specify which chip definition to use with the -c <chipname> option.\n");
- ret = 1;
- goto out_shutdown;
+ if (options.use_first_chip) {
+ chipcount = 1;
+ startchip = 1;
+ } else {
+ msg_cinfo("Multiple flash chip definitions match the detected chip(s): \"%s\"",
+ flashes[0].chip->name);
+ for (i = 1; i < chipcount; i++)
+ msg_cinfo(", \"%s\"", flashes[i].chip->name);
+ msg_cinfo("\nPlease specify which chip definition to use with the -c <chipname> option.\n");
+ ret = 1;
+ goto out_shutdown;
+ }
} else if (!chipcount) {
msg_cinfo("No EEPROM/flash device found.\n");
if (!options.force || !options.chip_to_probe) {
--
To view, visit https://review.coreboot.org/c/flashrom/+/85160?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I0427b1ef80e4eca16623f0fc9119d79f7dd62551
Gerrit-Change-Number: 85160
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/85159?usp=email )
Change subject: cli_classic.c: Make -r/-w/-v argument optional
......................................................................
cli_classic.c: Make -r/-w/-v argument optional
Makes filename optional from -r/-w/-v since the -i parameter allows
the image to be written to be sourced from multiple files, and regions
to be read from flash and written to separate image files.
Based on https://review.coreboot.org/c/flashrom/+/52362.
TEST=verify read/write/verify operations successful when specifying
the filename only after the region.
Change-Id: I6eba095d478f1a7bdbc3854627a656f93dd9e452
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
---
M cli_classic.c
M include/layout.h
M layout.c
3 files changed, 94 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/59/85159/1
diff --git a/cli_classic.c b/cli_classic.c
index 8f37019..bb42917 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -108,17 +108,17 @@
printf("Usage: %s [-h|-R|-L|"
"\n\t-p <programmername>[:<parameters>] [-c <chipname>]\n"
"\t\t(--flash-name|--flash-size|\n"
- "\t\t [-E|-x|(-r|-w|-v) <file>]\n"
+ "\t\t [-E|-x|(-r|-w|-v) [<file>]]\n"
"\t\t [(-l <layoutfile>|--ifd| --fmap|--fmap-file <file>) [-i <region>[:<file>]]...]\n"
"\t\t [-n] [-N] [-f])]\n"
"\t[-V[V[V]]] [-o <logfile>]\n\n", name);
printf(" -h | --help print this help text\n"
" -R | --version print version (release)\n"
- " -r | --read <file> read flash and save to <file>\n"
- " -w | --write (<file>|-) write <file> or the content provided\n"
+ " -r | --read [<file>] read flash and save to <file>\n"
+ " -w | --write [<file>|-] write <file> or the content provided\n"
" on the standard input to flash\n"
- " -v | --verify (<file>|-) verify flash against <file>\n"
+ " -v | --verify [<file>|-] verify flash against <file>\n"
" or the content provided on the standard input\n"
" -E | --erase erase flash memory\n"
" -V | --verbose more verbose output\n"
@@ -616,6 +616,23 @@
return 0;
}
+static char *get_optional_filename(char *argv[])
+{
+ char *filename = NULL;
+
+ /* filename was supplied in optarg (i.e. -rfilename) */
+ if (optarg != NULL)
+ filename = strdup(optarg);
+ /* filename is on optind if it is not another flag (i.e. -r filename)
+ * - is treated as stdin, so we still strdup in this case
+ */
+ else if (optarg == NULL && argv[optind] != NULL &&
+ (argv[optind][0] != '-' || argv[optind][1] == '\0'))
+ filename = strdup(argv[optind++]);
+
+ return filename;
+}
+
static int do_read(struct flashctx *const flash, const char *const filename)
{
int ret;
@@ -663,8 +680,10 @@
}
/* Read '-w' argument first... */
- if (read_buf_from_file(newcontents, flash_size, filename))
- goto _free_ret;
+ if (filename) {
+ if (read_buf_from_file(newcontents, flash_size, filename))
+ goto _free_ret;
+ }
/*
* ... then update newcontents with contents from files provided to '-i'
* args if needed.
@@ -697,8 +716,10 @@
}
/* Read '-v' argument first... */
- if (read_buf_from_file(newcontents, flash_size, filename))
- goto _free_ret;
+ if (filename) {
+ if (read_buf_from_file(newcontents, flash_size, filename))
+ goto _free_ret;
+ }
/*
* ... then update newcontents with contents from files provided to '-i'
* args if needed.
@@ -773,12 +794,12 @@
switch (opt) {
case 'r':
cli_classic_validate_singleop(&operation_specified);
- options->filename = strdup(optarg);
+ options->filename = get_optional_filename(argv);
options->read_it = true;
break;
case 'w':
cli_classic_validate_singleop(&operation_specified);
- options->filename = strdup(optarg);
+ options->filename = get_optional_filename(argv);
options->write_it = true;
break;
case 'v':
@@ -787,7 +808,7 @@
if (options->dont_verify_it) {
cli_classic_abort_usage("--verify and --noverify are mutually exclusive. Aborting.\n");
}
- options->filename = strdup(optarg);
+ options->filename = get_optional_filename(argv);
options->verify_it = true;
break;
case 'n':
@@ -1033,12 +1054,12 @@
int ret = 0;
struct cli_options options = { 0 };
- static const char optstring[] = "r:Rw:v:nNVEfc:l:i:p:Lzho:x";
+ static const char optstring[] = "r::Rw::v::nNVEfc:l:i:p:Lzho:x";
static const struct option long_options[] = {
- {"read", 1, NULL, 'r'},
- {"write", 1, NULL, 'w'},
+ {"read", 2, NULL, 'r'},
+ {"write", 2, NULL, 'w'},
{"erase", 0, NULL, 'E'},
- {"verify", 1, NULL, 'v'},
+ {"verify", 2, NULL, 'v'},
{"noverify", 0, NULL, 'n'},
{"noverify-all", 0, NULL, 'N'},
{"extract", 0, NULL, 'x'},
@@ -1098,7 +1119,7 @@
parse_options(argc, argv, optstring, long_options, &options);
- if ((options.read_it | options.write_it | options.verify_it) && check_filename(options.filename, "image"))
+ if (options.filename && check_filename(options.filename, "image"))
cli_classic_abort_usage(NULL);
if (options.layoutfile && check_filename(options.layoutfile, "layout"))
cli_classic_abort_usage(NULL);
@@ -1316,6 +1337,49 @@
goto out_shutdown;
}
+ /*
+ * Common rules for -r/-w/-v syntax parsing:
+ * - If no filename is specified at all, quit.
+ * - If no filename is specified for -r/-w/-v, but files are specified
+ * for -i, then the number of file arguments for -i options must be
+ * equal to the total number of -i options.
+ *
+ * Rules for reading:
+ * - If files are specified for -i args but not -r, do partial reads for
+ * each -i arg, creating a new file for each region. Each -i option
+ * must specify a filename.
+ * - If filenames are specified for -r and -i args, then:
+ * - Do partial read for each -i arg, creating a new file for
+ * each region where a filename is provided (-i region:filename).
+ * - Create a ROM-sized file with partially filled content. For each
+ * -i arg, fill the corresponding offset with content from ROM.
+ *
+ * Rules for writing and verifying:
+ * - If files are specified for both -w/-v and -i args, -i files take
+ * priority.
+ * - If file is specified for -w/-v and no files are specified with -i
+ * args, then the file is to be used for writing/verifying the entire
+ * ROM.
+ * - If files are specified for -i args but not -w, do partial writes
+ * for each -i arg. Likewise for -v and -i args. All -i args must
+ * supply a filename. Any omission is considered ambiguous.
+ * - Regions with a filename associated must not overlap. This is also
+ * considered ambiguous. Note: This is checked later since it requires
+ * processing the layout/fmap first.
+ */
+ if ((options.read_it | options.write_it | options.verify_it) && !options.filename) {
+ if (!options.include_args) {
+ msg_gerr("Error: No image file specified.\n");
+ ret = 1;
+ goto out_shutdown;
+ }
+
+ if (check_include_args_filename(options.include_args)) {
+ ret = 1;
+ goto out_shutdown;
+ }
+ }
+
if (options.flash_name) {
if (fill_flash->chip->vendor && fill_flash->chip->name) {
printf("vendor=\"%s\" name=\"%s\"\n",
diff --git a/include/layout.h b/include/layout.h
index d03a15b..ce3dd4b 100644
--- a/include/layout.h
+++ b/include/layout.h
@@ -69,6 +69,7 @@
int register_include_arg(struct layout_include_args **, const char *arg);
int process_include_args(struct flashrom_layout *, const struct layout_include_args *);
+int check_include_args_filename(const struct layout_include_args *);
void cleanup_include_args(struct layout_include_args **);
const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t);
diff --git a/layout.c b/layout.c
index e46e61a..5386de8 100644
--- a/layout.c
+++ b/layout.c
@@ -288,6 +288,19 @@
return 0;
}
+int check_include_args_filename(const struct layout_include_args *include_args)
+{
+ const struct layout_include_args *arg;
+ for (arg = include_args; arg; arg = arg->next) {
+ if (!arg->file || (arg->file[0] == '\0')) {
+ fprintf(stderr, "Error: No region file specified.\n");
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
/* returns boolean 1 if any regions overlap, 0 otherwise */
int included_regions_overlap(const struct flashrom_layout *const l)
{
--
To view, visit https://review.coreboot.org/c/flashrom/+/85159?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I6eba095d478f1a7bdbc3854627a656f93dd9e452
Gerrit-Change-Number: 85159
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Attention is currently required from: Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/85156?usp=email )
Change subject: doc: Release notes for v1.5.0
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
It's almost the same as devel.rst, few small diffs:
1) few lines in chip model support, from recent two weeks
2) few lines in Misc, from recent two weeks
3) re-structure: gathered all new features under New Features section
--
To view, visit https://review.coreboot.org/c/flashrom/+/85156?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I0663779020e84cd6d89d33f23a7b5514f8efa2f4
Gerrit-Change-Number: 85156
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Fri, 15 Nov 2024 09:40:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/85156?usp=email )
Change subject: doc: Release notes for v1.5.0
......................................................................
doc: Release notes for v1.5.0
Change-Id: I0663779020e84cd6d89d33f23a7b5514f8efa2f4
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
M doc/release_notes/devel.rst
M doc/release_notes/index.rst
A doc/release_notes/v_1_5.rst
3 files changed, 237 insertions(+), 186 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/56/85156/1
diff --git a/doc/release_notes/devel.rst b/doc/release_notes/devel.rst
index 7b21a99..bb2b73d 100644
--- a/doc/release_notes/devel.rst
+++ b/doc/release_notes/devel.rst
@@ -16,189 +16,3 @@
not currently supported.
https://ticket.coreboot.org/issues/370
-
-Build only supported with Meson
-===============================
-
-As documented in the :doc:`v1.4 release notes <v_1_4>`, support for building
-flashrom with make has been removed; all Makefiles have been deleted. Meson is
-now the only supported tool for building flashrom from source.
-
-New Feature
-===========
-
-Libpci 3.13.0 and onwards support ECAM to access pci registers. Flashrom will
-be moved to ECAM from IO port 0xcf8/0xcfc if the libpci version is >= 3.13.0.
-The ECAM has been supported for a very long time, most platforms should support
-it. For those platforms don't support ECAM, libpci will terminate the process by
-exit.
-
-Progress display
-================
-
-Progress display feature is now working for all operations: read, erase, write.
-
-Command-line option to sacrifice unchanged blocks for speed
-===========================================================
-
-New command line option ``sacrifice-ratio`` handles the following situation:
-
-There is a region which is requested to be erased (or written, because
-the write operation uses erase too). Some of the areas inside this
-region don't need to be erased, because the bytes already have expected
-value. Such areas can be skipped.
-
-The logic selects eraseblocks that can cover the areas which need to be
-erased. Suppose there is a region which is partially covered by
-eraseblocks of size S (partially because remaining areas don't need to
-be erased). Now suppose we can cover the whole region with eraseblock
-of larger size, S+1, and erase it all at once. This will run faster:
-erase opcode will only be sent once instead of many smaller opcodes.
-However, this will run erase over some areas of the chip memory that
-didn't need to be erased. Which means the physical chip will wear out
-faster.
-
-This new option sets the maximum % of memory that is allowed for
-redundant erase. Default is 0, S+1 size block only selected if all the
-area needs to be erased in full. 50 means that if more than a half of
-the area needs to be erased, a S+1 size block can be selected to cover
-the entire area with one block.
-
-The tradeoff is the speed of programming operation VS the longevity of
-the chip. Default is longevity.
-
-RPMC support added
-==================
-
-Adding support for RPMC commands as specified by JESD260 to the cli_client. Main
-implementation is in rpmc.c. Also adds new parsing capabilities for the sfdp
-page carrying the necessary information. All the features are optional and
-depend on libcrypto.
-It currently uses automatic feature detection through the corresponding
-sfdp page.
-
-Programmer updates
-===================
-
-* ch347_spi: Add spi clock frequency selection ("spispeed" option)
-* dummyflasher: Enable higher frequency emulation, add docs and tests
-* ichspi: Change the opcode position for reprogramming on the fly 2->4
-* ichspi: Merge spi_master implementations for Intel ich
-
-Bugs fixed
-==========
-
-* Modified bytes would sometimes not be verified after writing
-
- In some situations an off-by-one error would cause the last byte
- of memory that was modified by an operation to not be verified.
- This could prevent some erase or write errors from being detected,
- or in other cases could make verification appear false-negative.
-
- Fixed by https://review.coreboot.org/c/flashrom/+/84078.
-
-* Possible crashes while preparing erase operations
-
- An out-of-bounds memory read was found in the algorithm that selects methods
- to erase memory, which could cause flashrom to crash. This issue was first
- introduced in release 1.4, and crashes were observed when running on OpenBSD.
-
- See https://ticket.coreboot.org/issues/555, and fixed by
- https://review.coreboot.org/c/flashrom/+/84234.
-
-* Crash when attempting to erase FEATURE_NO_ERASE chips
-
- When attempting to erase a chip that doesn't need to be erased before
- being written, flashrom could attempt to read through a null pointer
- and crash. The only supported chip that is affected is the M95M02
- EEPROM.
-
- See https://ticket.coreboot.org/issues/553, and fixed by
- https://review.coreboot.org/c/flashrom/+/84203.
-
-* install failures related to libcmocka
-
- In some configurations, the install target provided by the buildsystem (like
- meson install) would fail to execute successfully due to a missing libcmocka
- file. This is fixed by not installing libcmocka, because it is a third-party
- library used by flashrom only for testing.
-
- See https://ticket.coreboot.org/issues/561, and fixed by
- https://review.coreboot.org/c/flashrom/+/84557.
-
-* Excess erase of automatically-probed chips on Intel chipsets
-
- When erasing some chips using the ichspi programmer (for Intel ICH chipsets),
- the entire chip would be erased and rewritten even when the hardware supported
- erasing smaller blocks, causing operations to take longer to complete and
- negatively impacting chip longevity. This issue was first introduced in version
- 1.4.
-
- See https://ticket.coreboot.org/issues/556, and fixed by
- https://review.coreboot.org/c/flashrom/+/84253.
-
-* Unnecessary erases
-
- When erasing parts of a memory, some blocks could be erased and rewritten
- unnecessarily or erased multiple times which could hurt the longevity of
- the memory chip. This behavior was introduced in version 1.4.
-
- Fixed by https://review.coreboot.org/c/flashrom/+/84614 and
- https://review.coreboot.org/c/flashrom/+/84686.
-
-Chipset support
-===============
-
-Added Raptor Point PCH support.
-
-Chip model support added
-========================
-
-* FM25Q04
-* FM25Q64
-* FM25Q128
-
-* GD25B128E
-* GD25B256E
-* GD25B512MF
-* GD25F64F
-* GD25F256F
-* GD25R128E
-* GD25R256E
-* GD25R512MF
-* GD25LB256F
-* GD25LB512ME
-* GD25LB512MF
-* GD25LR256F
-* GD25LR512MF
-* GD25LF256F
-* GD25LF512MF
-
-* MX25U25645G
-* MX77U51250F
-
-* W25Q32JV_M
-
-* XM25LU64C
-* XM25QH32C
-* XM25QH32D
-* XM25QH64D
-* XM25QH128D
-* XM25QH256D
-* XM25QH512C
-* XM25QH512D
-* XM25QU16C
-* XM25QU32C
-* XM25QU128D
-* XM25QU256D
-* XM25QU512C
-* XM25QU512D
-
-Misc
-=========
-
-* reduce DELAY_MINIMUM_SLEEP_US to 100 by default
-* tests: Add assert for eraseblocks order of invocations for write op
-* VERSION: Change name pattern to match tag name from now on
-* writeprotect: Fix inaccurate return code
-* erasure_layout: Fix unreachable error message
diff --git a/doc/release_notes/index.rst b/doc/release_notes/index.rst
index fe12d34..ea48b1f 100644
--- a/doc/release_notes/index.rst
+++ b/doc/release_notes/index.rst
@@ -5,5 +5,6 @@
:maxdepth: 1
devel
+ v_1_5
v_1_4
v_1_3
diff --git a/doc/release_notes/v_1_5.rst b/doc/release_notes/v_1_5.rst
new file mode 100644
index 0000000..99e33a0
--- /dev/null
+++ b/doc/release_notes/v_1_5.rst
@@ -0,0 +1,236 @@
+====================
+v1.5 (Dec 2024)
+====================
+
+This document describes the major changes in flashrom version v1.5.0,
+from more than 80 patches contributed by more than 20 authors (thank you!).
+
+And we all did it in just ~4 months since previous release.
+
+Download
+========
+
+flashrom v1.5.0 can be downloaded in various ways:
+
+Anonymous checkout from the git repository at https://review.coreboot.org/flashrom.git
+(tag v1.5.0)
+
+A tarball is available for download at <TODO add tarball>
+(signature <TODO add signature>)
+
+fingerprint: <TODO add fingerprint>
+
+Known issues
+============
+
+AMD-based PCs with FCH are unable to read flash contents for internal (BIOS
+flash) chips larger than 16 MB, and attempting to do so may crash the system.
+Systems with AMD "Promontory" IO extenders (mostly "Zen" desktop platforms) are
+not currently supported.
+
+https://ticket.coreboot.org/issues/370
+
+Build only supported with Meson
+===============================
+
+As documented in the :doc:`v1.4 release notes <v_1_4>`, support for building
+flashrom with make has been removed; all Makefiles have been deleted. Meson is
+now the only supported tool for building flashrom from source.
+
+New Features
+============
+
+Support for ECAM
+----------------
+
+Libpci 3.13.0 and onwards support ECAM to access pci registers. flashrom will
+be moved to ECAM from IO port 0xcf8/0xcfc if the libpci version is >= 3.13.0.
+The ECAM has been supported for a very long time, most platforms should support
+it. For those platforms don't support ECAM, libpci will terminate the process by
+exit.
+
+Progress bar
+------------
+
+Progress bar feature is now working for all operations: read, erase, write.
+
+To display progress bar, add ``--progress`` option on the command line.
+
+Option to choose between speed and longevity of the chip
+--------------------------------------------------------
+
+New command line option ``--sacrifice-ratio`` handles the following situation:
+
+There is a region which is requested to be erased (or written, because
+the write operation uses erase too). Some of the areas inside this
+region don't need to be erased, because the bytes already have expected
+value. Such areas can be skipped.
+
+The logic selects eraseblocks that can cover the areas which need to be
+erased. Suppose there is a region which is partially covered by
+eraseblocks of size S (partially because remaining areas don't need to
+be erased). Now suppose we can cover the whole region with eraseblock
+of larger size, S+1, and erase it all at once. This will run faster:
+erase opcode will only be sent once instead of many smaller opcodes.
+However, this will run erase over some areas of the chip memory that
+didn't need to be erased. Which means the physical chip will wear out
+faster.
+
+This new option sets the maximum % of memory that is allowed for
+redundant erase. Default is 0, S+1 size block only selected if all the
+area needs to be erased in full. 50 means that if more than a half of
+the area needs to be erased, a S+1 size block can be selected to cover
+the entire area with one block.
+
+The tradeoff is the speed of programming operation VS the longevity of
+the chip. Default is longevity.
+
+RPMC support added
+------------------
+
+Adding support for RPMC commands as specified by JESD260 to the cli_client.
+
+Main implementation is in ``rpmc.c``. Also adds new parsing capabilities for the SFDP
+page carrying the necessary information. All the features are optional and
+depend on ``libcrypto``.
+
+It currently uses automatic feature detection through the corresponding
+SFDP page.
+
+Programmer updates
+==================
+
+* ch347_spi: Add spi clock frequency selection (``spispeed`` option)
+* dummyflasher: Enable higher frequency emulation, add docs and tests
+* ichspi: Change the opcode position for reprogramming on the fly 2->4
+* ichspi: Merge spi_master implementations for Intel ich
+
+Bugs fixed
+==========
+
+* Modified bytes would sometimes not be verified after writing
+
+ In some situations an off-by-one error would cause the last byte
+ of memory that was modified by an operation to not be verified.
+ This could prevent some erase or write errors from being detected,
+ or in other cases could make verification appear false-negative.
+
+ Fixed by https://review.coreboot.org/c/flashrom/+/84078.
+
+* Possible crashes while preparing erase operations
+
+ An out-of-bounds memory read was found in the algorithm that selects methods
+ to erase memory, which could cause flashrom to crash. This issue was first
+ introduced in release 1.4, and crashes were observed when running on OpenBSD.
+
+ See https://ticket.coreboot.org/issues/555, and fixed by
+ https://review.coreboot.org/c/flashrom/+/84234.
+
+* Crash when attempting to erase FEATURE_NO_ERASE chips
+
+ When attempting to erase a chip that doesn't need to be erased before
+ being written, flashrom could attempt to read through a null pointer
+ and crash. The only supported chip that is affected is the M95M02
+ EEPROM.
+
+ See https://ticket.coreboot.org/issues/553, and fixed by
+ https://review.coreboot.org/c/flashrom/+/84203.
+
+* install failures related to libcmocka
+
+ In some configurations, the install target provided by the buildsystem (like
+ meson install) would fail to execute successfully due to a missing libcmocka
+ file. This is fixed by not installing libcmocka, because it is a third-party
+ library used by flashrom only for testing.
+
+ See https://ticket.coreboot.org/issues/561, and fixed by
+ https://review.coreboot.org/c/flashrom/+/84557.
+
+* Excess erase of automatically-probed chips on Intel chipsets
+
+ When erasing some chips using the ichspi programmer (for Intel ICH chipsets),
+ the entire chip would be erased and rewritten even when the hardware supported
+ erasing smaller blocks, causing operations to take longer to complete and
+ negatively impacting chip longevity. This issue was first introduced in version
+ 1.4.
+
+ See https://ticket.coreboot.org/issues/556, and fixed by
+ https://review.coreboot.org/c/flashrom/+/84253.
+
+* Unnecessary erases
+
+ When erasing parts of a memory, some blocks could be erased and rewritten
+ unnecessarily or erased multiple times which could hurt the longevity of
+ the memory chip. This behavior was introduced in version 1.4.
+
+ Fixed by https://review.coreboot.org/c/flashrom/+/84614 and
+ https://review.coreboot.org/c/flashrom/+/84686.
+
+Chipset support
+===============
+
+Added Raptor Point PCH support.
+
+Chip model support added
+========================
+
+* FM25Q04
+* FM25Q64
+* FM25Q128
+
+* GD25B128E
+* GD25B256E
+* GD25B512MF
+* GD25F64F
+* GD25F128F
+* GD25F256F
+* GD25R128E
+* GD25R256E
+* GD25R512MF
+* GD25LB256F
+* GD25LB512ME
+* GD25LB512MF
+* GD25LR256F
+* GD25LR512MF
+* GD25LF256F
+* GD25LF512MF
+
+* MX25U25645G
+* MX77U51250F
+
+* W25Q32JV_M
+* W25R512NW
+* W74M51NW
+
+* XM25LU64C
+* XM25QH32C
+* XM25QH32D
+* XM25QH64D
+* XM25QH128D
+* XM25QH256D
+* XM25QH512C
+* XM25QH512D
+* XM25QU16C
+* XM25QU32C
+* XM25QU128D
+* XM25QU256D
+* XM25QU512C
+* XM25QU512D
+
+
+* S25FL256L marked as tested
+
+Misc
+=========
+
+* reduce DELAY_MINIMUM_SLEEP_US to 100 by default
+* tests: Add assert for eraseblocks order of invocations for write op
+* VERSION: Change name pattern to match tag name from now on
+* writeprotect: Fix inaccurate return code
+* erasure_layout: Fix unreachable error message
+* linux_mtd: fix build with clang >= 19
+* Extract usbdev declarations to a separate header
+* flashchips: Skip "WP untested" message for SFDP-capable chip
+* sfdp: Update the message shown when SFDP-capable chip is detected
+* build script: Add rpmc option to always be enabled on Jenkins
+* Rename cli_classic.h to a more adequate cli_getop.h
--
To view, visit https://review.coreboot.org/c/flashrom/+/85156?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I0663779020e84cd6d89d33f23a7b5514f8efa2f4
Gerrit-Change-Number: 85156
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Attention is currently required from: Anastasia Klimchuk.
Peter Marheine has posted comments on this change by Anastasia Klimchuk. ( https://review.coreboot.org/c/flashrom/+/85132?usp=email )
Change subject: VERSION: Update version to v1.5.0-rc1
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/85132?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I946526f3ee08f4c85cdc3ea3d589de9f2c2ef8ce
Gerrit-Change-Number: 85132
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 14 Nov 2024 22:40:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes