some documentation updates by Uwe and some smaller ones by me.

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2358 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2006-08-03 10:49:09 +00:00
parent 085cb4b4ca
commit 9327d22641
3 changed files with 46 additions and 41 deletions

View File

@ -13,21 +13,21 @@ installed on your linux system:
usage usage
----- -----
usage: ./flashrom [-rwvE] [-V] [-c chipname] usage: ./flashrom [-rwvEVfh] [-c chipname] [-s exclude_start]
[-s exclude_start] [-e exclude_end] [file] [-e exclude_end] [-m vendor:part] [-l file.layout] [-i imagename] [file]
-r | --read: read flash and save into file
-r | --read: read flash and save into file -w | --write: write file into flash (default when
-w | --write: write file into flash (default when file is specified) file is specified)
-v | --verify: verify flash against file -v | --verify: verify flash against file
-E | --erase: Erase flash device -E | --erase: erase flash device
-V | --verbose: more verbose output -V | --verbose: more verbose output
-c | --chip <chipname>: probe only for specified flash chip
-c | --chip <chipname>: probe only for specified flash chip -s | --estart <addr>: exclude start position
-s | --estart <addr>: exclude start position -e | --eend <addr>: exclude end postion
-e | --eend <addr>: exclude end postion
-m | --mainboard <vendor:part>: override mainboard settings -m | --mainboard <vendor:part>: override mainboard settings
-l | --layout <file.layout>: read rom layout from file -f | --force: force write without checking image
-i | --image <name>: only flash image name from flash layout -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 If no file is specified, then all that happens
is that flash info is dumped and the flash chip is set to writable. is that flash info is dumped and the flash chip is set to writable.

View File

@ -51,7 +51,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
unsigned long size; unsigned long size;
if ((fd_mem = open("/dev/mem", O_RDWR)) < 0) { 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); exit(1);
} }
@ -73,7 +73,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED, bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
fd_mem, (off_t) (0xffffffff - size + 1)); fd_mem, (off_t) (0xffffffff - size + 1));
if (bios == MAP_FAILED) { if (bios == MAP_FAILED) {
perror("Error MMAP /dev/mem"); perror("Error: Can't mmap /dev/mem.");
exit(1); exit(1);
} }
flash->virt_addr = bios; 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, bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
fd_mem, (off_t) (0x9400000)); fd_mem, (off_t) (0x9400000));
if (bios == MAP_FAILED) { if (bios == MAP_FAILED) {
perror("Error MMAP /dev/mem"); perror("Error: Can't mmap /dev/mem.");
exit(1); exit(1);
} }
flash->virt_addr = bios; flash->virt_addr = bios;
@ -145,22 +145,24 @@ int verify_flash(struct flashchip *flash, uint8_t *buf)
void usage(const char *name) void usage(const char *name)
{ {
printf("usage: %s [-rwvE] [-V] [-c chipname] [-s exclude_start] [-e exclude_end] [file]\n", name); printf("usage: %s [-rwvEVfh] [-c chipname] [-s exclude_start]\n", name);
printf(" -r | --read: read flash and save into file\n" printf(" [-e exclude_end] [-m vendor:part] [-l file.layout] [-i imagename] [file]\n");
" -w | --write: write file into flash (default when file is specified)\n" printf(" -r | --read: read flash and save into file\n"
" -v | --verify: verify flash against file\n" " -w | --write: write file into flash (default when\n"
" -E | --erase: Erase flash device\n" " file is specified)\n"
" -V | --verbose: more verbose output\n\n" " -v | --verify: verify flash against file\n"
" -c | --chip <chipname>: probe only for specified flash chip\n" " -E | --erase: erase flash device\n"
" -s | --estart <addr>: exclude start position\n" " -V | --verbose: more verbose output\n"
" -e | --eend <addr>: exclude end postion\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" " -m | --mainboard <vendor:part>: override mainboard settings\n"
" -f | --force: force write without checking image\n" " -f | --force: force write without checking image\n"
" -l | --layout <file.layout>: read rom layout from file\n" " -l | --layout <file.layout>: read rom layout from file\n"
" -i | --image <name>: only flash image name from flash layout\n" " -i | --image <name>: only flash image name from flash layout\n"
"\n" "\n"
" If no file is specified, then all that happens\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); exit(1);
} }

View 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" .TH FLASHROM 1 "July 26, 2006"
.SH NAME .SH NAME
flashrom \- the universal LinuxBIOS flash utility flashrom \- the universal LinuxBIOS flash utility
.SH SYNOPSIS .SH SYNOPSIS
.B flashrom \fR[\fB\-rwvEVflih\fR] [\fB\-c\fR chipname] .B flashrom \fR[\fB\-rwvEVfh\fR] [\fB\-c\fR chipname] [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end]
[\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]
[\fB-m\fR vendor:part] [file]
.SH DESCRIPTION .SH DESCRIPTION
.B flashrom .B flashrom
is the universal LinuxBIOS flash utility. is the universal LinuxBIOS flash utility.
@ -31,10 +32,10 @@ More verbose output.
Probe only for specified flash chip. Probe only for specified flash chip.
.PP .PP
.B "\-s, \-\-estart" <addr> .B "\-s, \-\-estart" <addr>
Exclude start position. Exclude start position. (obsolete)
.PP .PP
.B "\-e, \-\-eend" <addr> .B "\-e, \-\-eend" <addr>
Exclude end postion. Exclude end postion. (obsolete)
.PP .PP
.B "\-m, \-\-mainboard" <vendor:part> .B "\-m, \-\-mainboard" <vendor:part>
Override mainboard settings. Override mainboard settings.
@ -42,7 +43,7 @@ Override mainboard settings.
.B "\-f, \-\-force" .B "\-f, \-\-force"
Force write without checking image. Force write without checking image.
.PP .PP
.B "\-l, \-\-layout" .B "\-l, \-\-layout" <layout.file>
Read ROM layout from file. Read ROM layout from file.
.PP .PP
.B "\-i, \-\-image" <name> .B "\-i, \-\-image" <name>
@ -54,7 +55,7 @@ Show a help text and exit.
.\".B "\-\-version" .\".B "\-\-version"
.\"Show version information and exit. .\"Show version information and exit.
.SH BUGS .SH BUGS
Please report any bugs at http://bugzilla.openbios.org/ Please report any bugs at http://bugzilla.openbios.org/.
.SH LICENCE .SH LICENCE
.B flashrom .B flashrom
is covered by the GNU General Public License (GPL). is covered by the GNU General Public License (GPL).
@ -63,17 +64,19 @@ is covered by the GNU General Public License (GPL).
.SH COPYRIGHT .SH COPYRIGHT
2000 Silicon Integrated System Corporation 2000 Silicon Integrated System Corporation
.br .br
2003 Niki W. Waibel
.br
2004 Tyan Corp 2004 Tyan Corp
.br .br
2005-2006 coresystems GmbH 2005-2006 coresystems GmbH
.br
2003 Niki W. Waibel
.SH AUTHORS .SH AUTHORS
Yhlu <yinghai.lu@amd.com> Yinghai Lu <yinghai.lu@amd.com>
.br .br
Stefan Reinauer <stepan@coresystems.de> Stefan Reinauer <stepan@coresystems.de>
.br .br
Niki W. Waibel <niki.waibel@gmx.net> Niki W. Waibel <niki.waibel@gmx.net>
.br
some others
.PP .PP
This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>, This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>,
for the Debian GNU/Linux system (but may be used by others). for the Debian GNU/Linux system (but may be used by others).