Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 1 | ------------------------------------------------------------------------------- |
Peter Stuge | 44dd304 | 2009-04-20 12:34:30 +0000 | [diff] [blame] | 2 | flashrom README |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 3 | ------------------------------------------------------------------------------- |
Ronald G. Minnich | 1e5003f | 2002-04-10 18:02:07 +0000 | [diff] [blame] | 4 | |
Carl-Daniel Hailfinger | 1ebf845 | 2009-08-18 23:50:14 +0000 | [diff] [blame] | 5 | flashrom is a utility for detecting, reading, writing, verifying and erasing |
| 6 | flash chips. It is often used to flash BIOS/EFI/coreboot/firmware images |
| 7 | in-system using a supported mainboard, but it also supports flashing of network |
Uwe Hermann | c7e8a0c | 2009-05-19 14:14:21 +0000 | [diff] [blame] | 8 | cards (NICs), SATA controller cards, and other external devices which can |
| 9 | program flash chips. |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 10 | |
Carl-Daniel Hailfinger | 1ebf845 | 2009-08-18 23:50:14 +0000 | [diff] [blame] | 11 | It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and TSOP40 |
| 12 | chips, which use various protocols such as LPC, FWH, parallel flash, or SPI. |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 13 | |
Stefan Reinauer | 009c51b | 2010-01-03 23:50:28 +0000 | [diff] [blame] | 14 | Please see the flashrom(8) manpage. |
| 15 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 16 | |
Carl-Daniel Hailfinger | a23041c | 2009-06-12 14:49:10 +0000 | [diff] [blame] | 17 | Packaging |
| 18 | --------- |
| 19 | |
| 20 | To package flashrom and remove dependencies on subversion, either use |
| 21 | make export |
| 22 | or |
| 23 | make tarball |
| 24 | |
| 25 | make export will export all flashrom files from the subversion repository at |
| 26 | revision BASE into a directory named $EXPORTDIR/flashrom-$VERSION-r$SVNREVISION |
| 27 | and will additionally modify the Makefile in that directory to contain the svn |
| 28 | revision of the exported tree. |
| 29 | |
| 30 | make tarball will simply tar up the result of make export and gzip compress it. |
| 31 | |
| 32 | The snapshot tarballs are the result of make tarball and require no further |
| 33 | processing. |
| 34 | |
| 35 | |
Uwe Hermann | d1129ac | 2009-05-28 15:07:42 +0000 | [diff] [blame] | 36 | Build Instructions |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 37 | ------------------ |
| 38 | |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 39 | To build flashrom you need to install the following packages or ports: |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 40 | |
Idwer Vollering | 5e410de | 2009-05-03 23:33:05 +0000 | [diff] [blame] | 41 | Linux et al: |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 42 | |
Carl-Daniel Hailfinger | a472b8b | 2009-10-03 17:08:02 +0000 | [diff] [blame] | 43 | * pciutils / libpci |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 44 | * pciutils-devel / pciutils-dev / libpci-dev |
Carl-Daniel Hailfinger | 50415d2 | 2010-03-21 14:54:57 +0000 | [diff] [blame^] | 45 | * zlib-devel / zlib1g-dev (needed if libpci was compiled with libz support) |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 46 | |
Idwer Vollering | 5e410de | 2009-05-03 23:33:05 +0000 | [diff] [blame] | 47 | On FreeBSD, you need the following ports: |
Idwer Vollering | 5e410de | 2009-05-03 23:33:05 +0000 | [diff] [blame] | 48 | |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 49 | * devel/gmake |
| 50 | * devel/libpci |
Idwer Vollering | 5e410de | 2009-05-03 23:33:05 +0000 | [diff] [blame] | 51 | |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 52 | To compile on Linux, use: |
Carl-Daniel Hailfinger | 9abf529 | 2009-05-01 16:34:32 +0000 | [diff] [blame] | 53 | |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 54 | make |
| 55 | |
| 56 | To compile on FreeBSD, use: |
| 57 | |
| 58 | gmake |
| 59 | |
Carl-Daniel Hailfinger | 10572fa | 2009-08-17 16:30:53 +0000 | [diff] [blame] | 60 | To compile on Nexenta, use: |
| 61 | |
| 62 | make |
| 63 | |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 64 | To compile on Solaris, use: |
| 65 | |
Carl-Daniel Hailfinger | 10572fa | 2009-08-17 16:30:53 +0000 | [diff] [blame] | 66 | gmake LDFLAGS="-L$pathtolibpci" CC="gcc -I$pathtopciheaders" CFLAGS=-O2 |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 67 | |
Jonathan A. Kollasch | 3646c8f | 2010-01-08 21:18:08 +0000 | [diff] [blame] | 68 | To compile on NetBSD or DragonFly BSD, use: |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 69 | |
| 70 | ln -s /usr/pkg/include/pciutils pci |
Jonathan A. Kollasch | d8dfc44 | 2010-02-16 00:49:50 +0000 | [diff] [blame] | 71 | gmake CPPFLAGS=-I. LDFLAGS="-L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib" |
Carl-Daniel Hailfinger | 9abf529 | 2009-05-01 16:34:32 +0000 | [diff] [blame] | 72 | |
| 73 | To compile and run on Darwin/Mac OS X: |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 74 | |
| 75 | Install DirectIO from coresystems GmbH. |
| 76 | DirectIO is available at http://www.coresystems.de/en/directio. |
Carl-Daniel Hailfinger | 9abf529 | 2009-05-01 16:34:32 +0000 | [diff] [blame] | 77 | |
Carl-Daniel Hailfinger | 50415d2 | 2010-03-21 14:54:57 +0000 | [diff] [blame^] | 78 | To cross-compile on Linux for DOS: |
| 79 | |
| 80 | Get RPMs of the cross compiler from the DJGPP site and install them: |
| 81 | djcross-binutils-2.19.1-10ap.i386.rpm |
| 82 | djcross-gcc-tools-4.4.1-1ap.i686.rpm |
| 83 | djcross-gcc-4.3.2-8ap.i686.rpm |
| 84 | Download pciutils 3.1.5 and apply http://assembler.cz/flashrom/pciutils.patch |
| 85 | Download and compile http://assembler.cz/flashrom/libgetopt/ |
| 86 | Compile pciutils, see README.DJGPP for instructions. |
| 87 | Enter the flashrom directory. |
| 88 | ../libpci should contain pciutils source and binaries. |
| 89 | ../libgetopt should contain getopt.a from libgetopt. |
| 90 | Run either (change settings where appropriate) |
| 91 | make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip OS_ARCH=DOS |
| 92 | or (above settings hardcoded) |
| 93 | make djgpp-dos |
| 94 | You might have to add WARNERROR=no to the make command line. |
| 95 | To run flashrom.exe, download http://clio.rice.edu/djgpp/csdpmi7b.zip and |
| 96 | make sure CWSDPMI.EXE is in the current directory. |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 97 | |
Uwe Hermann | d1129ac | 2009-05-28 15:07:42 +0000 | [diff] [blame] | 98 | Installation |
| 99 | ------------ |
| 100 | |
| 101 | In order to install flashrom and the manpage into /usr/local, type: |
| 102 | |
Carl-Daniel Hailfinger | a472b8b | 2009-10-03 17:08:02 +0000 | [diff] [blame] | 103 | make install |
Uwe Hermann | d1129ac | 2009-05-28 15:07:42 +0000 | [diff] [blame] | 104 | |
| 105 | For installation in a different directory use DESTDIR, e.g. like this: |
| 106 | |
Carl-Daniel Hailfinger | a472b8b | 2009-10-03 17:08:02 +0000 | [diff] [blame] | 107 | make DESTDIR=/usr install |
| 108 | |
| 109 | If you have insufficient permissions for the destination directory, use sudo |
| 110 | by adding sudo in front of the commands above. |
Uwe Hermann | d1129ac | 2009-05-28 15:07:42 +0000 | [diff] [blame] | 111 | |
| 112 | |
Joerg Mayer | 7221d5f | 2009-08-24 13:24:52 +0000 | [diff] [blame] | 113 | Contact |
Uwe Hermann | e94dbf2 | 2009-05-22 13:18:38 +0000 | [diff] [blame] | 114 | ------- |
| 115 | |
| 116 | The official flashrom website is: |
| 117 | |
Stefan Reinauer | 22ea8cd | 2009-07-30 13:32:26 +0000 | [diff] [blame] | 118 | http://www.flashrom.org/ |
Uwe Hermann | b6d2832 | 2006-12-04 08:15:47 +0000 | [diff] [blame] | 119 | |
Joerg Mayer | 7221d5f | 2009-08-24 13:24:52 +0000 | [diff] [blame] | 120 | The IRC channel is |
| 121 | |
| 122 | #flashrom at irc.freenode.net |
| 123 | |
| 124 | The Mailing list addess is |
| 125 | |
| 126 | flashrom@flashrom.org |