From 270237687a7f550e86c01548550f25b1d0a31d65 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Wed, 28 Apr 2010 15:22:14 +0000 Subject: One of the problems is that --force had multiple meanings - Force chip read by faking probe success. - Force chip access even if the chip is bigger than max decode size for the flash bus. - Force erase even if erase is known bad. - Force write even if write is known bad. - Force writing even if cbtable tells us that this is the wrong image for this board. This patch cleans up --force usage: - Remove any suggestions to use --force for probe/read from flashrom output. - Don't talk about "success" or "Found chip" if the chip is forced. - Add a new internal programmer parameter boardmismatch=force. This overrides any mismatch detection from cbtable/image comparisons. - Add a new internal programmer parameter laptop=force_I_want_a_brick. - Adjust the documentation for --force. - Clean up the man page a bit whereever it talks about --force or laptops. Additional changes in this patch: - Add warnings about laptops to the documentation. - Abort if a laptop is detected. Can be overridden with the programmer parameter mentioned above. - Add "Portable" to the list of DMI strings indicating laptops. - Check if a chip specified with -c is known to flashrom. - Programmer parameter reliability and consistency fixes. - More paranoid self-checks. - Improve documentation. Corresponding to flashrom svn r996. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Michael Karcher --- flashrom.8 | 55 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'flashrom.8') diff --git a/flashrom.8 b/flashrom.8 index 47e77d6..ab53ff8 100644 --- a/flashrom.8 +++ b/flashrom.8 @@ -61,7 +61,10 @@ Erase the flash ROM chip. More verbose output. .TP .B "\-c, \-\-chip" -Probe only for specified flash ROM chip. +Probe only for specified flash ROM chip. This option takes the chip name as +printed by +.B "flashrom \-L" +without the vendor name. Please note that the chip name is case sensitive. .TP .B "\-m, \-\-mainboard" <[vendor:]part> Override mainboard settings. @@ -77,11 +80,16 @@ a list of boards which require the specification of the board name, if no coreboot table is found. .TP .B "\-f, \-\-force" -Force write without checking whether the ROM image file is really meant -to be used on this board. +Force one or more of the following actions: .sp -Note: This check only works while coreboot is running, and only for those -boards where the coreboot code supports it. +* Force chip read and pretend the chip is there. +.sp +* Force chip access even if the chip is bigger than max decode size for\ + the flash bus. +.sp +* Force erase even if erase is known bad. +.sp +* Force write even if write is known bad. .TP .B "\-l, \-\-layout " Read ROM layout from @@ -135,7 +143,7 @@ Same as but outputs the supported hardware in MediaWiki syntax, so that it can be easily pasted into the wiki page at http://www.flashrom.org/. .TP -.B "\-p, \-\-programmer [:parameters]" +.B "\-p, \-\-programmer [:parameter[,parameter[,parameter]]]" Specify the programmer device. Currently supported are: .sp .BR "* internal" " (default, for in-system flashing in the mainboard)" @@ -220,6 +228,13 @@ has been written because it is known that writing/erasing without the board enable is going to fail. In any case (success or failure), please report to the flashrom mailing list, see below. .sp +On systems running coreboot, flashrom checks whether the desired image matches +your mainboard. This needs some special board ID to be present in the image. +If flashrom detects that the image you want to write and the current board +do not match, it will refuse to write the image unless you specify +.sp +.B "flashrom -p internal:boardmismatch=force" +.sp If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus translation, flashrom should autodetect that configuration. You can use .B "flashrom -p internal:it87spiport=portnum" @@ -228,6 +243,24 @@ syntax as explained in the programmer section to use a non-default port for controlling the IT87 series Super I/O. In the unlikely case flashrom doesn't detect an active IT87 LPC<->SPI bridge, you can try to force recognition by using the it87spi programmer. +.sp +Using flashrom on laptops is dangerous and may easily make your hardware +unusable (see also the BUGS section). The embedded controller (EC) in these +machines often interacts badly with flashing. http://www.flashrom.org/Laptops +has more information. If flash is shared with the EC, erase is guaranteed to +brick your laptop and write is very likely to brick your laptop. +Chip read and probe may irritate your EC and cause fan failure, backlight +failure, sudden poweroff, and other nasty effects. +flashrom will attempt to detect laptops and abort immediately for safety +reasons. +If you want to proceed anyway at your own risk, use +.sp +.B "flashrom -p internal:laptop=force_I_want_a_brick" +.sp +You have been warned. +.sp +We will not help you if you force flashing on a laptop because this is a really +dumb idea. .TP .BR "dummy " programmer An optional parameter specifies the bus types it @@ -315,8 +348,14 @@ flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem .SH BUGS Please report any bugs at .BR http://www.flashrom.org/trac/flashrom/newticket "," -or on the flashrom mailing list -.RB "(" http://www.flashrom.org/mailman/listinfo/flashrom ")." +or on the flashrom mailing list at +.BR http://www.flashrom.org/mailman/listinfo/flashrom "." +.sp +Using flashrom on laptops is dangerous and may easily make your hardware +unusable unless you can desolder the flash chip and have a full flash chip +backup. This is caused by the embedded controller (EC) present in many laptops, +which interacts badly with any flash attempts. This is a hardware limitation +and flashrom will attempt to detect it and abort immediately for safety reasons. .SH LICENCE .B flashrom is covered by the GNU General Public License (GPL), version 2. Some files are -- cgit v1.1