[flashrom] [commit] r1790 - trunk

repository service svn at flashrom.org
Sat May 10 11:25:44 CEST 2014


Author: stefanct
Date: Sat May 10 11:25:44 2014
New Revision: 1790
URL: http://flashrom.org/trac/flashrom/changeset/1790

Log:
Refine messages related to erase/write recovery.

We are more verbose inside erase_and_write_flash() although it does not
matter as much as at the end of the whole process in doit().

New output for the non-fatal (i.e. read-protected + successful recovery read) case:

Reading old flash chip contents... done.
Erasing and writing flash chip... spi_block_erase_d8 failed during command execution at address 0x8000
Reading current flash chip contents... done. spi_chip_erase_c7 failed during command execution
FAILED!
Uh oh. Erase/write failed. Checking if anything has changed.
Reading current flash chip contents... done.
Good, writing to the flash chip apparently didn't do anything.
Please check the connections (especially those to write protection pins) between
the programmer and the flash chip. If you think the error is caused by flashrom
please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom at flashrom.org, thanks!

Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>

Modified:
   trunk/flashrom.c

Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c	Fri May  9 23:16:21 2014	(r1789)
+++ trunk/flashrom.c	Sat May 10 11:25:44 2014	(r1790)
@@ -1521,7 +1521,7 @@
 
 static void nonfatal_help_message(void)
 {
-	msg_gerr("Writing to the flash chip apparently didn't do anything.\n");
+	msg_gerr("Good, writing to the flash chip apparently didn't do anything.\n");
 #if CONFIG_INTERNAL == 1
 	if (programmer == PROGRAMMER_INTERNAL)
 		msg_gerr("This means we have to add special support for your board, programmer or flash\n"
@@ -2008,16 +2008,18 @@
 
 	if (write_it) {
 		if (erase_and_write_flash(flash, oldcontents, newcontents)) {
-			msg_cerr("Uh oh. Erase/write failed. Checking if "
-				 "anything changed.\n");
+			msg_cerr("Uh oh. Erase/write failed. Checking if anything has changed.\n");
+			msg_cinfo("Reading current flash chip contents... ");
 			if (!flash->chip->read(flash, newcontents, 0, size)) {
+				msg_cinfo("done.\n");
 				if (!memcmp(oldcontents, newcontents, size)) {
-					msg_cinfo("Good. It seems nothing was changed.\n");
 					nonfatal_help_message();
 					ret = 1;
 					goto out;
 				}
-			}
+				msg_cerr("Apparently at least some data has changed.\n");
+			} else
+				msg_cerr("Can't even read anymore!\n");
 			emergency_help_message();
 			ret = 1;
 			goto out;




More information about the flashrom mailing list