summaryrefslogtreecommitdiffstats
path: root/layout.c
Commit message (Collapse)AuthorAgeFilesLines
* Internal (onboard) programming was the only feature which could not be disabledCarl-Daniel Hailfinger2009-12-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make various pieces of code conditional on support for internal programming. Code shared between PCI device programmers and onboard programming is now conditional as well. It is now possible to build only with dummy support: make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no This allows building for a specific use case only, and it also facilitates porting to a new architecture because it is possible to focus on highlevel code only. Note: Either internal or dummy programmer needs to be compiled in due to the current behaviour of always picking a default programmer if -p is not specified. Picking an arbitrary external programmer as default wouldn't make sense. Build and runtime tested in all 1024 possible build combinations. The only failures are by design as mentioned above. Corresponding to flashrom svn r797. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Adept layout handling to new programmer infrastructure and fix off-by-one errorCarl-Daniel Hailfinger2009-08-191-6/+5
| | | | | | | | | | | | | Flashrom has the ability to use layout files with romentries, but this feature was not adapted to the programmer infrastructure and had undefined behaviour for flasher!=internal. The romentry handling had an off-by-one error which caused all copies to end up one byte short. Fix these issues. Corresponding to flashrom svn r694. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Sometimes we want to read/write more than 4 bytes of chip content at onceCarl-Daniel Hailfinger2009-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | Add chip_{read,write}n to the external flasher infrastructure which read/write n bytes at once. Fix a few places where the code used memcpy/memcmp although that is strictly impossible with external flashers. Place a FIXME in the layout.c code because usage is not totally clear and needs to be fixed to support external flashers. As a nice side benefit, we get a noticeable speedup for builtin flash reading which is now a memcpy() of the full flash area instead of a series of single-byte reads. Corresponding to flashrom svn r579. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Drop unused/duplicated #includes and some dead codeUwe Hermann2009-05-161-2/+0
| | | | | | | | | Build-tested on 32bit x86. Corresponding to flashrom svn r521. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Don't duplicate option description in README, the manpage already has that infoUwe Hermann2009-04-231-2/+1
| | | | | | | | | Also, additional small cosmetic fix. Corresponding to flashrom svn r440 and coreboot v2 svn r4196. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Check return value of fscanf()/fwrite()/fread()Peter Stuge2009-01-121-2/+2
| | | | | | | | | Fix build error on distros with warn_unused_result attributes in glibc. Corresponding to flashrom svn r378 and coreboot v2 svn r3857. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Yul Rottmann <yulrottmann@bitel.net>
* If you pass a bogus layout file to the -l option flashrom will segfaultUwe Hermann2008-12-221-0/+5
| | | | | | | | | | Fix that by throwing an error instead. Corresponding to flashrom svn r370 and coreboot v2 svn r3834. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* Coding-style fixes for flashrom, partly indent-aidedUwe Hermann2008-10-181-3/+3
| | | | | | | Corresponding to flashrom svn r326 and coreboot v2 svn r3669. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix and clean up coreboot image detection heuristicCarl-Daniel Hailfinger2008-07-111-12/+20
| | | | | | | | | Additional compile fix for NetBSD. Corresponding to flashrom svn r303 and coreboot v2 svn r3420. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Minor cosmetics, e.gUwe Hermann2008-07-031-7/+4
| | | | | | | | | Make stuff fit in 80 chars/line etc. Corresponding to flashrom svn r296 and coreboot v2 svn r3412. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Improve coreboot image detection heuristicCarl-Daniel Hailfinger2008-07-031-1/+13
| | | | | | | | | | It's not absolutely perfect, but the likelihood of this check to fail is 0.000000000000000000000000013 (1.3*10^-26) which is good enough for me. Corresponding to flashrom svn r292 and coreboot v2 svn r3408. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Force read unknown flash chipsPeter Stuge2008-06-181-3/+1
| | | | | | | | | | | | | | | | | | | When flash chip detection fails, it is still useful and possible to read the flash chip contents. If no flash chip is found in normal probes and the -f -r -c CHIPNAME options are given, a successful probe for the specified chip is forced, and then flashrom reads the flash chip using either the read function for the specified chip, or if there is none, a simple memcpy(). The patch also moves the global variable int force in flashrom.c into main() and passes it as a parameter to layout.c:show_id(), which was the only other function that used the variable. This is needed to avoid confusion with the new parameter int force which is added to flashrom.c:probe_flash() and used to force probe success for the chip named in char *chip_to_probe. Corresponding to flashrom svn r259 and coreboot v2 svn r3367. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Ward Vandewege <ward@gnu.org>
* Add missing license header to layout.cUwe Hermann2008-03-041-0/+20
| | | | | | | | | | The file was written by Stefan Reinauer for coresystems GmbH in 2005, as confirmed on IRC. Corresponding to flashrom svn r198 and coreboot v2 svn r3126. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Rename LinuxBIOS to corebootStefan Reinauer2008-01-181-2/+2
| | | | | | | Corresponding to flashrom svn r178 and coreboot v2 svn r3054. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Some cosmetic cleanups in the flashrom code and outputUwe Hermann2007-10-171-7/+6
| | | | | | | Corresponding to flashrom svn r151 and coreboot v2 svn r2873. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Revert my last cleanup patchUwe Hermann2007-10-101-10/+10
| | | | | | | Corresponding to flashrom svn r143 and coreboot v2 svn r2847. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Cosmetic changes to make the flashrom output more consistentUwe Hermann2007-10-101-10/+10
| | | | | | | Corresponding to flashrom svn r142 and coreboot v2 svn r2846. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Cosmetic fixesUwe Hermann2007-08-231-0/+2
| | | | | | | Corresponding to flashrom svn r130 and coreboot v2 svn r2748. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Drop a bunch of useless header files, merge them into flash.hUwe Hermann2007-08-231-3/+1
| | | | | | | Corresponding to flashrom svn r128 and coreboot v2 svn r2746. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Fix coding style of flashrom by running indent on all filesUwe Hermann2007-05-091-68/+68
| | | | | | | | | | | | indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs *.[ch] Some minor fixups were required, and maybe a few more cosmetic changes are needed. Corresponding to flashrom svn r108 and coreboot v2 svn r2643. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Exit on return code of read_layout and print error message to stderr instead ↵Stefan Reinauer2007-04-141-1/+2
| | | | | | | | | of stdout Corresponding to flashrom svn r104 and coreboot v2 svn r2610. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Redo image checking in conversion caseStefan Reinauer2005-12-181-13/+31
| | | | | | Please update to this release if you are using flashrom. Corresponding to flashrom svn r38 and coreboot v2 svn r2147.
* Multiple unrelated changesStefan Reinauer2005-12-181-3/+7
| | | | | | | | * make -v switch print debug messages. * do case insensitive comparison of mainboards, as wished on the mailinglist Corresponding to flashrom svn r37 and coreboot v2 svn r2146.
* Flashrom update from Stefan, resolve issue 21Ollie Lho2005-11-261-0/+170
Corresponding to flashrom svn r34 and coreboot v2 svn r2111.
OpenPOWER on IntegriCloud