summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
...
* abuild: change board identifier to a variant of CONFIG_BOARD_*Patrick Georgi2015-11-011-73/+102
| | | | | | | | | | | | | | | | | Since we now have multiple boards in a single mainboard directory (eg google/veyron), we need some other identifier from which to create output directories and filenames in abuild than the directory name. Use the wildcard part of CONFIG_BOARD_* instead. This changes the semantics of payload.sh handling: it's passed the single new identifier instead of two arguments "vendor" and "board" that constitute the mainboard directory's path. Change-Id: I0dc59c6a1ad1ee51d393fa06b98944a6da342cdf Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12277 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* abuild: change compile_target interfacePatrick Georgi2015-11-011-10/+9
| | | | | | | | | | | | | It only takes a single argument now, which is the directory below the coreboot-builds directory. Preparation for future work. The only visible change is in console output. Change-Id: I4b0fe268ccfb69a0403fa5f8b23444c07843386f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12276 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* abuild: change remove_board interfacePatrick Georgi2015-11-011-9/+8
| | | | | | | | | | | | It's passed the mainboard's directory name (below $TARGET) directly in preparation of more rework in that area. Change-Id: I3a82b8673fdea07bc5c957f76f4685c34a805334 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12275 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* abuild: remove ancient, unused test submission featurePatrick Georgi2015-11-011-44/+2
| | | | | | | | | | Its hardcoded HTTP endpoint is gone since 2007. Change-Id: Ib76814d31b571456d950d45f45912036b6fa82d1 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12274 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* abuild: drop the ability to specify a configurationPatrick Georgi2015-11-011-30/+21
| | | | | | | | | | | If you already have a configuration, there's no need to run it through abuild. Change-Id: I4dde9a7b96bb0c08ec5c91426a4dd3aa15e74edf Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12273 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
* util/scripts/no-fsf-addresses.sh: Strip last paragraphPatrick Georgi2015-10-311-4/+26
| | | | | | | | | | | | | | | | | | | | checkpatch.pl that we inherited from Linux checks for its absence, so it may be easiest to follow their style of not caring for the FSF's address anymore. TEST=visual check that `git diff` and `git diff |grep "^[+-]" | \ grep -v "^--- " |grep -v "^+++ " |sort | uniq -c |sort -n` look reasonable (matching number of removed and added comment terminators */, etc.). Also, `git grep -A3 "You should have received a copy"` only returns license texts, imported files, patches and help strings in applications as remaining copies of that paragraph Change-Id: I7c43860b6fd7ec526983c24b608994539128cfb9 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/11887 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
* tree: drop last paragraph of GPL copyright headerPatrick Georgi2015-10-31164-630/+1
| | | | | | | | | | | | | | | | It encourages users from writing to the FSF without giving an address. Linux also prefers to drop that and their checkpatch.pl (that we imported) looks out for that. This is the result of util/scripts/no-fsf-addresses.sh with no further editing. Change-Id: Ie96faea295fe001911d77dbc51e9a6789558fbd6 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/11888 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
* cbfstool: avoid naming variables "index"Patrick Georgi2015-10-311-11/+11
| | | | | | | | | | | | Those may collide with strings.h's index(), included transitively through system headers. Change-Id: I6b03236844509ea85cfcdc0a37acf1df97d4c5f3 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12279 Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* util/cbmem: Handle EC_VBOOT_DONE timestampShawn Nematbakhsh2015-10-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | This timestamp marks that EC verification has completed. BUG=chromium:537269 TEST=Run cbmem on glados, verify "1030:finished EC verification" is seen. BRANCH=None Change-Id: I0114febae689584ec8b12c169e70f2d3995d8d4d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: deeb2ab8085e5ea0a180633eb8fb1c86aadffe94 Original-Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Original-Change-Id: I4f09e970ffedc967c82e6283973cbbcb2fbe037f Original-Reviewed-on: https://chromium-review.googlesource.com/309280 Original-Commit-Ready: Shawn N <shawnn@chromium.org> Original-Tested-by: Shawn N <shawnn@chromium.org> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: http://review.coreboot.org/12230 Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Tested-by: build bot (Jenkins)
* util/fuzz-tests: Add fuzzer for jpeg decoderPatrick Georgi2015-10-295-0/+69
| | | | | | | | | | Mostly a proof of concept for adding fuzzing to our tree. Change-Id: I10e5ef3a426b9c74c288d7232a6d11a1ca59833b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/12183 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
* lint: Add Kconfig / Kconfig symbol lint toolMartin Roth2015-10-291-0/+1153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a tool to help identify issues in coreboot's Kconfig structure and in how the Kconfig symbols are used in the coreboot codebase. It identifies a number of issues: - #ifdef used on Kconfig symbol of type bool, hex, or int. These are always defined. - #define CONFIG_ in the coreboot code - these should be reserved for Kconfig symbols. - Redefinition of Kconfig symbols in the code. - Use of IS_ENABLED() on non-bool kconfig symbols. - Use of IS_ENABLED() on values that are not kconfig symbols. - Attempts to find default values that will not set anything because of earlier default settings. This needs to be expanded significantly. - Kconfig expressions using symbols which are not defined. - Kconfig symbols that are defined but not used anywhere in the Kconfig structure or coreboot code. - Kconfig keywords used incorrectly. - Whitespace issues - Kconfig 'source' keyword issues -- sourcing non-existant directories -- sourcing Kconfig files multiple times -- sourcing non-existent files -- Kconfig files in the codebase that are never sourced Additionally, it can be used to help debug the Kconfig tree by putting all the files together into a single file with their source locations listed. Run from the coreboot directory: util/lint/kconfig_lint Change-Id: Ia53b366461698d949f17502e99265c1f3f3b1443 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12088 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* cbfstool: extract rmodules as ELFs properlyAaron Durbin2015-10-293-0/+190
| | | | | | | | | | | | | | | | | | | With the previous ELF stage extract support the resulting ELF files wouldn't handle rmodules correctly in that the rmodule header as well as the relocations were a part of the program proper. Instead, try an initial pass at converting the stage as if it was an rmodule first. If it doesn't work fall back on the normal ELF extraction. TEST=Pulled an rmodule out of Chrome OS shellball. Manually matched up the metadata and relocations. Change-Id: Iaf222f92d145116ca4dfaa955fb7278e583161f2 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12222 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* cbfstool: add ELF symbol, relocation, and string table supportAaron Durbin2015-10-292-12/+430
| | | | | | | | | | | | | | | | | | | | | In order to convert rmodules back into ELF files one needs to add in the relocations so they can be converted back to rmodules. Because of that requirement symbol tables need to be present because the relocations reference the symbols. Additionally, symbol tables reference a string table for the symbol names. Provide the necessary support for adding all of those things to an ELF writer. TEST=Extracted rmodule from a cbfs and compared with the source ELF file. Confirmed relocations and code sizes are correct. Change-Id: I07e87a30b3371ddedabcfc682046e3db8c956ff2 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12221 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* cbfstool: merge consecutive elf sections in program segmentsAaron Durbin2015-10-291-17/+78
| | | | | | | | | | | | | | | | | | Instead of creating a loadable segment for each section with SHF_ALLOC flag merge those sections into a single program segment. This makes more tidy readelf, but it also allows one to extract an rmodule into an ELF and turn it back into an rmodule. TEST=Extracted both regular stages and rmodule stages. Compared against original ELF files prior to cbfs insert. Change-Id: I0a600d2e9db5ee6c11278d8ad673caab1af6c759 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12220 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* cbfstool: create ELF files when extracting stagesAaron Durbin2015-10-291-36/+137
| | | | | | | | | | | | | | | | | | | Instead of dumping the raw stage data when cbfstool extract is used on stage create an equivalent ELF file. Because there isn't a lot of information within a stage file only a rudimentary ELF can be created. Note: this will break Chrome OS' current usage of extract since the file is no longer a cbfs_stage. It's an ELF file. TEST=Extracted romstage from rom. Change-Id: I8d24a7fa4c5717e4bbba5963139d0d9af4ef8f52 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12219 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* cbfstool: add ELF header initialization helperAaron Durbin2015-10-292-0/+35
| | | | | | | | | | | | | | | | | In order for one to extract ELF files from cbfs it's helpful to have common code which creates a default executable ELF header for the provided constraints. BUG=None TEST=With follow up patch am able to extract out romstage as an ELF file. Change-Id: Ib8f2456f41b79c6c0430861e33e8b909725013f1 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12218 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* cbfstool: add optional -m ARCH to extractAaron Durbin2015-10-293-5/+6
| | | | | | | | | | | | | | | | | | In order to prepare allowing for one to extract a stage into an ELF file provide an optional -m ARCH option. This allows one to indicate to cbfstool what architecture type the ELF file should be in. Longer term each stage and payload will have an attribute associated with it which indicates the attributes of the executable. Change-Id: Id190c9719908afa85d5a3b2404ff818009eabb4c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12217 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* lint: don't check for whitespace in jpeg imagesPatrick Georgi2015-10-281-1/+1
| | | | | | | | Change-Id: I0e1bbb198be6512e9f696c3dddca7f65436e6f5b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/12182 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
* cbfstool: decompress stage files on extractionAaron Durbin2015-10-271-4/+89
| | | | | | | | | | | | | | | | | | | | | | In order to actually do something useful with the resulting file after being extracted decompress stage files' content. That way one can interrogate the resulting file w/o having to decompress on the fly. Note: This change will cause an unexpected change to Chrome OS devices which package up individual stage files in the RW slots w/o using cbfs. The result will be that compressed stages are now decompressed. Longer term is to turn these files into proper ELF files on the way out. Change-Id: I373ecc7b924ea21af8d891a8cb8f01fd64467360 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12174 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* vgabios: fix compilation after x86emu changesStefan Reinauer2015-10-2514-84/+145
| | | | | | | | | | | | | | This utility links in coreboot code, and has been broken for a while again after removing some hacks from coreboot. I hadn't realized how bad it was broken last time, and since most of this stuff is still in a pretty bad shape, I decided to throw all of the changes together. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Change-Id: If3e4399b1b0e947433b97caa29962ef66ea2993d Reviewed-on: http://review.coreboot.org/11736 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* cbfstool: have decompress functions provide ouput data sizeAaron Durbin2015-10-254-7/+17
| | | | | | | | | | | | | | Currently cbfs stage files that are compressed do not have the decompressed size readily available. Therefore there's no good way to know actual size of data after it is decompressed. Optionally return the decompressed data size if requested. Change-Id: If371753d28d0ff512118d8bc06fdd48f4a0aeae7 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12173 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* cbfstool: initialize offset field in buffer_init()Aaron Durbin2015-10-251-0/+1
| | | | | | | | | | | | | If one wants to use buffer_init() for initializing a struct buffer all the fields should be initialized. Change-Id: I791c90a406301d662fd333c5b65b2e35c934d0f7 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12172 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util: Update makefiles for junit testingMartin Roth2015-10-246-23/+13
| | | | | | | | | | | | | | | | - Have clean remove junit.xml files. - Remove junit.xml target from cbmem makefile - this is in the top level Makefile.inc now. - add distclean targets to makefiles. - Make sure all makefiles have .PHONY set up. - rm commands need -f or they will fail if the file they're trying to remove doesn't exist, causing the build to fail. Change-Id: I2f0635f2c0a9417e3377a90c8d67103323c4a72f Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12120 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* intelvbttool: Add MakefilePaul Menzel2015-10-241-0/+35
| | | | | | | | | | | | | | | | | | | Add minimal Makefile based on cbmem’s Makefile. The make target `junit.xml` is removed as this is handled differently since commit de9adebb (Add junit.xml code to top Makefile.inc instead of utils). Also the `junit.xml` is removed in the make target `clean`. Additionally, the make target `distclean` is added, as the current junit.xml code in the top `Makefile.inc` requires that. Change-Id: I164b1f7733505bca6248d0711d7ad71d635fa926 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/11876 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
* cbfstool: Make sure fileno is available on CygwinStefan Reinauer2015-10-231-1/+7
| | | | | | | | | | | | | | | | | | | | | This patch fixes compilation of cbfstool on Cygwin. As reported in http://review.coreboot.org/#/c/10027 cbfstool on Cygwin likes to be compiled with -D_GNU_SOURCE. That patch was abandoned because it would unwantedly turn on more GNU extensions. Instead of doing that, only enable the define on Cygwin, switch to -std=gnu99 instead of -std=c99 to make fileno and strdup actually available. A MINGW32 check that was forgotten in Makefile was copied over from Makefile.inc to keep the two files in sync. This patch has no impact on non-Windows builds. Change-Id: I068b181d67daf9c7280110e64aefb634aa20c69b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/11667 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
* MAINTAINERS: Add script to test database and find maintainersStefan Reinauer2015-10-231-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This utility should make it easier to complete and maintain the database of coreboot subsystem maintainers (MAINTAINERS file) This will need a bit of tender love and care to print information in an easily machine readable output for the build system, but its a first start to query the maintainers database. Build with: $ go build util/scripts/maintainers.go Find a maintainer for a set of files with: $ ./maintainers Makefile Makefile.inc Makefile is in subsystem BUILD SYSTEM Maintainers: [Patrick Georgi <patrick@georgi-clan.de>] Makefile.inc is in subsystem BUILD SYSTEM Maintainers: [Patrick Georgi <patrick@georgi-clan.de>] Check the maintainer database with: $ ./maintainers .gitignore has no subsystem defined in MAINTAINERS .gitmodules has no subsystem defined in MAINTAINERS .gitreview has no subsystem defined in MAINTAINERS 3rdparty/arm-trusted-firmware has no subsystem defined in MAINTAINERS 3rdparty/blobs has no subsystem defined in MAINTAINERS 3rdparty/vboot has no subsystem defined in MAINTAINERS COPYING has no subsystem defined in MAINTAINERS Documentation/AMD-S3.txt has no subsystem defined in MAINTAINERS Documentation/CorebootBuildingGuide.tex has no subsystem defined in MAINTAINERS Documentation/Doxyfile.coreboot has no subsystem defined in MAINTAINERS [..] Change-Id: I49c43911971152b0e4d626ccdeb33c088e362695 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/12119 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
* cbfstool: Fix tolower() calls on CygwinStefan Reinauer2015-10-231-2/+2
| | | | | | | | | | | | | | | | Cygwin complains: cbfstool.c: 1075:5 error: array subscript has type 'char' [-Werror=char-subscripts] so add an explicit cast. Change-Id: Ie89153518d6af2bacce3f48fc7952fee17a688dd Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/11666 Tested-by: build bot (Jenkins) Reviewed-by: Zheng Bao <zheng.bao@amd.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
* cbfstool/Makefile: Also rm fmd_(parser|scanner).[ch] in cleanNico Huber2015-10-221-0/+1
| | | | | | | | | Change-Id: I783aa4b2319aaedd57ce9a67ca935392a611298f Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/12127 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* cbfstool/Makefile: Drop unused, irritating definition of `obj`Nico Huber2015-10-221-1/+0
| | | | | | | | | Change-Id: Id8dda8a973dcf991ac494c2d50258d1b51e43c6a Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/12126 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* gma ACPI: Make brightness levels a per board settingNico Huber2015-10-221-0/+2
| | | | | | | | | | | | Those are actually board specific. Keep the old value as defaults, though. The defaults are included by all affected boards. Change-Id: Ib865c7b4274f2ea3181a89fc52701b740f9bab7d Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/11705 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
* Revert "Remove sandybridge and ivybridge FSP code path"Martin Roth2015-10-221-1/+1
| | | | | | | | | | | | | | | Please don't remove chipsets and mainboards without discussion and input from the owners. Someone was asking about cougar canyon 2 just a couple of weeks ago - there's obviously still interest. This reverts commit fb50124d22014742b6990a95df87a7a828e891b6. Change-Id: Icd7dcea21fa4a7808b25bb8727020701aeebffc9 Signed-off-by: Martin Roth <martinroth@google.com> Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/12128 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* cbfstool: Fix typo in error messagePatrick Georgi2015-10-191-1/+1
| | | | | | | | | Change-Id: Iaee7e2c74fe9f63d4d4878278bd445af393942f4 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/11920 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* cbfstool: Fix removing and adding file with same nameAaron Durbin2015-10-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, cbfstool regressed that removing a file from CBFS the space is marked as empty but the filename is still shown, preventing adding a file with the same name again. [1] ``` $ echo a > a $ echo b > b $ ./util/cbfstool/cbfstool test.rom create -m x86 -s 1024 Created CBFS (capacity = 920 bytes) $ ./util/cbfstool/cbfstool test.rom add -f a -n a -t raw $ ./util/cbfstool/cbfstool test.rom add -f b -n b -t raw $ cp test.rom test.rom.original $ ./util/cbfstool/cbfstool test.rom remove -n $ diff -up <(hexdump -C test.rom.original) <(hexdump -C test.rom) --- /dev/fd/63 2015-08-07 08:43:42.118430961 -0500 +++ /dev/fd/62 2015-08-07 08:43:42.114430961 -0500 @@ -1,4 +1,4 @@ -00000000 4c 41 52 43 48 49 56 45 00 00 00 02 00 00 00 50 |LARCHIVE.......P| +00000000 4c 41 52 43 48 49 56 45 00 00 00 02 ff ff ff ff |LARCHIVE........| 00000010 00 00 00 00 00 00 00 28 61 00 00 00 00 00 00 00 |.......(a.......| 00000020 00 00 00 00 00 00 00 00 61 0a ff ff ff ff ff ff |........a.......| 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| $ ./util/cbfstool/cbfstool test.rom add -f c -n c -t raw $ ./util/cbfstool/cbfstool test.rom print test.rom: 1 kB, bootblocksize 0, romsize 1024, offset 0x0 alignment: 64 bytes, architecture: x86 Name Offset Type Size c 0x0 raw 2 b 0x40 raw 2 (empty) 0x80 null 792 ``` So it is “deteled” as the type changed. But the name was not changed to match the *(empty)* heuristic. So also adapt the name when removing a file by writing a null byte to the beginning of the name, so that the heuristic works. (Though remove doesn't really clear contents.) ``` $ ./util/cbfstool/cbfstool test.rom remove -n c $ ./util/cbfstool/cbfstool test.rom print test.rom: 1 kB, bootblocksize 0, romsize 1024, offset 0x0 alignment: 64 bytes, architecture: x86 Name Offset Type Size (empty) 0x0 null 2 b 0x40 raw 2 (empty) 0x80 null 792 ``` [1] http://www.coreboot.org/pipermail/coreboot/2015-August/080201.html Change-Id: I033456ab10e3e1b402ac2374f3a887cefd3e5abf Signed-off-by: Aaron Durbin <adurbin@chromium.org> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/11632 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
* cbfstool/cbfs_image.c: Just use one space before `=`Paul Menzel2015-10-171-1/+1
| | | | | | | | Change-Id: Id31c889d1e83e7ddfb0f0f98b78601f37b71cfa2 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/11631 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* lint: Fix shellcheck warnings, add commentsMartin Roth2015-10-171-15/+22
| | | | | | | | | | | | | When the script was pulled out of the makefile, it was left as it was written in the makefile to show the continuity with the original. This patch cleans up issues identified by shellcheck and adds comments. Change-Id: I5e6573a4fdfbb397e15db38e2e3dfadeb3430573 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11931 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* lint: Add junit.xml output for jenkinsMartin Roth2015-10-171-1/+22
| | | | | | | | | | | | To add lint to jenkins testing, we need junit.xml output. This adds an optional --junit command line parameter to enable output to an xml file in the lint directory. Change-Id: I5588190cb050b9dbe99458cb18a71a147769f50e Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11891 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* lint: Move the lint script out of Makefile.incMartin Roth2015-10-171-0/+50
| | | | | | | | | | | | | | In preparation for adding junit xml to the lint tests, move the script out of Makefile.inc and into its own file. Add a copyright, usage, and error checking that was not needed inside the Makefile. Change-Id: I32bebc6a5f1f6fa652812c8a014d84006e2e6c8a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11890 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* util/cbmem: Fix failure with certain cbmem base alignmentsTimothy Pearson2015-10-161-23/+38
| | | | | | | | Change-Id: Icd28af388c49ad36d7a8e414b3c82e18e1f8f523 Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/11932 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge <peter@stuge.se>
* abuild: add a command line parameter for junit filenameMartin Roth2015-10-151-4/+6
| | | | | | | | | | | | | The 'what-jenkins-does' makefile target was renaming the junit filename after abuild finished. Instead, just add a command line parameter to send it to a different filename. Change-Id: I66f7d80d621573d77a5154f36f2db49d7b2e948a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11878 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Revert "Remove FSP Rangeley SOC and mohonpeak board support"Martin Roth2015-10-141-0/+4
| | | | | | | | | | | | | | This chip is still being used and should not have been deleted. It's a current intel chip, and doesn't even require an ME binary. This reverts commit 959478a763c16688d43752adbae2c76e7764da45. Change-Id: I78594871f87af6e882a245077b59727e15f8021a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11860 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* inteltool: Add function to generate SPD dump.Vladimir Serbinenko2015-10-114-7/+41
| | | | | | | | | | | | | E.g. on my MacbookAir to generate spd.bin to be used with coreboot I do: ./inteltool -S spd.bin Change-Id: If165475ed3e1f3262a8926ef619128d25b1e2896 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/11847 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
* autoport: Fix ectool arguments.Vladimir Serbinenko2015-10-111-1/+1
| | | | | | | | Change-Id: I207fa981370d72c26e6fb1f07f3cd2d1f9d44d04 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/11855 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* Kill lvds_num_lanesVladimir Serbinenko2015-10-111-5/+0
| | | | | | | | | | | | Only one value would work with corresponding gma code currently (which one depends on board). Going forward, it's possible to compute which number can be used, so there is no need to keep this info around. Change-Id: Iadc77ef94b02f892860e3ae8d70a0a792758565d Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/11862 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* Derive lvds_dual_channel from EDID timings.Vladimir Serbinenko2015-10-111-1/+0
| | | | | | | | | | Based on the info by Felix Held. Change-Id: Iab84dd8a0e3c942da20a6e21db5510e4ad16cadd Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/11857 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* cbfstool: allow printable characters in image nameAndrey Petrov2015-10-081-4/+4
| | | | | | | | | | | | | Currently cbfstool would reject non-alpanumeric characters in image names. Underscore is not alphanumeric and is used in some default fmaps. This change allows image names to contain all "printable" characters except spaces. Change-Id: I6ba2b581d5623f5b028149ece0169892ea63fd04 Signed-off-by: Andrey Petrov <andrey.petrov@intel.com> Reviewed-on: http://review.coreboot.org/11807 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* buildgcc: Fix the binutils-no-doc patch with 2.25zbao2015-10-051-5/+5
| | | | | | | | | | | | | | The binutils-2.25 has added some new line, making the hunk move downward a little. The utility patch can fix the offset with "fuzz" message. So, recreate the patch to avoid that message. Change-Id: Ie659a8faf923465f6d47f7c0c0bf903c5eb903ab Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11639 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* buildgcc: Add patch for building binutils by clang 6.0zbao2015-10-051-0/+18
| | | | | | | | | | | | | | | | Clang is the default compiler on BSD and OS X. With this change, we don't have to install gcc any more. Clang can act as host cc. This is a known issue on GNU mail list. Please refer the link below. https://sourceware.org/bugzilla/show_bug.cgi?id=17473 Change-Id: I0f014b776e86e6d0cbebd560cb17f469f31e1dfb Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11638 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* buildgcc: Show the progress when downloadingzbao2015-10-051-3/+12
| | | | | | | | | | | | | Grep the output of wget, showing only the percentage. Leave the final "100%" unerased. Checking return code of wget is removed. Change-Id: I4559e88d541738a594dce92e23589992f234cb9b Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11520 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
* Remove FSP Rangeley SOC and mohonpeak board supportAlexandru Gagniuc2015-10-031-4/+0
| | | | | | | | | | | | | mohonpeak is the reference board for Rangeley. I doubt anyone uses it or cares about it. We jokingly refer to it as "Moron Peak". It's code with no known users, so we shouldn't be hauling it around for the eventuality that someone might use it in the future. Change-Id: Id3c9fc39e1b98707d96a95f2a914de6bbb31c615 Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/11790 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
* Remove sandybridge and ivybridge FSP code pathAlexandru Gagniuc2015-10-031-1/+1
| | | | | | | | | | | | | We already have two other code paths for this silicon. Maintaining the FSP path as well doesn't make much sense. There was only one board to use this code, and it's a reference board that I doubt anyone still owns or uses. Change-Id: I4fcfa6c56448416624fd26418df19b354eb72f39 Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/11789 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
OpenPOWER on IntegriCloud