• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Documentation/H03-May-2022-

util/H06-Nov-2019-848608

82802ab.cH A D31-Jul-20196.3 KiB249150

COPYINGH A D08-Sep-200717.6 KiB340281

DoxyfileH A D17-Jun-2019103.3 KiB2,4241,873

MakefileH A D31-Dec-201953.4 KiB1,5971,201

READMEH A D05-Jan-20196 KiB193126

amd_imc.cH A D24-Apr-20183.1 KiB15698

archtest.cH A D10-Jan-201540 32

at45db.cH A D31-Jul-201918.9 KiB556414

atahpt.cH A D24-Apr-20182.6 KiB10064

atapromise.cH A D19-Aug-20185.3 KiB171104

atavia.cH A D20-Jan-20205.6 KiB193142

bitbang_spi.cH A D31-Jul-20195 KiB176126

board_enable.cH A D05-Oct-201994.7 KiB2,7431,774

buspirate_spi.cH A D04-Oct-201919 KiB667504

cbtable.cH A D28-Nov-20199.4 KiB317231

ch341a_spi.cH A D27-Jun-201916.2 KiB528392

chipdrivers.hH A D04-Oct-201911.3 KiB210152

chipset_enable.cH A D09-Feb-202076.5 KiB2,1211,646

cli_classic.cH A D17-Oct-201920.6 KiB671582

cli_common.cH A D19-Aug-20183 KiB7957

cli_output.cH A D24-Apr-20182.6 KiB9864

coreboot_tables.hH A D24-Apr-20184.4 KiB14770

custom_baud.cH A D24-Apr-20181.9 KiB7542

custom_baud.hH A D24-Apr-20181 KiB329

dediprog.cH A D15-Nov-201935.8 KiB1,282985

developerbox_spi.cH A D26-Jun-20194.6 KiB170104

digilent_spi.cH A D27-Jun-201910.5 KiB457340

dmi.cH A D04-Oct-201912.6 KiB481331

drkaiser.cH A D24-Apr-20182.6 KiB9658

dummyflasher.cH A D05-Oct-201925.6 KiB865763

edi.cH A D23-Jun-201910.8 KiB517363

edi.hH A D11-Feb-2018878 3110

en29lv640b.cH A D31-Jul-20192.3 KiB8440

endiantest.cH A D19-Dec-201777 76

ene.hH A D11-Feb-20181.3 KiB5226

flash.hH A D04-Oct-201917.4 KiB423272

flashchips.cH A D09-Feb-2020474 KiB18,47117,420

flashchips.hH A D20-Jan-202042.4 KiB992856

flashrom.8.tmplH A D31-Dec-201950.9 KiB1,5111,503

flashrom.cH A D31-Dec-201972.4 KiB2,5981,967

fmap.cH A D31-Jul-20199.7 KiB332183

fmap.hH A D23-Oct-20182.9 KiB7227

ft2232_spi.cH A D01-Dec-201915.6 KiB538405

gfxnvidia.cH A D26-Jun-20193.8 KiB12283

helpers.cH A D04-Oct-20192.8 KiB13192

hwaccess.cH A D23-Jun-20198 KiB315242

hwaccess.hH A D14-Dec-20198.3 KiB306203

ich_descriptors.cH A D05-Oct-201943.3 KiB1,2721,057

ich_descriptors.hH A D08-Aug-201914.1 KiB593515

ichspi.cH A D24-Sep-201964.3 KiB2,1091,598

internal.cH A D24-Sep-201910.6 KiB390289

it8212.cH A D14-Nov-20192.5 KiB8350

it85spi.cH A D31-Jul-201910.8 KiB373233

it87spi.cH A D31-Jul-201912.5 KiB435311

jedec.cH A D31-Jul-201922.8 KiB743535

jlink_spi.cH A D27-Jun-201910.2 KiB456310

layout.cH A D31-Jul-20197.4 KiB318232

layout.hH A D04-Jul-20192.3 KiB7137

libflashrom.cH A D08-Oct-201917.4 KiB650351

libflashrom.hH A D24-Sep-20194.1 KiB12185

libflashrom.mapH A D17-Sep-2019814 3231

linux_mtd.cH A D24-Sep-201910 KiB410283

linux_spi.cH A D16-Oct-20196.6 KiB238174

mcp6x_spi.cH A D26-Jun-20194.6 KiB164106

meson.buildH A D31-Dec-20199.8 KiB405381

mstarddc_spi.cH A D27-Jun-20196.1 KiB233180

ni845x_spi.cH A D14-Nov-201919.2 KiB643491

nic3com.cH A D24-Apr-20184.4 KiB14590

nicintel.cH A D26-Jun-20193.7 KiB11865

nicintel_eeprom.cH A D10-Dec-201912.7 KiB504371

nicintel_spi.cH A D26-Jun-20198.5 KiB281178

nicnatsemi.cH A D24-Apr-20183.5 KiB11258

nicrealtek.cH A D24-Apr-20183.7 KiB13580

ogp_spi.cH A D23-Jun-20193.7 KiB143101

opaque.cH A D24-Apr-20181.8 KiB6334

os.hH A D24-Apr-20181.9 KiB6833

pcidev.cH A D19-Jan-20209.5 KiB336264

physmap.cH A D08-Oct-201916.3 KiB692494

pickit2_spi.cH A D14-Nov-201912.1 KiB492362

platform.hH A D14-Dec-20195.1 KiB176120

pony_spi.cH A D04-Oct-20194.9 KiB232156

print.cH A D06-Dec-201988.3 KiB1,1801,079

print_wiki.cH A D31-Jul-201915.4 KiB453362

processor_enable.cH A D24-Apr-20182.3 KiB8554

programmer.cH A D24-Apr-20183.9 KiB14195

programmer.hH A D31-Dec-201922.1 KiB806598

rayer_spi.cH A D23-Jun-20197 KiB286201

satamv.cH A D26-Jun-20195.9 KiB194114

satasii.cH A D24-Apr-20183.8 KiB13891

sb600spi.cH A D14-Nov-201924.6 KiB709509

serial.cH A D31-Jul-201915.5 KiB606520

serprog.cH A D31-Jul-201928.2 KiB944788

serprog.hH A D27-Oct-20121.5 KiB2624

sfdp.cH A D04-Mar-201910.8 KiB391326

spi.cH A D21-Jun-20194.4 KiB153107

spi.hH A D04-Oct-20195.5 KiB19697

spi25.cH A D19-Jul-201922.8 KiB822562

spi25_statusreg.cH A D23-Jun-201924.8 KiB740534

spi95.cH A D04-Oct-20192.2 KiB7035

sst28sf040.cH A D31-Jul-20193.2 KiB12476

sst49lfxxxc.cH A D24-Apr-20181.1 KiB3713

sst_fwhub.cH A D31-Jul-20192.4 KiB9359

stlinkv3_spi.cH A D02-Jan-202013.2 KiB518398

stm50.cH A D24-Apr-20182.1 KiB5720

udelay.cH A D23-Jun-20196.8 KiB263189

usbblaster_spi.cH A D14-Nov-20195.5 KiB221147

usbdev.cH A D22-Oct-20194.6 KiB14485

versioninfo.incH A D09-Feb-202037 32

w29ee011.cH A D23-Jun-20192.1 KiB7039

w39.cH A D24-Apr-20185.5 KiB240162

wbsio_spi.cH A D31-Jul-20195.9 KiB207140

README

1-------------------------------------------------------------------------------
2flashrom README
3-------------------------------------------------------------------------------
4
5flashrom is a utility for detecting, reading, writing, verifying and erasing
6flash chips. It is often used to flash BIOS/EFI/coreboot/firmware images
7in-system using a supported mainboard, but it also supports flashing of network
8cards (NICs), SATA controller cards, and other external devices which can
9program flash chips.
10
11It supports a wide range of flash chips (most commonly found in SOIC8, DIP8,
12SOIC16, WSON8, PLCC32, DIP32, TSOP32, and TSOP40 packages), which use various
13protocols such as LPC, FWH, parallel flash, or SPI.
14
15Do not use flashrom on laptops (yet)! The embedded controller (EC) present in
16many laptops might interact badly with any attempts to communicate with the
17flash chip and may brick your laptop.
18
19Please make a backup of your flash chip before writing to it.
20
21Please see the flashrom(8) manpage.
22
23
24Packaging
25---------
26
27To package flashrom and remove dependencies on Git, either use
28make export
29or
30make tarball
31
32'make export' will export all flashrom files from the Git repository at
33revision HEAD into a directory named "$EXPORTDIR/flashrom-$RELEASENAME"
34and will additionally add a "versioninfo.inc" file in that directory to
35contain the Git revision of the exported tree and a date for the manual
36page.
37
38'make tarball' will simply tar up the result of make export and compress
39it with bzip2.
40
41The snapshot tarballs are the result of 'make tarball' and require no
42further processing.
43
44
45Build Instructions
46------------------
47
48To build flashrom you need to install the following software:
49
50 * pciutils+libpci (if you want support for mainboard or PCI device flashing)
51 * libusb (if you want FT2232, Dediprog or USB-Blaster support)
52 * libftdi (if you want FT2232 or USB-Blaster support)
53 * libjaylink (if you want support for SEGGER J-Link and compatible devices)
54
55Linux et al:
56
57 * pciutils / libpci
58 * pciutils-devel / pciutils-dev / libpci-dev
59 * zlib-devel / zlib1g-dev (needed if libpci was compiled with libz support)
60
61On FreeBSD, you need the following ports:
62
63 * devel/gmake
64 * devel/libpci
65
66On OpenBSD, you need the following ports:
67
68 * devel/gmake
69 * sysutils/pciutils
70
71To compile on Linux, use:
72
73 make
74
75To compile on FreeBSD, OpenBSD or DragonFly BSD, use:
76
77 gmake
78
79To compile on Nexenta, use:
80
81 make
82
83To compile on Solaris, use:
84
85 gmake LDFLAGS="-L$pathtolibpci" CC="gcc -I$pathtopciheaders" CFLAGS=-O2
86
87To compile on NetBSD (with pciutils, libftdi, libusb installed in /usr/pkg/), use:
88
89 gmake
90
91To compile and run on Darwin/Mac OS X:
92
93 Install DirectHW from coresystems GmbH.
94 DirectHW is available at http://www.coreboot.org/DirectHW .
95
96To cross-compile on Linux for DOS:
97
98 Get packages of the DJGPP cross compiler and install them:
99 djgpp-filesystem djgpp-gcc djgpp-cpp djgpp-runtime djgpp-binutils
100 As an alternative, the DJGPP web site offers packages for download as well:
101 djcross-binutils-2.29.1-1ap.x86_64.rpm
102 djcross-gcc-7.2.0-1ap.x86_64.rpm
103 djcrx-2.05-5.x86_64.rpm
104 The cross toolchain packages for your distribution may have slightly different
105 names (look for packages named *djgpp*).
106
107 Alternatively, you could use a script to build it from scratch:
108 https://github.com/andrewwutw/build-djgpp
109
110 You will need the libpci and libgetopt library source trees and
111 their compiled static libraries and header files installed in some
112 directory say libpci-libgetopt/, which will be later specified with
113 LIBS_BASE parameter during flashrom compilation. Easiest way to
114 handle it is to put pciutils, libgetopt and flashrom directories
115 in one subdirectory. There will be an extra subdirectory libpci-libgetopt
116 created, which will contain compiled libpci and libgetopt.
117
118 Download pciutils 3.5.6 and apply http://flashrom.org/File:Pciutils-3.5.6.patch.gz
119 Compile pciutils, using following command line:
120
121 make ZLIB=no DNS=no HOST=i386-djgpp-djgpp CROSS_COMPILE=i586-pc-msdosdjgpp- \
122     PREFIX=/ DESTDIR=$PWD/../libpci-libgetopt  \
123     STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" install install-lib
124
125 Download and compile with 'make' http://flashrom.org/File:Libgetopt.tar.gz
126
127 Copy the libgetopt.a to ../libpci-libgetopt/lib and
128 getopt.h to ../libpci-libgetopt/include
129
130 Enter the flashrom directory.
131
132 make CC=i586-pc-msdosdjgpp-gcc STRIP=i586-pc-msdosdjgpp-strip LIBS_BASE=../libpci-libgetopt/ strip
133
134 If you like, you can compress the resulting executable with UPX:
135
136 upx -9 flashrom.exe
137
138 To run flashrom.exe, download http://flashrom.org/File:Csdpmi7b.zip and
139 unpack CWSDPMI.EXE into the current directory or one in PATH.
140
141To cross-compile on Linux for Windows:
142
143 Get packages of the MinGW cross compiler and install them:
144 mingw32-filesystem mingw32-cross-cpp mingw32-cross-binutils mingw32-cross-gcc
145 mingw32-runtime mingw32-headers
146 The cross toolchain packages for your distribution may have slightly different
147 names (look for packages named *mingw*).
148 PCI-based programmers (internal etc.) are not supported on Windows.
149 Run (change CC= and STRIP= settings where appropriate)
150 make CC=i686-w64-mingw32-gcc STRIP=i686-w64-mingw32-strip
151
152Processor architecture dependent features:
153
154 On non-x86 architectures a few programmers don't work (yet) because they
155 use port-based I/O which is not directly available on non-x86. Those
156 programmers will be disabled automatically if you run "make".
157
158Compiler quirks:
159
160If you are using clang and if you want to enable only one driver, you may hit an
161overzealous compiler warning from clang. Compile with "make WARNERROR=no" to
162force it to continue and enjoy.
163
164Installation
165------------
166
167In order to install flashrom and the manpage into /usr/local, type:
168
169 make install
170
171For installation in a different directory use DESTDIR, e.g. like this:
172
173 make DESTDIR=/usr install
174
175If you have insufficient permissions for the destination directory, use sudo
176by adding sudo in front of the commands above.
177
178
179Contact
180-------
181
182The official flashrom website is:
183
184  http://www.flashrom.org/
185
186The IRC channel is
187
188  #flashrom at irc.freenode.net
189
190The mailing list address is
191
192  flashrom@flashrom.org
193