some documentation updates by Uwe and some smaller ones by me.
authorStefan Reinauer <stepan@openbios.org>
Thu, 3 Aug 2006 10:49:09 +0000 (10:49 +0000)
committerStefan Reinauer <stepan@openbios.org>
Thu, 3 Aug 2006 10:49:09 +0000 (10:49 +0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2358 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

util/flashrom/README
util/flashrom/flash_rom.c
util/flashrom/flashrom.1

index fd91cb6f5504b9a3d2da19aa557be02fa712d39c..32c401aa28e0d19e1ef184362234b3a5ccdd86c4 100644 (file)
@@ -13,21 +13,21 @@ installed on your linux system:
 usage
 -----
 
-usage: ./flashrom [-rwvE] [-V] [-c chipname] 
-                           [-s exclude_start] [-e exclude_end] [file]
-
-   -r | --read:   read flash and save into file
-   -w | --write:  write file into flash (default when file is specified)
-   -v | --verify: verify flash against file
-   -E | --erase: Erase flash device
-   -V | --verbose: more verbose output
-
-   -c | --chip <chipname>: probe only for specified flash chip
-   -s | --estart <addr>: exclude start position
-   -e | --eend <addr>: exclude end postion
+usage: ./flashrom [-rwvEVfh] [-c chipname] [-s exclude_start]
+       [-e exclude_end] [-m vendor:part] [-l file.layout] [-i imagename] [file]
+   -r | --read:                    read flash and save into file
+   -w | --write:                   write file into flash (default when
+                                   file is specified)
+   -v | --verify:                  verify flash against file
+   -E | --erase:                   erase flash device
+   -V | --verbose:                 more verbose output
+   -c | --chip <chipname>:         probe only for specified flash chip
+   -s | --estart <addr>:           exclude start position
+   -e | --eend <addr>:             exclude end postion
    -m | --mainboard <vendor:part>: override mainboard settings
-   -l | --layout <file.layout>: read rom layout from file
-   -i | --image <name>: only flash image name from flash layout
+   -f | --force:                   force write without checking image
+   -l | --layout <file.layout>:    read rom layout from file
+   -i | --image <name>:            only flash image name from flash layout
 
  If no file is specified, then all that happens
  is that flash info is dumped and the flash chip is set to writable.
index 4245a8f92b028598b4ee40057287958747224b79..28ce567ff47f856b6827b50dc70994ad5c7afc5a 100644 (file)
@@ -51,7 +51,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
        unsigned long size;
 
        if ((fd_mem = open("/dev/mem", O_RDWR)) < 0) {
-               perror("Can not open /dev/mem");
+               perror("Error: Can not open /dev/mem. You need to be root.");
                exit(1);
        }
 
@@ -73,7 +73,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
                bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
                            fd_mem, (off_t) (0xffffffff - size + 1));
                if (bios == MAP_FAILED) {
-                       perror("Error MMAP /dev/mem");
+                       perror("Error: Can't mmap /dev/mem.");
                        exit(1);
                }
                flash->virt_addr = bios;
@@ -90,7 +90,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
                bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
                            fd_mem, (off_t) (0x9400000));
                if (bios == MAP_FAILED) {
-                       perror("Error MMAP /dev/mem");
+                       perror("Error: Can't mmap /dev/mem.");
                        exit(1);
                }
                flash->virt_addr = bios;
@@ -145,22 +145,24 @@ int verify_flash(struct flashchip *flash, uint8_t *buf)
 
 void usage(const char *name)
 {
-       printf("usage: %s [-rwvE] [-V] [-c chipname] [-s exclude_start] [-e exclude_end] [file]\n", name);
-       printf("   -r | --read:   read flash and save into file\n"
-              "   -w | --write:  write file into flash (default when file is specified)\n"
-              "   -v | --verify: verify flash against file\n"
-              "   -E | --erase: Erase flash device\n"
-              "   -V | --verbose: more verbose output\n\n"
-              "   -c | --chip <chipname>: probe only for specified flash chip\n"
-              "   -s | --estart <addr>: exclude start position\n"
-              "   -e | --eend <addr>: exclude end postion\n"
+       printf("usage: %s [-rwvEVfh] [-c chipname] [-s exclude_start]\n", name);
+       printf("       [-e exclude_end] [-m vendor:part] [-l file.layout] [-i imagename] [file]\n");
+       printf("   -r | --read:                    read flash and save into file\n"
+              "   -w | --write:                   write file into flash (default when\n"
+              "                                   file is specified)\n"
+              "   -v | --verify:                  verify flash against file\n"
+              "   -E | --erase:                   erase flash device\n"
+              "   -V | --verbose:                 more verbose output\n"
+              "   -c | --chip <chipname>:         probe only for specified flash chip\n"
+              "   -s | --estart <addr>:           exclude start position\n"
+              "   -e | --eend <addr>:             exclude end postion\n"
               "   -m | --mainboard <vendor:part>: override mainboard settings\n"
-              "   -f | --force: force write without checking image\n"
-              "   -l | --layout <file.layout>: read rom layout from file\n"
-              "   -i | --image <name>: only flash image name from flash layout\n"
+              "   -f | --force:                   force write without checking image\n"
+              "   -l | --layout <file.layout>:    read rom layout from file\n"
+              "   -i | --image <name>:            only flash image name from flash layout\n"
               "\n"
               " If no file is specified, then all that happens\n"
-              " is that flash info is dumped\n\n");
+              " is that flash info is dumped.\n\n");
        exit(1);
 }
 
index 97369f8c97f69c382360ebada77edeb669ca4fb7..60821d05688c984102d6d8777da63e05bd290e1c 100644 (file)
@@ -1,10 +1,11 @@
+.\" Copyright (C) 2006 Uwe Hermann <uwe@hermann-uwe.de>.
+.\" This manpage is licensed under the terms of the GNU GPL.
 .TH FLASHROM 1 "July 26, 2006"
 .SH NAME
 flashrom \- the universal LinuxBIOS flash utility
 .SH SYNOPSIS
-.B flashrom \fR[\fB\-rwvEVflih\fR] [\fB\-c\fR chipname]
-         [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end]
-         [\fB-m\fR vendor:part] [file]
+.B flashrom \fR[\fB\-rwvEVfh\fR] [\fB\-c\fR chipname] [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end]
+         [\fB-m\fR vendor:part] [\fB-l\fR file.layout] [\fB-i\fR image_name] [file]
 .SH DESCRIPTION
 .B flashrom
 is the universal LinuxBIOS flash utility.
@@ -31,10 +32,10 @@ More verbose output.
 Probe only for specified flash chip.
 .PP
 .B "\-s, \-\-estart" <addr>
-Exclude start position.
+Exclude start position. (obsolete)
 .PP
-.B "\-e, \-\-eend" <addr>
-Exclude end postion.
+.B "\-e, \-\-eend" <addr> 
+Exclude end postion. (obsolete)
 .PP
 .B "\-m, \-\-mainboard" <vendor:part>
 Override mainboard settings.
@@ -42,7 +43,7 @@ Override mainboard settings.
 .B "\-f, \-\-force"
 Force write without checking image.
 .PP
-.B "\-l, \-\-layout"
+.B "\-l, \-\-layout" <layout.file>
 Read ROM layout from file.
 .PP
 .B "\-i, \-\-image" <name>
@@ -54,7 +55,7 @@ Show a help text and exit.
 .\".B "\-\-version"
 .\"Show version information and exit.
 .SH BUGS
-Please report any bugs at http://bugzilla.openbios.org/
+Please report any bugs at http://bugzilla.openbios.org/.
 .SH LICENCE
 .B flashrom
 is covered by the GNU General Public License (GPL).
@@ -63,17 +64,19 @@ is covered by the GNU General Public License (GPL).
 .SH COPYRIGHT
 2000 Silicon Integrated System Corporation
 .br
+2003 Niki W. Waibel
+.br
 2004 Tyan Corp
 .br
 2005-2006 coresystems GmbH
-.br
-2003 Niki W. Waibel
 .SH AUTHORS
-Yhlu <yinghai.lu@amd.com>
+Yinghai Lu <yinghai.lu@amd.com>
 .br
 Stefan Reinauer <stepan@coresystems.de>
 .br
 Niki W. Waibel <niki.waibel@gmx.net>
+.br
+some others 
 .PP
 This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>,
 for the Debian GNU/Linux system (but may be used by others).