From 744132af4b9f629716394f9c22f6add71cc73ef9 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 6 Jul 2010 09:55:48 +0000 Subject: Various places in the flashrom source feature custom parameter extraction from programmer_param This led to wildly differing syntax for programmer parameters, and it also voids pretty much every assumption you could make about programmer_param. The latter is a problem for libflashrom. Use extract_param everywhere, clean up related code and make it more foolproof. Add two instances of exit(1) where we have no option to return an error. Remove six instances of exit(1) where returning an error was possible. WARNING: This changes programmer parameter syntax for a few programmers! Corresponding to flashrom svn r1070. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Michael Karcher --- flashrom.8 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'flashrom.8') diff --git a/flashrom.8 b/flashrom.8 index d94df613..96aff5e4 100644 --- a/flashrom.8 +++ b/flashrom.8 @@ -183,7 +183,7 @@ translation unit)" .BR "* ft2232_spi" " (for SPI flash ROMs attached to a FT2232H/FT4232H based\ USB SPI programmer)" .sp -.BR "* serprog" " (for flash ROMs attached to Urja's AVR programmer)" +.BR "* serprog" " (for flash ROMs attached to a programmer speaking serprog)" .sp .BR "* buspirate_spi" " (for SPI flash ROMs attached to a Bus Pirate)" .sp @@ -296,22 +296,23 @@ dumb idea. .BR "dummy " programmer An optional parameter specifies the bus types it should support. For that you have to use the -.B "flashrom \-p dummy:type" +.B "flashrom \-p dummy:bus=[type[+type[+type]]]" syntax where .B type -can be any comma-separated combination of -.BR parallel ", " lpc ", " fwh ", " spi ", or " all -(in any order). +can be any of +.BR parallel ", " lpc ", " fwh ", " spi +in any order. If you specify bus without type, all buses will be disabled. +If you do not specify bus, all buses will be enabled. .sp Example: -.B "flashrom \-p dummy:lpc,fwh" +.B "flashrom \-p dummy:bus=lpc+fwh" .TP .BR "nic3com" , " nicrealtek" , " nicsmc1211" , " gfxnvidia" , " satasii \ " and " atahpt " programmers These programmers have an option to specify the PCI address of the card your want to use, which must be specified if more than one card supported by the selected programmer is installed in your system. The syntax is -.BR "flashrom \-p xxxx:bb:dd.f" , +.BR "flashrom \-p xxxx:pci=bb:dd.f" , where .B xxxx is the name of the programmer @@ -323,7 +324,7 @@ is the PCI device number, and is the PCI function number of the desired device. .sp Example: -.B "flashrom \-p nic3com:05:04.0" +.B "flashrom \-p nic3com:pci=05:04.0" .TP .BR "it87spi " programmer An optional @@ -342,7 +343,7 @@ is an I/O port number which must be a multiple of 8. An optional parameter specifies the controller type and interface/port it should support. For that you have to use the .sp -.B " flashrom \-p ft2232_spi:model,port=interface" +.B " flashrom \-p ft2232_spi:type=model,port=interface" .sp syntax where .B model @@ -363,11 +364,11 @@ device/baud combination or an IP/port combination for communication with the programmer. In the device/baud combination, the device has to start with a slash. For serial, you have to use the .sp -.B " flashrom \-p serprog:/dev/device:baud" +.B " flashrom \-p serprog:dev=/dev/device:baud" .sp syntax and for IP, you have to use .sp -.B " flashrom \-p serprog:ip:port" +.B " flashrom \-p serprog:ip=ipaddr:port" .sp instead. More information about serprog is available in .B serprog-protocol.txt -- cgit v1.2.3