summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix undefined behavior in some preprocessor define checksstableStefan Tauner2017-10-122-6/+30
| | | | | | | | | | | | Macros like the one below would produce undefined behavior when used as expression/condition in #if preprocessor directives: This patch replaces all such statements with a more verbose but well-defined #if/#define x 1/#else/#define x 0/#endif Found by clang (warning introduced in r258128), reported by Idwer. Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Convert flashrom to gitStefan Tauner2017-10-1212-133/+441
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Drop support for Subversion in the getrevision script and Makefile. - Refinement of getrevision to have a single function determining the new flashrom version string (based on git describe). - Add .gitignore and .gitattributes file (the latter to limit exports). - Restore modification dates of the exported files from the VCS. - Stop exporting VCS log dumps to CHANGELOG. This makes no sense. - Export VCS metadata needed by the Makefile to versioninfo.inc - Do not export the pre-"compiled" manpage. It can be generated like anything else from the code dump with versioninfo.inc - Add some initial client-side git hooks that get installed automatically on make runs: * pre-commit: - test for whitespace errors via git diff-index --check * commit-msg: - Use the up to date hook from gerrit to add Change-Id tags. Unlike the upstream hook, add them to fixup/squash changes too to allow for our staging process. - Test for duplicate sign-offs/acks. * When pushing to one of the upstream repositories check mandatory rules: - existing signoffs and acks in all new commits - no deletions of branches - no new branches other than versioned branches (e.g., 0.0.x) - no history rewriting of branches - Various other small refinements, bikesheddings and cosmetic changes to slow down progress of flashrom and humanity as a whole. Original-Change-Id: I64eef21982cac0a0a7419bcd2c8a936672ae9cb2 Original-Reviewed-on: https://review.coreboot.org/19206 Original-Reviewed-by: Nico Huber <nico.h@gmx.de> Original-Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Change-Id: I325edb7d9890c412a44ecacb5161268d3dbccc57 Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Signed-off-by: David Hendricks <dhendricks@fb.com> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/21923 Acked-by: Stefan Tauner <stefan.tauner@gmx.at>
* Increase flashrom version number to 0.9.9v0.9.9Stefan Tauner2016-03-131-1/+1
| | | | | | | | | Corresponding to flashrom svn r1954. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-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>
* Fix fscanf format string security bug in layout.cCarl-Daniel Hailfinger2016-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | An internal security audit of the flashrom project by Carl-Daniel Hailfinger found a buffer overflow bug present in all flashrom versions since the year 2005. This bug was independently found and reported to flashrom.org by Cosmin Gorgovan a few days ago. A buffer on the stack and a buffer on the heap are affected by the overflow caused by an incorrect fscanf format string. The buffer overflow can only be triggered if the optional layout feature is used and if the user manually specifies a specially crafted layout file on the command line. Command line parsing and flash image handling do not trigger the buggy code path. Most usage of flashrom does not involve layout files. The fix in this commit (changed fscanf format string) can be applied to layout.c of all past flashrom versions. Corresponding to flashrom svn r1953. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Shutdown serial port in pony_spiCarl-Daniel Hailfinger2016-03-131-0/+17
| | | | | | | | | | Implement serial port shutdown both for regular termination and error conditions in pony_spi. Corresponding to flashrom svn r1952. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a bunch of new/tested stuff and various small changes 25Stefan Tauner2016-03-139-75/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested mainboards: OK: - ASRock Fatal1ty 970 Performance and P4i65G Reported by anonymous email message ID: 932677687262b1300eaf14260999d9262c31@guerrillamail.com The latter actually had a tested board enable already. Flash chips: - Eon EN25Q128 to PREW (+PREW) Reported by Adrian Graham - GigaDevice GD25VQ41B to PREW (+PREW) Reported by David Hendricks - Winbond W39V040FB to PREW (+EW) Reported by fjed on IRC Miscellaneous: - Change PCI IDs of "MS-6577 (Xenon)" board enable. The previous IDs contained the on-board display adapter which is disabled when a dedicated graphics card is installed. - Add a note to the README how to overcome the clang warning if only a single programmer is enabled. - Fix some typo and manpage problems found by lintian - r1920 introduced some explicit calls to pkg-config instead of $(PKG_CONFIG). This patch corrects that. - Make MS-7094 (K8T Neo2-F V2.0) board enable less contestable. Previous PCI IDs were board-specific but ot the other of devices that could be disabled by the firmware or that vary among hardware revions. There are no good alternatives available. However, since we always have a DMI decoder available now, we can use non-board-specific devices without taking risks. Thanks to Uwe Hermann for reporting and testing. - Some other small changes to clean up whitespace and fix some warnings from Debian's lintian. Corresponding to flashrom svn r1951. 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>
* Fix compilation on SunOSStefan Tauner2016-03-132-2/+2
| | | | | | | | | | | | | | This came up when I was testing if building on SunOS still works on the buildbot's instance of OmniOS r151014 which is based on illumos. The fix is - to link against libnsl - a small C type fix in ich_descriptor_tool Corresponding to flashrom svn r1950. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* sb600spi: rewrite and fix corner caseCarl-Daniel Hailfinger2016-03-121-13/+14
| | | | | | | | | | | Specifying spispeed=reserved as programmer parameter resulted in selecting the default SPI speed instead of aborting. Rewrite the logic to be more readable. Corresponding to flashrom svn r1949. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for GNU HurdStefan Tauner2016-03-062-1/+13
| | | | | | | Corresponding to flashrom svn r1948. 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 GD25VQ21B, GD25VQ40C, GD25VQ80C and GD25VQ16CHatim Kanchwala2016-03-062-3/+164
| | | | | | | Corresponding to flashrom svn r1947. Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Makefile: Fix driver blacklist dependenciesCarl-Daniel Hailfinger2016-02-281-10/+3
| | | | | | | | | | | Allow mstarddc_spi and pony_spi on Android. Allow mstarddc_spi and pony_spi on architectures with unsupported raw access. Corresponding to flashrom svn r1946. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* rayer_spi: add support for SPI Tiny Tools-compatible hardwareStefan Tauner2016-02-282-1/+10
| | | | | | | | | | | Apparently, there is at least one board of Russian origin (coined SPI_TT LPT) that works with SPI Tiny Tools which is a closed-source Windows GUI program somewhat similar to flashrom. Corresponding to flashrom svn r1945. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* makefile: allow to disable all default-yes config variables with ↵Stefan Tauner2016-02-261-0/+10
| | | | | | | | | | | CONFIG_NOTHING=yes All credit for this should be given to Patrick Georgi (see r1869). Corresponding to flashrom svn r1944. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Partial architecture support for alpha hppa m68k sh s390Carl-Daniel Hailfinger2016-02-252-1/+117
| | | | | | | | | Only hardware not needing raw access (PCI, memory, port I/O) is supported. Corresponding to flashrom svn r1943. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* dediprog: use ordinary USB devs arrayStefan Tauner2016-02-223-4/+12
| | | | | | | | | | Even though there is currently only one USB device ID in the wild using our standard way to define the devices creates nicer output for -L and -z. Corresponding to flashrom svn r1942. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* pickit2_spi: use ordinary USB devs arrayStefan Tauner2016-02-223-7/+12
| | | | | | | | | | Even though there is currently only one USB device ID in the wild using our standard way to define the devices creates nicer output for -L and -z. Corresponding to flashrom svn r1941. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Increase version number to 0.9.9-rc1v0.9.9-rc1Stefan Tauner2016-02-211-1/+1
| | | | | | | | | Corresponding to flashrom svn r1939. 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> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Automatically disable atapromise for libpayload as wellStefan Tauner2016-02-211-0/+6
| | | | | | | | | | | The atapromise module uses the rom_size field of the struct pci_dev found in pci.h that does not exist in libpayload's implementation and thus does not compile with libpayload. Corresponding to flashrom svn r1938. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for GigaDevice GD25VQ41B and GD25Q128CHatim Kanchwala2016-02-212-1/+83
| | | | | | | Corresponding to flashrom svn r1937. Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Allow global disable of all drivers requiring libusb* or libpciCarl-Daniel Hailfinger2016-02-201-6/+39
| | | | | | | | | | | | | | This is especially helpful for compile tests with CONFIG_EVERYTHING=yes, but can also be used without CONFIG_EVERYTHING. Usage: make CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no CONFIG_ENABLE_LIBUSB1_PROGRAMMERS=no CONFIG_ENABLE_LIBPCI_PROGRAMMERS=no Corresponding to flashrom svn r1936. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Automatically disable atapromise on non-x86Carl-Daniel Hailfinger2016-02-201-0/+5
| | | | | | | | | | We do not support PCI port I/O on non-x86 (yet). Atapromise needs PCI port I/O. Corresponding to flashrom svn r1935. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Do not require PCI code for RayeR SPI driverCarl-Daniel Hailfinger2016-02-202-8/+30
| | | | | | | | | | | | CONFIG_RAYER_SPI only needs raw hardware access, but not libpci. Disable CONFIG_RAYER_SPI on Android because of missing inb/outb. Introduce NEED_RAW_ACCESS for raw memory access, PCI port I/O and MSR access. Corresponding to flashrom svn r1934. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* dediprog: tremendously improve performance on SF600 by ignoring the specStefan Tauner2016-02-201-0/+10
| | | | | | | | | | | | The solution was discovered in a collaborative bug hunt with testing done by David Hendricks. The actual culprit was found by Urja Rannikko by comparing vanilla flashrom with David's version in chromiumos. Corresponding to flashrom svn r1933. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Tested-by: David Hendricks <dhendrix@chromium.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Include sys/glibc-syscalls.h instead of inexistent sys/io.h on AndroidStefan Tauner2016-02-201-2/+8
| | | | | | | | | | This won't make raw I/O work magically but at least it would provide iopl() if some driver requires it and there is no better alternative currently. Corresponding to flashrom svn r1932. 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 overriding of make command line argumentsStefan Tauner2016-02-191-18/+18
| | | | | | | | | | | | | | | | | | Command line arguments given when executing make should not stop us from setting commonly user-configurable variables like CPPFLAGS or LDFLAGS. Without this patch 'make CPPFLAGS="-Ifail"' would fail to find libusb1 headers and abort. Add override statements where we append mandatory options to these variables to make (Debian) packagers more happy. Also, r1920 introduced some explicit calls to pkg-config instead of $(PKG_CONFIG). This patch corrects that as well. Corresponding to flashrom svn r1931. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix chip size limiting in atapromiseCarl-Daniel Hailfinger2016-02-181-24/+21
| | | | | | | | | | | | | | | | The current code is checking model_id to remember if a chip has already been limited, but if flashchips.c contains two subsequent chips with different vendor_id but identical model_id the adjustment will not be done. Switch to checking the chip size instead. If a chip has multiple whole-chip erase functions, only one will be modified. Fix that. Corresponding to flashrom svn r1930. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Joseph C. Lehner <joseph.c.lehner@gmail.com> Acked-by: Urja Rannikko <urjaman@gmail.com>
* dediprog: port to libusb1 and use asynchronous bulk transfers for readingNico Huber2016-02-184-94/+203
| | | | | | | | | | | | | 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>
* dediprog: use command 0x0B (set voltage) only on older SF100sDavid Hendricks2016-02-181-13/+24
| | | | | | | | | | | | | | | | | | | | | | | As per e-mail with Dediprog, command 0x0B (which is not listed in the command spec) is need on older Dediprogs only. SF100 with firmware V6.0.0 and newer as well as all SF600 programmers do not support it. The original wording by Dediprog was: "0x0B is used to adjust voltage level, but it's available for some version of SF100 only. SF100 of firmware V6.x.x and all version of SF600/SF600Plus not support this command. If you have old version of SF100, 0x0B is still needed." This patch renames dediprog_device_init() to something more appropriate and adds comments for clarity, and only runs it conditionally if we cannot query the devicestring initially. Based on ChromiumOS' Change-Id: I42de7d28401d7ad5be8fcf8a8c165e2614a45960 Corresponding to flashrom svn r1928. Signed-off-by: David Hendricks <dhendrix@chromium.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* dediprog: add support for SF600David Woodhouse2016-02-181-14/+65
| | | | | | | | | | | | | | | | | | | | This patch is based on a number of changes by David Woodhouse and David Hendricks. SF600 uses two bulk endpoints, 1 for out and 2 for in unlike the SF100 that uses only a single one. This patch make endpoint usage more explicit and sets the in/out endpoint(s) appropriately for SF100 and SF600. Also, change all SF100-specific strings in messages and leave standalone mode on SF600s. Corresponding to flashrom svn r1927. Signed-off-by: David Woodhouse <David.Woodhouse@intel.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>
* ft2232_spi: Add support for Google Servo boards (v1 + v2)Todd Broch2016-02-143-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been cherry-picked from various patches in the chromiumos tree denoted below. Change-Id: I4b679e23ab37a4357b1e3d23f6f65a1c31f7d71a Change-Id: Ibda56201ab4519315431c08206c61ceffb7c7e65 Change-Id: I540ad2d304dc69a7c79ca154beb744ef947ff808 Servo V2 has two FT4232H parts. The first one (denoted 'legacy') is dedicated to supporting orginal Servo V1 functionality. The second, residing at USB ID 0x18d1:5003 provides two other SPI interfaces on port A and B respectively. Additional changes by Alexandru Gagniuc, Hatim Kanchwala and Urja Rannikko: - The clock divisor is set to '6', as this creates a 10MHz SPI clock, which is the same SPI clock that the chromiumos branch produced. - Add udev rule for Google servo boards to util/flashrom.rules. - Add Google servo entry to manpage. Corresponding to flashrom svn r1925. Signed-off-by: Todd Broch <tbroch@chromium.org> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Fix compilation on non-i386 architectures on OpenBSDStefan Tauner2016-02-071-1/+1
| | | | | | | | | | We use a header for MSR accesses on AMD Geodes that does only exist on 32 bit x86 machines. Corresponding to flashrom svn r1924. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for ESI ES25P40, ES25P80 and ES25P16Hatim Kanchwala2016-02-011-0/+93
| | | | | | | Corresponding to flashrom svn r1923. Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Separate Am29F0xx from Am29F0xxA/B definitionsStefan Tauner2016-01-312-7/+88
| | | | | | | | | | The earlier versions of the chip require 0x2AAA for probes thus split the definitions and set them to untested to provoke reports. Corresponding to flashrom svn r1922. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for WCH CH341A as an SPI programmerUrja Rannikko2016-01-315-3/+592
| | | | | | | | 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-312-2/+51
| | | | | | | 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-232-113/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-2320-92/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-165-4/+226
| | | | | | | | | | | | | | | | | | 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>
* Fix file descriptor leak in serial.cStefan Tauner2016-01-161-4/+6
| | | | | | | | | Found by Coverity as "CID 1348465: Resource leaks". Corresponding to flashrom svn r1915. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* 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-147-66/+116
| | | | | | | | | | 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>
* serial: support arbitrary baud rates on WindowsUrja Rannikko2016-01-041-30/+34
| | | | | | | | | | | | Available baud rates obviously depend on driver support, but the CBR_ defines used so far are basically only for backwards source compatibility with Win16, so dont bother with them. Corresponding to flashrom svn r1909. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* serprog: fix missing device parameter error message on WindowsUrja Rannikko2016-01-041-2/+8
| | | | | | | | | | | Previously, flashrom -p serprog didnt notice a completely missing dev= string on Windows. Also, the error message shown if no device name followed contained a misleading "/dev/...". Corresponding to flashrom svn r1908. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* serprog: allow to omit specifying a baud rateStefan Tauner2016-01-044-46/+53
| | | | | | | | | | | On USB-based serial connections (VCP) the requested baud rate usually does not matter (much). Remove the arbitrary restriction and use whatever default values the OS/hardware provides. Corresponding to flashrom svn r1907. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com>
* serprog: ignore failures when setting serial port optionsStefan Tauner2016-01-041-5/+18
| | | | | | | | | | | | There is no good reason to abort earlier just because some options did not stick. This should improve compatibility without negative effects. If communication is affected by the missing flag(s) then we abort later anyway. Corresponding to flashrom svn r1906. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com>