summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Increase flashrom version number to 0.9.9.HEADmasterstefanct2016-03-131-1/+1
| | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1954 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Fix fscanf format string security bug in layout.chailfinger2016-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. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1953 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Implement serial port shutdown both for regular termination and errorhailfinger2016-03-131-0/+17
| | | | | | | | | | condition in pony_spi. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1952 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add a bunch of new/tested stuff and various small changes 25.stefanct2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1951 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Fix compilation on SunOS.stefanct2016-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 Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1950 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Specifying spispeed=reserved as programmer parameter resulted inhailfinger2016-03-121-13/+14
| | | | | | | | | | | selecting the default SPI speed instead of aborting. Rewrite the logic to be more readable. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1949 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for GNU Hurd.stefanct2016-03-062-1/+13
| | | | | | | Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1948 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for GD25VQ21B, GD25VQ40C, GD25VQ80C and GD25VQ16C.stefanct2016-03-062-3/+164
| | | | | | | Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1947 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Makefile: Fix driver blacklist dependencieshailfinger2016-02-281-10/+3
| | | | | | | | | | | | Allow mstarddc_spi and pony_spi on Android. Allow mstarddc_spi and pony_spi on architectures with unsupported raw access. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1946 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* rayer_spi: add support for SPI Tiny Tools-compatible hardware.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1945 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* makefile: allow to disable all default-yes config variables with ↵stefanct2016-02-261-0/+10
| | | | | | | | | | | CONFIG_NOTHING=yes. All credit for this should be given to Patrick Georgi (see r1869). Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1944 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Partial architecture support for alpha hppa m68k sh s390hailfinger2016-02-252-1/+117
| | | | | | | | | | Only hardware not needing raw access (PCI, memory, port I/O) is supported. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1943 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* dediprog: use ordinary USB devs array.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1942 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* pickit2_spi: use ordinary USB devs array.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1941 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Increase version number to 0.9.9-rc1.stefanct2016-02-211-1/+1
| | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1939 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Automatically disable atapromise for libpayload as well.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1938 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for GigaDevice GD25VQ41B and GD25Q128C.stefanct2016-02-212-1/+83
| | | | | | | Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1937 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Allow global disable of all drivers requiring libusb* or libpcihailfinger2016-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 Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1936 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Automatically disable atapromise on non-x86hailfinger2016-02-201-0/+5
| | | | | | | | | | | We do not support PCI port I/O on non-x86 (yet). Atapromise needs PCI port I/O. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1935 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Do not require PCI code for RayeR SPI driverhailfinger2016-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. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1934 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* dediprog: tremendously improve performance on SF600 by ignoring the spec.stefanct2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1933 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Include sys/glibc-syscalls.h instead of inexistent sys/io.h on Android.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1932 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Makefile: fix overriding of make command line arguments.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1931 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Fix chip size limiting in atapromisehailfinger2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1930 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* dediprog: port to libusb1 and use asynchronous bulk transfers for reading.stefanct2016-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 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1929 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* dediprog: use command 0x0B (set voltage) only on older SF100s.stefanct2016-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 Signed-off-by: David Hendricks <dhendrix@chromium.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1928 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* dediprog: add support for SF600.stefanct2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1927 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* List affected features for missing librarieshailfinger2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1926 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* ft2232_spi: Add support for Google Servo boards (v1 + v2).stefanct2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1925 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Fix compilation on non-i386 architectures on OpenBSD.stefanct2016-02-071-1/+1
| | | | | | | | | | We use a header for MSR accesses on AMD Geodes that does only exist on 32 bit x86 machines. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1924 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for ESI ES25P40, ES25P80 and ES25P16.stefanct2016-02-011-0/+93
| | | | | | | Signed-off-by: Hatim Kanchwala <hatim@hatimak.me> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1923 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Separate Am29F0xx from Am29F0xxA/B definitions.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1922 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for WCH CH341A as an SPI programmer.stefanct2016-01-315-3/+592
| | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1921 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add infrastructure to support libusb-1.0.stefanct2016-01-312-2/+51
| | | | | | | Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1920 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Makefile: print compile commands of configure steps to the build details file.stefanct2016-01-241-1/+13
| | | | | | | | | | This allows for even more easy debugging of build failures due to problems with libraries. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1919 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* dediprog: support new communication protocol, cleanup and enable by default.stefanct2016-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). 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1918 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add a bunch of new/tested stuff and various small changes 24.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1917 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add atapromise programmerhailfinger2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1916 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Fix file descriptor leak in serial.c.stefanct2016-01-161-4/+6
| | | | | | | | | Found by Coverity as "CID 1348465: Resource leaks". Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1915 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Set LC_ALL globally in Makefile.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1914 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Pimp the manpage to create nicer hyperlinks and HTML output.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1913 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for linking statically with CONFIG_STATIC=yes.stefanct2016-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 Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1912 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Make make errors more less flashily.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1911 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* makefile: fix exports of PKG_CONFIG_LIBDIR for pkg-config calls.stefanct2016-01-071-3/+3
| | | | | | | | | The parenthesis pushed the exports into a subshell thus made them useless. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1910 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* serial: support arbitrary baud rates on Windows.stefanct2016-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1909 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* serprog: fix missing device parameter error message on Windows.stefanct2016-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/...". Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1908 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* serprog: allow to omit specifying a baud rate.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1907 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* serprog: ignore failures when setting serial port options.stefanct2016-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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1906 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* serprog: clear NDELAY flag only once after opening the port.stefanct2016-01-041-5/+13
| | | | | | | | | | | Change sp_openserport() to directly clear the O_NONBLOCK flag that is potentially set by opening the device with O_NDELAY instead of clearing ALL flags in serialport_config() unconditionally. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Urja Rannikko <urjaman@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1905 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for libftdi1.stefanct2015-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. 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1904 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1