summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Move the CLI related functions main() and cli_usage() to cli_classic.cCarl-Daniel Hailfinger2010-01-071-1/+1
| | | | | | | | | | | | | | | | | | And rename them accordingly. For now, main() just calls cli_classic(), but alternative frontends can be switched in main(). Annotate remaining help texts with CLI dependency inside flashrom.c with a FIXME comment. Now people can go and create different frontends and be happy. Please note that any other frontend will have to sort of duplicate the probing code in cli_classic.c. Refactoring that part of the code is possible, but not easy because we still want to print instructive help messages for users. Corresponding to flashrom svn r833. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Move generic programmer function into newly introduced programmer.cCarl-Daniel Hailfinger2010-01-061-1/+1
| | | | | | | | | | | | | | Some programmers (most notably FT2232SPI) use fallback_* and noop_*, but those functions lived inside internal.c and were unavailable if no PCI-based programmers were compiled in. Move those functions to the new file programmer.c. Thanks to Patrick Georgi for finding this. Corresponding to flashrom svn r829. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
* This patch shouldn't affect anything else in patchworkSean Nelson2009-12-241-17/+29
| | | | | | | | | | | It just splits $(OBJS) in Makefile into separate lists for Programmer, Chip, and CLI related files/objects. This should help later on figuring out where files may go for a libflashrom library. Corresponding to flashrom svn r824. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Only check for requested features in the MakefileCarl-Daniel Hailfinger2009-12-241-5/+14
| | | | | | | | | | | | | | | | Libpci is no longer required to build flashrom and will not be checked for if no PCI code is needed for the selected programmers. libftdi is no longer checked for if FT2232 support is not selected. With this patch, it is possible to build on pretty much every OS out there (including Windows) without altering the Makefile. Some gcc versions may need a CFLAGS override for a warning in dummyflasher.c, though. Corresponding to flashrom svn r823. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Internal.c was always compiled in because it hosted the function ↵Carl-Daniel Hailfinger2009-12-241-2/+2
| | | | | | | | | | | | | internal_delay() Move that function to udelay.c and compile internal.c only if really needed. physmap.c is only needed if the programmer is internal or a PCI card. Make its compilation conditional. Corresponding to flashrom svn r822. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Internal (onboard) programming was the only feature which could not be disabledCarl-Daniel Hailfinger2009-12-131-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make various pieces of code conditional on support for internal programming. Code shared between PCI device programmers and onboard programming is now conditional as well. It is now possible to build only with dummy support: make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no This allows building for a specific use case only, and it also facilitates porting to a new architecture because it is possible to focus on highlevel code only. Note: Either internal or dummy programmer needs to be compiled in due to the current behaviour of always picking a default programmer if -p is not specified. Picking an arbitrary external programmer as default wouldn't make sense. Build and runtime tested in all 1024 possible build combinations. The only failures are by design as mentioned above. Corresponding to flashrom svn r797. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Revert debug compilation which was committed in r772 by accidentCarl-Daniel Hailfinger2009-11-241-1/+1
| | | | | | | Corresponding to flashrom svn r773. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Cleanly validate ICH SPI preopcodesCarl-Daniel Hailfinger2009-11-241-1/+14
| | | | | | | | | | | | | | | | | | | The code should work on Linux/*BSD/MacOSX and relies on the serial code implementation in serial.c. Support for additional platforms (Windows) will have to be added to serial.c for this to work. For tests without a Bus Pirate (or with non-functional serial code) it is possible to #define FAKE_COMMUNICATION in buspirate_spi.c. Thanks to Sean Nelson for the SPI mode settings code. I tweaked it a bit to make configuration from a commandline easier should anybody want that feature. Tested-by: Sean Nelson <audiohacked@gmail.com> Corresponding to flashrom svn r772. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Move serial handling from serprog.c to serial.cCarl-Daniel Hailfinger2009-11-231-0/+4
| | | | | | | | | | | | | This is the first step in enabling platform independent serprog and it also allows other drivers to use serial port functionality without requiring serprog. Pure code move, no code changed. Corresponding to flashrom svn r771. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix incorrect comment about wiki printing in MakefileCarl-Daniel Hailfinger2009-11-161-1/+1
| | | | | | | | | Spotted by Benjamin BELLEC <b.bellec@gmail.com> Corresponding to flashrom svn r765. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Retrieve linker flags for libftdi with pkg-configJörg Mayer2009-11-161-3/+4
| | | | | | | | | | | | | | | | | Retrieve the proper linker flags for libftdi via pkg-config and fall back if pkg-config isn't available or if it doesn't know libftdi. Fix $LIBS and $FEATURE_LIBS to honor dependency order. The original patch is from Jörg, it has been updated by Carl-Daniel to work on the current tree and to have a fallback in case pkg-config is not available or not working. Corresponding to flashrom svn r762. Signed-off-by: Jörg Mayer <jmayer@loplof.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Jörg Mayer <jmayer@loplof.de>
* There is no need to tell people to install libz if flashrom doesn't need libzCarl-Daniel Hailfinger2009-10-031-9/+31
| | | | | | | | | | | | | | | So far, the only case where libz is needed is when a library (libpci) pulls in libz and even then it only happens if libpci is available in a static version only and said static version has libz requirements. Check for libpci separately and don't require libz if it isn't needed. Clarify the README. Corresponding to flashrom svn r743. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Disable NVIDIA flashing support for now, erase/write is not properly ↵Uwe Hermann2009-10-011-2/+2
| | | | | | | | | | | | working, yet This needs more testing and investigation (partly timing related, it seems). Reads did work in multiple cases, though. Corresponding to flashrom svn r740. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add initial support for flashing some NVIDIA graphics cardsUwe Hermann2009-09-301-0/+8
| | | | | | | | | | | | | | | | | | | | The new option is '-p gfxnvidia', rest of the interface is as usual. I tested a successful identify and read on a "RIVA TNT2 Model 64/Model 64 Pro" card for now, erase and write did NOT work properly so far! Please do not attempt to write/erase cards yet, unless you can recover! In addition to the NVIDIA handling code it was required to call programmer_shutdown() in a lot more places, otherwise the graphics card will be disabled in the init function, but never enabled again as the shutdown function is not called. The shutdown handling may be changed to use atexit() later. Corresponding to flashrom svn r737. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Luc Verhaegen <libv@skynet.be>
* This is the bitbanging SPI driver infrastructureCarl-Daniel Hailfinger2009-09-281-0/+8
| | | | | | | | | | | | | If you want support for a particular piece of hardware, just fill in a few functions in spi_bitbang_master_table. That's it. On top of this, the RayeR SPI flasher should be supportable in ~20 LOC. Tested, trace looks OK. Corresponding to flashrom svn r736. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Compile out wiki output on request and move wiki stuff into a separate fileCarl-Daniel Hailfinger2009-09-161-0/+8
| | | | | | | | | | | | | This is useful for libflashrom (you don't need wiki output in a coreboot payload). Wiki output is now disabled by default. If you want to enable it, run make CONFIG_PRINT_WIKI=yes Corresponding to flashrom svn r725. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Allow to exclude each of the external programmer drivers from being compiled inCarl-Daniel Hailfinger2009-09-161-4/+41
| | | | | | | | | | | | | | | Example make commandline if you want only internal programmers: make CONFIG_FT2232SPI=no CONFIG_SERPROG=no CONFIG_NIC3COM=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_DUMMY=no Of course, all of the CONFIG_* symbols can be mixed and matched as needed. CONFIG_FT2232SPI is special because even if it is enabled, make will check if the headers are available and skip it otherwise. Corresponding to flashrom svn r724. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Not all systems have svnversion installedCarl-Daniel Hailfinger2009-09-051-1/+1
| | | | | | | | | Fall back to svn info if svnversion fails. Corresponding to flashrom svn r716. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add support for parallel flash on Dr. Kaiser PC-Waechter PCI devicesTURBO J2009-09-021-1/+1
| | | | | | | | | | | | | | The vendor sold different designs under that name, the patch works with the one that has an Actel FPGA as PCI-to-Flash bridge. The Flash chip is a "Macronix MX29F001B" (128 KB, parallel) soldered directly to the PCB. Flash operations (PROBE, READ, ERASE, WRITE) work as expected. Corresponding to flashrom svn r712. Signed-off-by: TURBO J <turboj@gmx.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Flashrom 0.9.1Carl-Daniel Hailfinger2009-09-021-1/+1
| | | | | | | | | | | Please refer to the release notes for a high-level overview of all the amazing changes and added features since 0.9.0. Corresponding to flashrom svn r709. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add the possibility to set the release name directly as makefile parameterCarl-Daniel Hailfinger2009-08-311-9/+11
| | | | | | | | | | | | | With this patch, make tarball and make export still work as expected, but if you specify RELEASENAME=foo, then the directories and tarballs are named flashrom-foo instead of flashrom-0.9.0-r703. This makes release creation a lot easier. As an example, look at creating the 0.9.1 tarball: # make tarball RELEASENAME=0.9.1 Corresponding to flashrom svn r704. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Fix compilation on Nexenta which is Ubuntu with a Solaris kernelCarl-Daniel Hailfinger2009-08-171-0/+3
| | | | | | | Corresponding to flashrom svn r686. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Allow to compile out serprog completelyCarl-Daniel Hailfinger2009-08-121-6/+12
| | | | | | | | | | | | | | | | If CONFIG_SERPROG is not set, no stubs and no data of serprog will remain. Side benefit: This kills a few dozen lines of code. r678, r679 and r680 made this possible. Once "Only list available programers in usage()" is committed, even the usage message will be adjusted automatically. Corresponding to flashrom svn r681. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Remove unnecessary #include filesCarl-Daniel Hailfinger2009-08-091-0/+2
| | | | | | | | | | Serprog compilation is now controlled by a Makefile variable. Replace munmap with physunmap where appropriate. Corresponding to flashrom svn r671. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Change tarball compression from gzip to bzip2Carl-Daniel Hailfinger2009-07-101-5/+10
| | | | | | | | | | | | | Set the user and group of all files to root for tar versions which support it. Add explanatory comments for supporting that feature with other tar versions. Use LC_ALL instead of LANG everywhere. Corresponding to flashrom svn r644. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Add changelog for make export and make tarballCarl-Daniel Hailfinger2009-06-301-0/+1
| | | | | | | | | Thanks to Uwe for the suggestion. Corresponding to flashrom svn r637. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* The makefile rules for %.o and flashrom.o are identicalCarl-Daniel Hailfinger2009-06-231-4/+1
| | | | | | | | | Let %.o handle flashrom.o as well. Corresponding to flashrom svn r626. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Luc Verhaegen <libv@skynet.be>
* Initial commit of an external serial flasher protocolUrja Rannikko2009-06-231-1/+2
| | | | | | | | | | | | | | Supports RS-232, USB serial converters (untested) and TCP streams. All functionality is stubbed out to allow multiplatform compile testing of the headers we use. The real serial flasher protocol driver will be committed next. Corresponding to flashrom svn r625. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Various wiki output changesUwe Hermann2009-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - Move board_info_url struct to print.c, doesn't have to be global. - Simplify flashrom.c a bit by moving stuff to print.c. Eliminate two now-useless mini-functions in print.c. - Add a note that the wiki page contents are semi-automatically generated. - Mention date of last wiki page update as well as the flashrom revision that was used to generate the wiki output. - Also generate list of supported laptops in -z output now. - Add some more board URLs. - Add a boards_notes[] table to allow for arbitrary footnotes/comments for each board in the table. All notes will automatically be turned into wiki footnotes with correct numbers and will appear at the end of the respective table. Corresponding to flashrom svn r615. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Prevent spurious runs of make features introduced by the FT2232 patchCarl-Daniel Hailfinger2009-06-191-11/+14
| | | | | | | | | | | The new makefile structure uses indirection (.features->features) to work around a gmake bug which resulted in immediate premature evaluation of variable definitions with deferred evaluation. Corresponding to flashrom svn r611. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Move all printing code to print.cUwe Hermann2009-06-171-1/+1
| | | | | | | | | Drop no longer needed MAX macro, we have a max() function. Corresponding to flashrom svn r601. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* This patch adds support for a new SPI programmer, based on the FT2232H/4232H ↵Paul Fox2009-06-161-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | chip from FTDI FTDI support is autodetected during compilation. Paul writes: There are certainly possible improvements: The code has hard-coded values for which interface of the ftdi chip to use (interface B was chosen because libftdi seems to have trouble with A right now), what clock rate use for the SPI interface (I've been running at 30Mhz, but the patch sets it to 10Mhz), and possibly others. I think this means that per-programmer options might be a good idea at some point. Carl-Daniel writes: There is one additional FIXME comment in the code, but AFAICS that problem is not solvable with current libftdi. Corresponding to flashrom svn r598. Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Check for a working C compilerCarl-Daniel Hailfinger2009-06-161-2/+11
| | | | | | | Corresponding to flashrom svn r597. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Joseph Smith <joe@settoplinux.org>
* Fix typo in MakefileUwe Hermann2009-06-151-1/+1
| | | | | | | | | | | | This strangely breaks with gmake on FreeBSD, but seems to work with make on Linux. Thanks Idwer Vollering <vidwer@gmail.com> for noticing and testing. Corresponding to flashrom svn r593. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add support for the PMC Pm29F002T/B chipsUwe Hermann2009-06-141-1/+1
| | | | | | | | | | I sucessfully tested all operations on a Pm29F002T chip. The Pm29F002B is untested but I assume it should also work. Corresponding to flashrom svn r590. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* This patch introduces two new targets which are designed to make the life of ↵Carl-Daniel Hailfinger2009-06-121-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | packagers easier In particular, it should no longer be necessary to patch the makefile for hassle-free compilation. The targets are: make export make tarball Both preserve svn revisions and the exported tree does not depend on subversion in any way or shape. Documentation for this feature has been added to README. We need this for five reasons: 1. Packagers currently have to patch flashrom source to compile it on systems without subversion. We should make it easier for them. 2. Snapshot tarballs currently have a .svn 1.5 directory included but this will cause errors for users with older svn 1.4. Not requiring subversion for snapshot compilation is best. 3. Since packagers seldom the svn revision in their fixup patches, some packages out there have incorrect or no revision, only major version numbers. 4. Releasing a new version of flashrom needs too many changes to the makefile which have to be reverted instantly after the release. That is unnecessary churn. 5. Making a release is easy with the change. Update the major version, then run "make tarball". Corresponding to flashrom svn r587. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add missing GPL headers to two filesUwe Hermann2009-06-121-3/+16
| | | | | | | | | | Please complain in case there are errors here, but I'm pretty sure the headers are correct. Corresponding to flashrom svn r586. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Make an extra MANDIR variable for easier overridingUwe Hermann2009-05-211-2/+3
| | | | | | | | | Thanks Heinz Wiesinger <HMWiesinger@liwjatan.at> for the report. Corresponding to flashrom svn r541. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Rename sata_sii.c to satasii.c for consistencyUwe Hermann2009-05-171-1/+1
| | | | | | | Corresponding to flashrom svn r530. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Various smaller flashrom improvementsUwe Hermann2009-05-171-1/+1
| | | | | | | | | | | | | | | | | | - Document new 'satasii' programmer in -L output and manpage. - Drop PCI_IO_BASE_ADDRESS, pci.h has such #defines already. - Beautify flashrom output and make it more consistent. - Same for the 'make' output (reordered some $CC parameters). Build-tested on i386, shouldn't break any builds, I think. - Some variable renaming and other cosmetic fixes. Corresponding to flashrom svn r529. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* This patch adds support for BIOS flashing on the all SiliconImage SATA ↵Rudolf Marek2009-05-171-1/+1
| | | | | | | | | | | | | controllers It was easy because 1) flashrom has now nice API 2) documentation is public on the web site Corresponding to flashrom svn r527. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Refactor parts of the 3COM NIC codeUwe Hermann2009-05-151-1/+1
| | | | | | | | | | | | | | | Move the reusable PCI specific parts into pcidev.c, they'll be usable for other NIC code (Realtek, VIA, ...) and also for SATA/IDE controller cards as external programmers (for every PCI device which can program EEPROMs basically). Also add print_supported_pcidevs() to show the supported PCI devices (currently only NICs, soon more) in the 'flashrom -L' output. Corresponding to flashrom svn r515. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Cosmetics and eliminate unneeded vars as per IRC discussionUwe Hermann2009-05-141-9/+6
| | | | | | | | | Build-tested and 'make PREFIX=/tmp/foo install' tested by me. Corresponding to flashrom svn r509. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Improve makefile structure a bitChristian Ruppert2009-05-141-13/+17
| | | | | | | Corresponding to flashrom svn r508. Signed-off-by: Christian Ruppert <spooky85@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add support for 3COM NICs as "external programmer" and Atmel AT49BV512Uwe Hermann2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows flashrom to identify, read, write, erase and verify flash chips on (some) 3COM network cards. The patch uses the external programmer infrastructure, the network card is basically treated as an external flash programmer. Usage: $ ./flashrom -p nic3com flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. No operations were specified. $ ./flashrom -p nic3com -E flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. Erasing flash chip... SUCCESS. $ ./flashrom -p nic3com -wv backup.bin flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. Flash image seems to be a legacy BIOS. Disabling checks. Programming page: 1023 at address: 0x0000ffc0 Verifying flash... VERIFIED. $ ./flashrom -p nic3com -r backup.bin flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. Reading flash... done. I have tested this on actual hardware (see PCI IDs above) and all operations worked fine. Support for other 3COM cards will follow (I added some more which should be supportable by this code, but they're untested so far), as well as support for NICs from other vendors. The patch also adds support for the Atmel AT49BV512 which is soldered onto the 3COM NIC I used for testing. Corresponding to flashrom svn r499. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Mateusz Murawski <matowy@tlen.pl> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Unify write_39sf020() and write_49f002() functionsUwe Hermann2009-05-121-1/+1
| | | | | | | | | | The write_39sf020() and write_49f002() functions are identical except for whitespace differences, so drop one of them. Corresponding to flashrom svn r497. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add a dummy external flasher which just prints each operationCarl-Daniel Hailfinger2009-05-091-1/+2
| | | | | | | | | | | | Usage: flashrom --programmer dummy This is a great way to test flashrom without root access. Corresponding to flashrom svn r483. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add external flasher supportCarl-Daniel Hailfinger2009-05-081-1/+1
| | | | | | | | | | | | | | | | | - Read/write accesses through function pointers - Command line parameter for internal/external flasher - Board and chipset setup moved to internal init function - Shutdown stuff moved to internal shutdown function As a side benefit, this will allow us to undo chipset write enable during shutdown. Tested by Uwe on real hardware. Corresponding to flashrom svn r476. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Onwards with developmentCarl-Daniel Hailfinger2009-05-041-2/+4
| | | | | | | | | Re-add the svn revision to the version string. Corresponding to flashrom svn r457. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Flashrom 0.9.0Carl-Daniel Hailfinger2009-05-041-4/+2
| | | | | | | Corresponding to flashrom svn r454. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
OpenPOWER on IntegriCloud