| 1 | -------------------------------------------------------------------------------␊ |
| 2 | flashrom README␊ |
| 3 | -------------------------------------------------------------------------------␊ |
| 4 | ␊ |
| 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␊ |
| 8 | cards (NICs), SATA controller cards, and other external devices which can␊ |
| 9 | program flash chips.␊ |
| 10 | ␊ |
| 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.␊ |
| 13 | ␊ |
| 14 | Do not use flashrom on laptops! The embedded controller (EC) present in many␊ |
| 15 | laptops interacts badly with any flash attempts and can brick your laptop␊ |
| 16 | permanently.␊ |
| 17 | ␊ |
| 18 | Please make a backup of your flash chip before writing to it.␊ |
| 19 | ␊ |
| 20 | Please see the flashrom(8) manpage.␊ |
| 21 | ␊ |
| 22 | ␊ |
| 23 | Packaging␊ |
| 24 | ---------␊ |
| 25 | ␊ |
| 26 | To package flashrom and remove dependencies on subversion, either use␊ |
| 27 | make export␊ |
| 28 | or␊ |
| 29 | make tarball␊ |
| 30 | ␊ |
| 31 | make export will export all flashrom files from the subversion repository at␊ |
| 32 | revision BASE into a directory named $EXPORTDIR/flashrom-$VERSION-r$SVNREVISION␊ |
| 33 | and will additionally modify the Makefile in that directory to contain the svn␊ |
| 34 | revision of the exported tree.␊ |
| 35 | ␊ |
| 36 | make tarball will simply tar up the result of make export and gzip compress it.␊ |
| 37 | ␊ |
| 38 | The snapshot tarballs are the result of make tarball and require no further␊ |
| 39 | processing.␊ |
| 40 | ␊ |
| 41 | ␊ |
| 42 | Build Instructions␊ |
| 43 | ------------------␊ |
| 44 | ␊ |
| 45 | To build flashrom you need to install the following software:␊ |
| 46 | ␊ |
| 47 | * pciutils+libpci (if you want support for mainboard or PCI device flashing)␊ |
| 48 | * libusb (if you want FT2232 or Dediprog support)␊ |
| 49 | * libftdi (if you want FT2232 support)␊ |
| 50 | ␊ |
| 51 | Linux et al:␊ |
| 52 | ␊ |
| 53 | * pciutils / libpci␊ |
| 54 | * pciutils-devel / pciutils-dev / libpci-dev␊ |
| 55 | * zlib-devel / zlib1g-dev (needed if libpci was compiled with libz support)␊ |
| 56 | ␊ |
| 57 | On FreeBSD, you need the following ports:␊ |
| 58 | ␊ |
| 59 | * devel/gmake␊ |
| 60 | * devel/libpci␊ |
| 61 | ␊ |
| 62 | On OpenBSD, you need the following ports:␊ |
| 63 | ␊ |
| 64 | * devel/gmake␊ |
| 65 | * sysutils/pciutils␊ |
| 66 | ␊ |
| 67 | To compile on Linux, use:␊ |
| 68 | ␊ |
| 69 | make␊ |
| 70 | ␊ |
| 71 | To compile on FreeBSD, use:␊ |
| 72 | ␊ |
| 73 | gmake␊ |
| 74 | ␊ |
| 75 | To compile on Nexenta, use:␊ |
| 76 | ␊ |
| 77 | make␊ |
| 78 | ␊ |
| 79 | To compile on Solaris, use:␊ |
| 80 | ␊ |
| 81 | gmake LDFLAGS="-L$pathtolibpci" CC="gcc -I$pathtopciheaders" CFLAGS=-O2␊ |
| 82 | ␊ |
| 83 | To compile on NetBSD or DragonFly BSD, use:␊ |
| 84 | ␊ |
| 85 | ln -s /usr/pkg/include/pciutils pci␊ |
| 86 | gmake CPPFLAGS=-I. LDFLAGS="-L/usr/pkg/lib -Wl,-rpath-link,/usr/pkg/lib"␊ |
| 87 | ␊ |
| 88 | To compile on OpenBSD, use:␊ |
| 89 | ␊ |
| 90 | gmake␊ |
| 91 | ␊ |
| 92 | To compile and run on Darwin/Mac OS X:␊ |
| 93 | ␊ |
| 94 | Install DirectHW from coresystems GmbH.␊ |
| 95 | DirectHW is available at http://www.coresystems.de/en/directhw .␊ |
| 96 | ␊ |
| 97 | To cross-compile on Linux for DOS:␊ |
| 98 | ␊ |
| 99 | Get RPMs of the cross compiler from the DJGPP site and install them:␊ |
| 100 | djcross-binutils-2.19.1-10ap.i386.rpm␊ |
| 101 | djcross-gcc-4.3.2-8ap.i686.rpm␊ |
| 102 | djcrx-2.04pre_20090725-13ap.i386.rpm␊ |
| 103 | Download pciutils 3.1.5 and apply http://assembler.cz/flashrom/pciutils.patch␊ |
| 104 | Download and compile http://assembler.cz/flashrom/libgetopt/␊ |
| 105 | Compile pciutils, see README.DJGPP for instructions.␊ |
| 106 | Enter the flashrom directory.␊ |
| 107 | ../libpci should contain pciutils source and binaries.␊ |
| 108 | ../libgetopt should contain getopt.a from libgetopt.␊ |
| 109 | Run either (change settings where appropriate)␊ |
| 110 | make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip OS_ARCH=DOS␊ |
| 111 | or (above settings hardcoded)␊ |
| 112 | make djgpp-dos␊ |
| 113 | You might have to add WARNERROR=no to the make command line.␊ |
| 114 | To run flashrom.exe, download and unpack␊ |
| 115 | http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi7b.zip and make sure␊ |
| 116 | CWSDPMI.EXE is in the current directory.␊ |
| 117 | ␊ |
| 118 | Processor architecture dependent features:␊ |
| 119 | ␊ |
| 120 | On non-x86 architectures you have to disable a few programmers because they␊ |
| 121 | use port-based I/O which is not directly available on non-x86. Please add␊ |
| 122 | CONFIG_RAYER_SPI=no CONFIG_NIC3COM=no CONFIG_ATAHPT=no CONFIG_NICREALTEK=no \␊ |
| 123 | CONFIG_NICNATSEMI=no␊ |
| 124 | as parameters to the "make" invocation.␊ |
| 125 | Besides that, the internal programmer is only supported on x86 and MIPS. On␊ |
| 126 | other architectures, please add␊ |
| 127 | CONFIG_INTERNAL=no␊ |
| 128 | as parameter to the "make" invocation.␊ |
| 129 | ␊ |
| 130 | Installation␊ |
| 131 | ------------␊ |
| 132 | ␊ |
| 133 | In order to install flashrom and the manpage into /usr/local, type:␊ |
| 134 | ␊ |
| 135 | make install␊ |
| 136 | ␊ |
| 137 | For installation in a different directory use DESTDIR, e.g. like this:␊ |
| 138 | ␊ |
| 139 | make DESTDIR=/usr install␊ |
| 140 | ␊ |
| 141 | If you have insufficient permissions for the destination directory, use sudo␊ |
| 142 | by adding sudo in front of the commands above.␊ |
| 143 | ␊ |
| 144 | ␊ |
| 145 | Contact␊ |
| 146 | -------␊ |
| 147 | ␊ |
| 148 | The official flashrom website is:␊ |
| 149 | ␊ |
| 150 | http://www.flashrom.org/␊ |
| 151 | ␊ |
| 152 | The IRC channel is␊ |
| 153 | ␊ |
| 154 | #flashrom at irc.freenode.net␊ |
| 155 | ␊ |
| 156 | The mailing list address is␊ |
| 157 | ␊ |
| 158 | flashrom@flashrom.org␊ |
| 159 | |