summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* dediprog: port to libusb1 and use asynchronous bulk transfers for readingNico Huber2016-02-181-1/+1
| | | | | | | | | | | | | This patch is based on Nico Huber's original version that was rebased by David Hendricks for Chromium OS in Change-Id: I84384b9d8ed53911657cf2293733531a6e11fd23 Corresponding to flashrom svn r1929. Signed-off-by: Nico Huber <nico.huber@secunet.com> Signed-off-by: David Hendricks <dhendrix@chromium.org> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* List affected features for missing librariesCarl-Daniel Hailfinger2016-02-171-39/+44
| | | | | | | | | | | | | | | | | | If libpci, libusb0 or libusb1 are missing, make will now tell you which currently enabled features require those libraries. Example output: Checking for libusb-0.1/libusb-compat headers... not found. The following features require libusb-0.1/libusb-compat: CONFIG_PICKIT2_SPI CONFIG_DEDIPROG. Please install libusb-0.1 headers or libusb-compat headers. See README for more information. Corresponding to flashrom svn r1926. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Add support for WCH CH341A as an SPI programmerUrja Rannikko2016-01-311-2/+21
| | | | | | | | Corresponding to flashrom svn r1921. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Add infrastructure to support libusb-1.0Stefan Tauner2016-01-311-1/+50
| | | | | | | Corresponding to flashrom svn r1920. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Makefile: print compile commands of configure steps to the build details fileStefan Tauner2016-01-241-1/+13
| | | | | | | | | | This allows for even more easy debugging of build failures due to problems with libraries. Corresponding to flashrom svn r1919. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* dediprog: support new communication protocol, cleanup and enable by defaultSimon Glass2016-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The new protocol changes some commands, so adjust the code to support these. Use helper functions to reduce duplication in libusb calls. Testing with real hardware showed that the maximum read size via the control endpoint is about 16 bytes although specification does not mention that. Dediprog SF600 is not supported yet. Based on the following chromiumos changes: Change-Id: Ibd1e27d9e8273ba879b9b5d95675b99596255c89 Change-Id: Ifc33e7b1eed5b0cb80f83458fa24741a577fa46a Additionally, some ideas from Alex for cleaner code were incorporated as well. Tested on an SF100 V4 with both firmware generations PREWing a M25PX80 and AT45DB041D (the latter is using dediprog_spi_send_command() instead of optimized functions which make it a good test vehicle). Corresponding to flashrom svn r1918. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Hendricks <dhendrix@chromium.org> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a bunch of new/tested stuff and various small changes 24Stefan Tauner2016-01-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested mainboards: OK: - ASRock G31M-GS Reported by Александр Трубицын - ASRock G41M-VS3 Reported by Александр Трубицын - ASRock N68C-S UCC Reported by Alexey Belyaev - ASRock AMCP7AION-HT (ION 330HT(-BD)) Reported by Stefan Tauner - ASUS P5K SE Reported by Александр Трубицын - ASUS P5KPL-VM Reported by Marin Vlah - ASUS RAMPAGE III GENE Reported by stevessss on IRC - GIGABYTE GA-945GM-S2 Reported by Александр Трубицын - GIGABYTE GA-945GCM-S2 (rev. 3.0) Reported by Александр Трубицын - GIGABYTE GA-965P-S3 Reported by Александр Трубицын - GIGABYTE GA-EG43M-S2H Reported by Александр Трубицын - GIGABYTE GA-EP31-DS3L (rev. 1.0) Reported by Александр Трубицын - GIGABYTE GA-G33M-S2 Reported by Александр Трубицын - GIGABYTE GA-G33M-S2L Reported by Александр Трубицын - GIGABYTE GA-H55M-S2 Reported by Александр Трубицын - GIGABYTE GA-J1900N-D3V Reported by Marcos Truchado and Guillermo von Hünefeld - GIGABYTE GA-K8NS Reported by nicolae788 - GIGABYTE GA-M56S-S3 Reported by Estevo Paz Freire - GIGABYTE GA-P31-DS3L Reported by Александр Трубицын - GIGABYTE GA-P31-S3G Reported by Александр Трубицын - MSI MS-7336 Reported by Benjamin Bellec - MSI X79A-GD45 (8D) (MS-7760)" Reported by mortehu on IRC - Supermicro A1SAi-2550F Reported by Bernard Grymonpon - Supermicro X7DWT Reported by Steven Stremciuc Laptop: - ASUS U38N Reported by Ultra on IRC - Dell Latitude D630 Reported by Márton Miklós - Fujitsu Amilo Xi 3650 Reported by Elmar Stellnberger - Lenovo T400 (whitelisting only) Chipsets: - Mark 8086:1f38 (Intel Avoton/Rangeley) as tested Reported by Jeremy Porter and Bernard Grymonpon - Add Intel Sunrise Point IDs but no support yet. Flash chips: - Atmel AT45DB321D to PREW (+PREW) Reported by The Raven - Eon EN25QH32 to PREW (+PREW) Reported by Josua Mayer - Eon EN25QH64 to PREW (+EW) Reported by David s. Alessio - GigaDevice GD25LQ64(B) to PREW (+PREW) Reported by Greg Tippit - Intel 28F001BN/BX-T to PREW (+EW) Reported by Lu Xie - Micron M25P10-A to PREW (+W) Reported by the Raven - Micron M25PE40 Reported by David Wood - Micron N25Q128..3E to PREW (+PREW) Reported by Miklós Márton - Macronix MX25L3273E to PREW (+PREW) Reported by Roklobsta on IRC - Macronix MX23L6454 to PR (+PR) Reported by Steven Honeyman - Macronix MX25U6435E/F to PREW (+PREW) Reported by Marcos Truchado and Guillermo von Hünefeld - PMC Pm25LQ032C to PREW (+EW) Reported by Dirk Knop - Spansion S25FL016A to PREW (+EW) Reported by Márton Miklós - Spansion S25FL128S......0 to PREW (+PREW) Reported by Jim Houston - Spansion S25FL204K to PR (+PR) Reported by Thomas Debrunner - SST SST49LF016C to PREW (+EW) Reported by Steven Stremciuc - SST SST39VF040 to PREW (+PREW) Reported by Xavier Bourgeois - SST SST49LF040B to PREW (+EW) Reported by Rikard Åhlund - ST M25P10-A to PREW (+W) Reported by Martijn Schiedon - Winbond W39V040FA to PREW (+EW) Reported by Евгений Черкашин - Winbond W39V080FA to PREW (+EW) Reported by protagonist0 on IRC - Winbond W25Q80.W to PREW (+PREW) Reported by Miklós Márton - Winbond W25X64 to PREW (+REW) Reported by Johannes Krampf and Manuel Dejonghe - Fix ID of AMIC A25LQ64 Reported by Roman Titov - Fix page size of Spansion S25FL129P......1 Copy and paste error from the 128S uniform 256kB variant, probably. - Add Micron/Numonyx phase-change memory IDs Miscellaneous: - Detect Android target OS. No changes are required to build flashrom (excluding programmers with NEED_PCI) on Android. - Update rayerspi (spipgm) URL - Fix max_data_write handling of at45db. - Minor refinement of the README - Mark board enable for the GA-K8NS variants as tested. Tested by "nicolae788" on a board with socket 754. - Mark "Multi-system" chassis as non-laptop case. - Remove W836xx log requests. We got enough (and no one is looking at them for the time being anyway). - serprog: improve invalid reply error message, contributed by Urja Rannikko. - Remove default include paths for MinGW. - Disable implicit rules in the Makefile because we don't need them and they just make the build (imperceptibly) slower. - Enable our own strnlen() implementation not only on DJGPP but also if HAVE_STRNLEN is not defined. This is needed to get older BSDs (e.g. NetBSD 6.0, FreeBSD < 8.0) to work. - Tiny other stuff. Corresponding to flashrom svn r1917. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add atapromise programmerJoseph C. Lehner2016-01-161-0/+14
| | | | | | | | | | | | | | | | | | Supported controllers are Promise PDC20262 (FastTrak66/Ultra66), PDC20265 (FastTrak100 Lite/Ultra100), PDC20267 (FastTrak100/Ultra100). At least the Ultra100 only has address lines A0-A14 wired up, limiting addressable chip size to 32 kB. The flash chips mounted on those controllers usually is 128 kB, i.e. parts of the flash chip are inaccessible. As a workaround, the driver implicitly truncates the size of all flash chips to 32 kB. Works well for the factory installed flash. Do NOT use as a generic programmer for chips >32 kB. Corresponding to flashrom svn r1916. Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Set LC_ALL globally in MakefileStefan Tauner2016-01-141-1/+11
| | | | | | | | | | | This won't work for the majority of relevant commands because they use the $(shell) function and GNU make does not relay variables exported within the makefile to their evironment. Corresponding to flashrom svn r1914. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Pimp the manpage to create nicer hyperlinks and HTML outputStefan Tauner2016-01-141-2/+6
| | | | | | | | | | Also, add a target to the makefile to build a flashrom.8.html with groff. To fix some formatting issues this adds some indention commands as well. Corresponding to flashrom svn r1913. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add support for linking statically with CONFIG_STATIC=yesStefan Tauner2016-01-071-0/+5
| | | | | | | | | | | | | | This is loosly based on the following changes of chromiumos: - flashrom: Add default pkg-config definition. Change-Id: I28744af0fd2d2d0bcc4569a5fbef370321691267 - Fix FT2232 feature on static builds. Change-Id: I70d4a7bda573b64cb18429a21792455b018c4cba Corresponding to flashrom svn r1912. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Make make errors more less flashilyStefan Tauner2016-01-071-60/+68
| | | | | | | | | | | | | | | | | | Previously we have hid almost all error messages from called tools like pkg-config or the compiler in the "configure" step. Only exceptions were the library checks because Carl-Daniel felt it improved usability in case of missing headers etc. However, this makes the output of the makefile less readable and in the case of pkg-config fallbacks the error messages are actually expected. Instead of throwing a part of the detailed stderr outputs of the tools into the face of the users and completely hiding others, write all of them into a separate log file instead. Corresponding to flashrom svn r1911. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* makefile: fix exports of PKG_CONFIG_LIBDIR for pkg-config callsStefan Tauner2016-01-071-3/+3
| | | | | | | | | The parenthesis pushed the exports into a subshell thus made them useless. Corresponding to flashrom svn r1910. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for libftdi1Alexandru Gagniuc2015-12-251-4/+6
| | | | | | | | | | | | | | Many distros no longer provide libftdi 0.2, and as a result, programmers that depend on libftdi must be disabled to compile flashrom. Luckily the libftdi API did not change significantly, so for our purposes, we can simply use the newer headers and link to the newer library if it is available. Corresponding to flashrom svn r1904. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Increase flashrom version number to 0.9.8Stefan Tauner2015-03-011-1/+1
| | | | | | | Corresponding to flashrom svn r1887. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a bunch of new/tested stuff and various small changes 23Stefan Tauner2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested mainboards: OK: - Elitegroup GF7050VT-M Reported by Alex - Fujitsu D2724-A1x (used in ESPRIMO E5625) Reported by Rainer Spillmann - Teclast X98 Air 3G Reported by Antonio Ospite Flash chips: - Fix MX25L6405(D) definition by splitting it. Reported by Reggie McMurtrey - Add Macronix MX25L..08E family and rearrange MX25L6436E. - Pm49FL004 to PREW (+EW) Reported by Georg Sauthoff Miscellaneous: - Add board enable for abit KN9 Ultra. - Mark ARM-USB-OCD as working OK. - Use "mobile devices" instead of "laptops" in output. - Tiny other stuff. Corresponding to flashrom svn r1886. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Increase flashrom version number to 0.9.8-rc1Stefan Tauner2015-02-111-1/+1
| | | | | | | | Corresponding to flashrom svn r1883. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add support for SPARC (maybe)Stefan Tauner2015-02-101-1/+1
| | | | | | | | | Was implemented by SPARC newbies, does (cross-)compile but is not run-tested. Corresponding to flashrom svn r1882. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add support for the Microchip PICkit2 as an SPI programmerJustin Chevrier2015-02-081-2/+21
| | | | | | | | | | | | | | | This patch was inspired by the code in AVRDude (open source Atmel AVR programmer) to support the PICkit2 written by Doug Brown [1]. The Dediprog code in flashrom was used as the template for this code with some reference to the ft2232 code as well. [1] - https://github.com/steve-m/avrdude/blob/master/pickit2.c Corresponding to flashrom svn r1881. Signed-off-by: Justin Chevrier <jchevrier@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Refine version check of libpci function pci_get_devStefan Tauner2015-02-081-0/+28
| | | | | | | | | | | | | The way more elegant check for the header fails unfortunately on CentOS 4.9 because PCI_LIB_VERSION is not defined at all although the domain parameter is present. This patch jumps through the hoops via an additional check in the Makefile to determine if the function accepts 5 parameters (new version) or not (old version). Corresponding to flashrom svn r1880. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a bunch of new/tested stuff and various small changes 22Stefan Tauner2015-02-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested mainboards: OK: - AOpen UK79G-1394 (used in EZ18 barebones) Reported by Lawrence Gough - ASUS M4N78 SE Reported by Dima Veselov - ASUS P5LD2-VM Mark board enable as tested (reported by Dima Veselov) - GIGABYTE GA-970A-UD3P (rev. 2.0) Reported by trucmar on IRC - GIGABYTE GA-990FXA-UD3 (rev. 4.0) Reported by ROKO__ on IRC - GIGABYTE GA-H77-DS3H (rev. 1.1) Reported by Evgeniy Edigarev - GIGABYTE GA-P55-USB3 (rev. 2.0) Reported by Måns Thörnqvist - MSI MS-7817 (H81M-E33) Reported by Igor Kolker Chipsets: - Marked Intel Bay Trail (0x0f1c) as tested OK Reported by Antonio Ospite - Refine Intel IDs * Add IDs for Braswell * Add IDs for 9 Series PCHs (e.g. H97, Z97) * Rename Wellsburg devices slightly Flash chips: - Atmel AT25DF041A to PREW (+PREW) Reported by Tai-hwa Liang - Atmel AT26DF161 to PREW (+EW) Reported by Steve Shenton - Atmel AT45DB011D to PREW (+PREW) Reported by The Raven - Atmel AT45DB642D to PREW (+PREW) Reported by Mahesh Mokal - Eon EN25F32 to PREW (+PREW) Reported by Arman Khodabande - Eon EN25F40 to PREW (+REW) Reported by Jerrad Pierce - Eon EN25QH16 to PREW (+EW) Reported by Ben Johnson - GigaDevice GD25Q20(B) to PREW (+PREW) Reported by Gilles Aurejac - Macronix MX25U6435E/F to PR (+PR) Reported by Matt Taggart - PMC Pm25LV512(A) to PREW (+PREW) Reported by The Raven - SST SST39VF020 to PREW (+PREW) Reported by Urja Rannikko - Winbond W25Q40.V to PREW (+EW) Reported by Torben Nielsen - Add E variants of MX25Lx006 (MX25L2006E, MX25L4006E, MX25L8006E). - Add MX25L6465E variant. - There was never a MX25L12805 AFAICT. - Split MX25L12805 from models with the same ID but an additional 32 kB eraser: MX25L12835F/MX25L12845E/MX25L12865E. - Add a bunch of ST parallel NOR flash chip IDs. Miscellaneous: - Whitelist ThinkPad X200. - Constify master parameter of register_master(). - Remove FEATURE_BYTEWRITES because it was never used at all. - Refine hwseq messages and make them less prominent. - Fix the yet unused PRIxCHIPADDR format string thingy. - Fix copy&paste error in spi_prettyprint_status_register_bp(). Spotted by Pablo Cases. - Add an additional SMBus controller revision to identify another Yangtze model. Thanks to Dan Christensen for reporting this issue. - dediprog: add missing include for stdlib.h. This fixes (at least) building on FreeBSD and DragonflyBSD with gcc. - Remove references to struct pci_filter from programmer.h. It is only needed in internal.c where it has a complete type. Having it in programmer.h provokes a warning by some old versions of gcc. - Tiny other stuff. Corresponding to flashrom svn r1879. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Properly include current libusb-win32 headerStefan Tauner2015-01-261-0/+5
| | | | | | | | | | | | | | libusb-win32 is using a different header file name (lusb0_usb.h) for a while. Use that on Windows builds to make clear that this is currently the correct header to include. Hopefully this will change soonish by migrating away from libusb-0. Corresponding to flashrom svn r1877. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Let pkg-config work with cross-compilersStefan Tauner2015-01-261-4/+6
| | | | | | | | | | | | | | | | | | | | In cross-compiler setups pkg-config often needs some help to determine the correct libraries. This can be done for example by setting PKG_CONFIG_LIBDIR to point to the directory where the cross-compile .pc files are located. If PKG_CONFIG_LIBDIR was not set already outside of the Makefile we set it according to LIBS_BASE and add the respective path to the linker's rpath. This makes it possible to easily cross-compile by only setting CC and LIBS_BASE on the command line. This patch also removes the explicit default for LIBS_BASE again because it does not play well with this change and was a bad idea to begin with. Corresponding to flashrom svn r1876. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix "unterminated variable reference" on ancient versions of GNU makeStefan Tauner2015-01-251-1/+3
| | | | | | | | | | | Add a workaround for the GNU make that shipped with CentOS 4.9, which apparently does not like semicolons in shell code (and which also ignores info functions altogether by the way). Corresponding to flashrom svn r1875. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Allow to easily build all optional modulesPatrick Georgi2015-01-191-0/+7
| | | | | | | | | | | | | | | | This patch adds a CONFIG_EVERYTHING flag to the Makefile that sets all CONFIG_* flags to "yes" if they were "no". This provides a comfortable way to ensure maximum code exposure to tools like coverity[0] or clang's scan-build. [0] https://scan.coverity.com/projects/1020 Corresponding to flashrom svn r1869. Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Refinements for DragonflyBSDStefan Tauner2015-01-101-3/+3
| | | | | | | | | | | | | - /usr/include/cpu/param.h defines PAGE_MASK already, hence use another name for the respective macro in nicintel_eeprom.c. - Since DragonflyBSD 3.6 DPorts is used as the default package manager. Therefore we should use /usr/local/ instead of /usr/pkg/ on default to fetch libraries. Corresponding to flashrom svn r1866. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Remove defaults for CC and ARStefan Tauner2015-01-101-2/+0
| | | | | | | | | | | | | AR defaults to "ar" anyway in GNU make and instead of gcc it is probably a better idea to use just cc. The latter allows to build on freebsd 10 without overriding CC or doing symlink tricks (because it uses clang as cc, provides multiple gcc packages but only versioned binaries without any actual "gcc" command name in the path). Corresponding to flashrom svn r1865. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Unify target OS and CPU architecture checksStefan Tauner2015-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | We do CPU architecture checks once for the makefile in arch.h and once for HW access abstraction in hwaccess.c. This patch unifies related files so that they can share the checks to improve maintainability and reduce the chance of inconsistencies. Furthermore, it refines some of the definitions, which - adds "support" for AARCH64 and PPC64, - adds big-endian handling on arm as well as LE handling on PPC64, - fixes compilation of internal.c on AARCH64 and PPC64. Additionally, this patch continues to unify all OS checks in flashrom by adding a new helper macro IS_WINDOWS. The old header file for architecture checking is renamed to platform.h to reflect its broader scope and all new macros are add in there. Corresponding to flashrom svn r1864. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Allow to easily set a global path prefix for libraries and include filesStefan Tauner2015-01-101-11/+7
| | | | | | | | | Gets rid of a few DOS-specific Makefile hacks. Corresponding to flashrom svn r1863. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Refine revision handlingStefan Tauner2015-01-101-2/+7
| | | | | | | | | | | | | Up to now, when compiling flashrom outside a VCS it would print two warnings that are not very clear to the user. This patch adds a new auxilary function to getrevision.sh and uses it in the makefile to print a single and more meaningful message to the user while hiding the warnings from getrevision.sh. Corresponding to flashrom svn r1862. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for the MSTAR I2C ISP protocolAlexandre Boeglin2014-12-201-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, among other chips, MSTAR manufactures SoCs that equip TV sets and computer screens, and it seems that all of their products use the same in-system programming protocol. Basically, they use the DDC channel of VGA or DVI connectors, which is actually an I2C bus, to encapsulate SPI frames (the flash chip is connected to the SoC through an SPI bus). I wrote this patch since the screen I bought had a software bug, and the manufacturer only released a new firmware binary, but no tool or instructions on flashing it. More details can be found here: http://boeglin.org/blog/index.php?entry=Flashing-a-BenQ-Z-series-for-free(dom) I only read code from Linux kernel archives published by Acer to figure out the protocol (for a touchscreen controller and an NFC chip, both by MSTAR, that share the same ISP protocol), so I don't think there are any legal problems with it. Compilation is currently disabled by default in the Makefile. If in doubt, additional Makefile bugs were added by Stefan. Corresponding to flashrom svn r1860. Signed-off-by: Alexandre Boeglin <alex@boeglin.org> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Refactor some CLI-relevant partsStefan Tauner2014-08-081-1/+1
| | | | | | | | | | | | | | | Begin to move functions that clearly belong to the (command line) user interface out of flashrom's core files like flashrom.c. - Refine messages within check_chip_supported(), rename it to print_chip_support_status() and move it to newly created cli_common.c. - Move flashbuses_to_text() to cli_common.c as well. - Move global verbosity variables to cli_output.c. Corresponding to flashrom svn r1841. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Unify non-shifted and shifted JEDEC accessCarl-Daniel Hailfinger2014-08-081-1/+1
| | | | | | | | | | | | | | | | | | Some Parallel bus chips have a 16-bit mode and an 8-bit mode. They use normal JEDEC addresses for 16-bit mode and shifted addresses (by 1 bit) for 8-bit mode. Some programmers can access them in 16-bit mode, but on all flashrom-supported programmers so far, we access them in 8-bit mode. This means we have to shift the addresses but apart from the addresses we can share the code. This patch makes this possible by checking the chip's FEATURE_ADDR_SHIFTED flag in common JEDEC functions and applying the right addresses respectively. Corresponding to flashrom svn r1840. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Refactor unlocking of many chips with locking at register space address +2Carl-Daniel Hailfinger2014-08-031-1/+1
| | | | | | | | | | | This includes PMC Pm49*, SST 49LF00*, ST M50* and Winbond W39* families. The erase and write test status bits of all affected chips have been reset. Corresponding to flashrom svn r1833. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add new programmer for SPI EEPROMs attached to Intel 82580 NICsRicardo Ribalda Delgado2014-07-281-0/+14
| | | | | | | | | | | | | | | | This patch lets you read and write the EEPROM on 82580-based gigabit NIC cards. So far it has been tested on copper NICs only, but other variants employing this controller should work too. It is a nice substitution for the official eeupdate tool. Speed is quite decent: less than 4 seconds for erases or writes of 32 kB. Corresponding to flashrom svn r1832. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Tested-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Introduce helpers.cStefan Tauner2014-06-121-1/+1
| | | | | | | | | | Move some suitable functions there, add it to the Makefile, but leave the declarations in flash.h for now. Corresponding to flashrom svn r1819. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add default arguments for the default programmer (only)Stefan Tauner2014-06-021-0/+6
| | | | | | | | | This code exists thanks to food for thought from Urja Rannikko. Corresponding to flashrom svn r1814. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add IT8212F as programmerKyösti Mälkki2014-06-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This PCI PATA controller can use 3V parallel flash up to 128 kB. My card was identified as: PCI 1283:8212, subsystem 1283:0001. and labelled as: Innovision Multimedia LTD. EIO ATA133 RAID (DM-8401 Ver A) This particular card did not require setting of any GPIO signals to enable flash writing. My card has Pm39LV512 in PLCC32 package without socket. Rebased by Stefan (automatic cleanup, some PCI changes, changed enable bit handling). Committed with test state NT because the rebased version was not tested on real hardware (yet). Corresponding to flashrom svn r1812. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* atavia: Fix a few problems overlooked/introduced while rebasingStefan Tauner2014-06-011-5/+0
| | | | | | | Corresponding to flashrom svn r1811. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add VIA VT6421A LPC programmer driverJonathan Kollasch2014-06-011-0/+19
| | | | | | | | | | | | | | | Due to the mysterious address handling of this chip the user can specify a base address with the offset parameter, e.g.: flashrom -p atavia:offset=0xFFF00000 Thanks to Idwer Vollering for his iterative testing of this code, as well as to Martijn Bastiaan who did the last tests before merging. Corresponding to flashrom svn r1809. Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* BSD refinementsStefan Tauner2013-09-121-0/+14
| | | | | | | | | | | | | | | Make it easier to compile flashrom under NetBSD and DragonFlyBSD: - Use /usr/pkg/ as prefix for includes and linking - Use pciutils as include path for the right(tm) libpci Also, fix date handling in getrevision.sh to work with the various formats for invoking 'date'. This also uses svn's info --xml output instead of the regular one. Corresponding to flashrom svn r1742. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Tested-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Makefile: Warn if user tries to compile for libpayload w/o crossgccStefan Tauner2013-09-121-0/+5
| | | | | | | | | | | | While flashrom is not as picky on compilers as coreboot, there is still a high probablilty of breakage when one combines libpayload and distribution compilers. Print a warning if we detect that to give the daring user a hint how to resolve the explosions potentially following below it. Corresponding to flashrom svn r1740. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Cleanup ST M50 driverStefan Tauner2013-09-121-1/+1
| | | | | | | | | | | | | | | There are two locking strategies used by this umbrella family, one uniform and one that matches the sector layout of the chip. Refactor the functions involved and rename the overly complicated file to just stm50.c and the functions accordingly. This fixes unlocking of some of the non-uniform chips and gets rid of the abuse of page_size. Corresponding to flashrom svn r1736. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add an internal DMI decoderSean Nelson2013-09-111-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we had to rely on dmidecode to decode the DMI/SMBIOS table. This patch integrates a DMI decoder into flashrom. The old behavior of calling dmidecode can be brought back by using CONFIG_INTERNAL_DMI=no. Significant portions of this patch were taken from dmidecode, hence add its authors to the copyright notice (dmidecode is also GPL2+). We do a few things differently though. First of all we do more bounds checking to prevent accessing unmapped memory. We do not support disovery via EFI (yet), but memory scanning only. We handle the chassis-type lock bit correctly which dmidecode did not for a long while. The API to the rest of flashrom remains stable, but the output changes slightly. To share as much code as possible (which actually is not much), i have added dmi_fill methods that get called in dmi_init. They are reponsible to fill the dmi_strings array and setting the is_laptop variable. After it is called, dmi_init prints all dmi_strings. Previously the strings were printed in the order they were discovered, followed by the chassis-type, which is now output earlier (in dmi_fill). Because DJGPP does not support strnlen a simple implementation was added for it. This is still only available on x86; actually it is not even compiled in for other architectures at all anymore. Corresponding to flashrom svn r1735. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com> Tested-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* DOS refinementsStefan Tauner2013-09-111-5/+7
| | | | | | | | | | | | | This allows to use the DOS library trees stored in a user-specified directory. I have mirrored the needed patches, sources and binaries (the latter are properly licensed to allow that) in the flashrom wiki, so use those URLs instead of the original sources. Corresponding to flashrom svn r1734. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Automatically add version and date to the manpageJoerg Mayer2013-08-291-5/+9
| | | | | | | | | | | | To avoid funny effects of ever changing files tracked by the VCS this patch moves the manpage data to flashrom.8.tmpl and generates the actual manpage with a new makefile target if needed. Corresponding to flashrom svn r1728. Signed-off-by: Joerg Mayer <jmayer@loplof.de> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Improve getrevision.shStefan Tauner2013-08-291-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove bashism. - simplify some git-related code. - improved parameter and error handling. - additional -d/--date action which is similar to the timestamp action. - support for an optional path parameter. - there is only one sane time format. - and only one sane date format too. - use UTC dates and times only. - vastly improve git_url() to print the correct remote url and "nearest" branch. - remove username from repository URLs. - add "-dirty" to local revisions if there are uncommitted changes. - indicate in local revisions how many git-only commits were done since branching from upstream svn. - fix svn_revision() fallback to svn info and remove git-svn. - print leading r in script instead of hardcode it in the makefile; no more "0.9.7-runknown". - make retrieving the upstream revision work even in cloned git-svn repositories. - more abstractions and helper functions. - less fragmentation of actual functionality. Corresponding to flashrom svn r1727. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* libpayload: By default build libflashrom.a instead of flashromStefan Tauner2013-08-281-0/+4
| | | | | | | | | | | | | | | | | | | | | Flashrom won't build nor run as native payload very soon (or ever). This patch changes a special GNU make variable that allows to select the default goal which is taken if no goal is given explicitly on the command line. Normally this would be the first rule in Makefile, i.e. all. This won't compile if the target OS is libpayload, hence change it to "libflashrom.a" in that case. This requires two not completely ancient GNU make features: - MAKECMDGOALS - .DEFAULT_GOAL Checking for these with ancient-only GNU make features is non-trivial and hereby postponed. Corresponding to flashrom svn r1726. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add support for Atmel AT45DB* chipsAidan Thornton2013-08-271-1/+1
| | | | | | | | Corresponding to flashrom svn r1723. Signed-off-by: Aidan Thornton <makosoft@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Makefile: Explain process of handling CONFIG_* variablesStefan Tauner2013-08-251-2/+13
| | | | | | | Corresponding to flashrom svn r1721. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
OpenPOWER on IntegriCloud