summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2015-11-20util/mma: Add MMA scripts for setup and getting resultsPratik Prajapati
mma_setup_test.sh is used to set MMA test name and MMA test config name. After executing this script user needs to reboot the system and FSP/coreboot would execute the selected MMA test. FSP and coreboot needs to be built with MMA support. mma_get_result.sh will get the raw MMA results from cbtable and save it to bin file. BRANCH=none BUG=chrome-os-partner:43731 TEST=Build and Boot kunimitsu (FAB3). CQ-DEPEND=CL:299476,CL:299475,CL:299474,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479 Change-Id: Ie330151535809676167f0b22c504a71975841414 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 35469218fe53c1ac211f55bd26a206a05a827453 Original-Change-Id: I7d20aca63982e13edc41be2726f3cc7e41d95bae Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/299473 Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: http://review.coreboot.org/12483 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20util/cbmem: Add --rawdump <cbtable ID> and extend -l outputPratik Prajapati
Changed following things, (1) cbmem -l would give both ID and Name for coreboot table along with START and LENGTH of each entry e.g. localhost ~ # cbmem -l CBMEM table of contents: NAME ID START LENGTH <.....> 3. TIME STAMP 54494d45 77ddd000 000002e0 4. MRC DATA 4d524344 77ddb000 00001880 5. ROMSTG STCK 90357ac4 77dd6000 00005000 6. VBOOT WORK 78007343 77dd2000 00004000 7. VBOOT 780074f0 77dd1000 00000c3c 8. RAMSTAGE 9a357a9e 77d13000 000be000 9. REFCODE 04efc0de 77c01000 00112000 10. ACPI GNVS 474e5653 77c00000 00001000 11. SMM BACKUP 07e9acee 77bf0000 00010000 <..etc..> (2) With this patch, new command line arg "rawdump" or "-r" will be added to cbmem user can grab the ID with "cbmem -l" and execute "cbmem -r <ID>" to get raw dump of cbtable for the <ID> in interest. This change is needed to get MMA results data from cbtable. Coreboot stores the MMA results in cbmem. Separate post processing scripts uses cbmem utility to get the these data. This feature in the cbmem tool can also help debugging some issues where some specific ID of cbtable needs examination. BRANCH=none BUG=chrome-os-partner:43731 TEST=Build and Boot kunimitsu (FAB3). Cbmem -r and -l works as described. Not tested on Glados CQ-DEPEND=CL:299476,CL:299475,CL:299473,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479 Change-Id: I70ba148113b4e918646b99997a9074300a9c7876 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: f60c79d845d4d4afca480b6884c564a0d5e5caf8 Original-Change-Id: I1dde50856f0aa8d4cdd3ecf013bd58d37d76eb72 Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Original-Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/299474 Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: http://review.coreboot.org/12482 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20cbfstool: Add EFI and MMA file typesPratik Prajapati
Add efi and mma file types. BRANCH=none BUG=chrome-os-partner:43731 TEST=Build and Boot kunimitsu (FAB3). cbfstool shows mma and efi file types. Not tested on Glados CQ-DEPEND=CL:299476,CL:299474,CL:299473,CL:299509,CL:299508,CL:299507,CL:*230478,CL:*230479 Change-Id: I4f24a8426028428d613eb875c11cca70d9461dd6 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 3c625ad2aeca3a9358fba1eb7434c66ff991131a Original-Change-Id: I611819d213d87fbbb20816fdfb9e4b1401b3b89b Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/299475 Original-Commit-Ready: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Original-Tested-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: http://review.coreboot.org/12480 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-20util/cbmem: Fix out of bounds accessAaron Durbin
Building cbmem with ASan $ CC=gcc-5 CFLAGS="-O1 -g -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" make it sometimes finds a heap-buffer-overflow, while dumping the CBMEM console. $ sudo ./cbmem -c ================================================================= ==11208==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb5d5782b at pc 0x0804a4d7 bp 0xbfe23bc8 sp 0xbfe23bbc WRITE of size 1 at 0xb5d5782b thread T0 #0 0x804a4d6 in dump_console /home/joey/src/coreboot/util/cbmem/cbmem.c:553 #1 0x804a4d6 in main /home/joey/src/coreboot/util/cbmem/cbmem.c:1134 #2 0xb70a3a62 in __libc_start_main (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0x19a62) #3 0x8048cf0 (/home/joey/src/coreboot/util/cbmem/cbmem+0x8048cf0) 0xb5d5782b is located 50 bytes to the right of 131065-byte region [0xb5d37800,0xb5d577f9) allocated by thread T0 here: #0 0xb72c64ce in __interceptor_malloc (/usr/lib/i386-linux-gnu/libasan.so.2+0x924ce) #1 0x804a407 in dump_console /home/joey/src/coreboot/util/cbmem/cbmem.c:542 #2 0x804a407 in main /home/joey/src/coreboot/util/cbmem/cbmem.c:1134 #3 0xb70a3a62 in __libc_start_main (/lib/i386-linux-gnu/i686/cmov/libc.so.6+0x19a62) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/joey/src/coreboot/util/cbmem/cbmem.c:553 dump_console Shadow bytes around the buggy address: 0x36baaeb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x36baaec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x36baaed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x36baaee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x36baaef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 =>0x36baaf00: fa fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa 0x36baaf10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36baaf20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36baaf30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36baaf40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36baaf50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==11208==ABORTING Fix up commit 06b13a37 (cbmem: Terminate the cbmem console at the cursor position.) by reverting setting the cursor to 0. Change-Id: Id614a8e0f1a202671dd091f825d826a17176bfcc Signed-off-by: Aaron Durbin <adurbin@chromium.org> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/10572 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20build system: tighten down .xcompile handling some morePatrick Georgi
Bail out if .xcompile is incomplete or can't be regenerated. Change-Id: I74adeded7a3e849b25bf65c5b02f67820f29c7e2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12477 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20xcompile: Redirect the objdump stderr to /dev/nullzbao
On system with clang, "as" is available but "objdump" is not by default. So if ${gccprefix} is empty, "as" can run successfully and the "objdump" below might report error. Mask that output. Change-Id: I9940f069f66e097973ed6138cf3c696087fa5531 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11681 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20util/kconfig: Set parameter of mkdir to only one for mingw.zbao
The second parameter is to set file permissions for the directory, which is not needed in mingw. Change-Id: I88e317f075e8a39f0a280b3dd6e597d119f0f741 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11723 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-20cbfstool: Fix build error with clang when comparing enumzbao
If HOSTCC=clang, the -Wtautological-constant-out-of-range-compare is set automaticaaly. That assume the value of type enum is in the defined range. Then testing if a type enum is out of range causes build error. Error: coreboot/util/cbfstool/cbfs_image.c:1387:16: error: comparison of constant 4 with expression of type 'enum vb2_hash_algorithm' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (hash_type >= CBFS_NUM_SUPPORTED_HASHES) ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. clang version: FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.2 Thread model: posix Change-Id: I3e1722bf6f9553793a9f0c7f4e790706b6938522 Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/12330 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-19romcc: Allow adding non-existent paths to include pathStefan Reinauer
This models gcc's (and other compilers') behavior to not bail out with an error when one of the include paths does not exist. Change-Id: Ic93a55cea6b32516fd76da9b49abe7b990829889 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/12469 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2015-11-19crossgcc: Update makefile buildsMartin Roth
- Only build IASL once for the 'all' targets instead of once for each. - Change the control of what gets built from different targets to variables on the build line. - Clean up and correct the list of phony targets - Don't keep the temporary files around while building all. This takes up a lot of space. If it's desired behavior, add BUILDGCC_OPTIONS=-t on the make command line. - Add comments about CPU= and BUILDGCC_OPTIONS= variables - Add KEEP_SOURCES option Change-Id: I7752974e249f25717b42be25a841c69af84d5c69 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12300 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-19lint: properly terminate junit report on errorPatrick Georgi
Otherwise </testsuite> is missing and jenkins can't make sense of things. Change-Id: If11a6d2506efc9d7c915f50896b2714bc66e3b65 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12478 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-19fletcher: Remove fletcher.Zheng Bao
The function fletcher is moved to amdfwtool. Change-Id: I39eb05a184d8878a96f8de46caf4b5c6c433dc3a Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/12455 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-19amdfwtool: Add amdfwtool to combine AMD firmwaresZheng Bao
Combine all needed AMD firmware into one single firmware, which going to be added as one single CBFS module. Change-Id: Ib044098c1837592b8f7e9c6a7da4ba3a32117e25 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/12419 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-17ifdtool: Makefile: fix install targetDenis 'GNUtoo' Carikli
ifdtool doesn't have a manual yet, so don't install an unexisting manual file. Change-Id: I290435de7de7177d803cf6cde4f4f42955cbcf5c Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: http://review.coreboot.org/12406 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-14sconfig: remove warning about root_complexPatrick Georgi
It's not deprecated if it's still in active use. The code layout is just "funny" (and could warrant a chipset-side cleanup, but not today) Change-Id: I5f7776ceba0134f20364a0c4a1ca51382e9877e2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12429 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-13cbfstool: Allows mixed-state fmap regions to workPatrick Georgi
When using FMAP regions (with option -r) that were generated with a master header (as done by cbfstool copy, eg. in Chrome OS' build system), there were differences in interpretation of the master header's fields. Normalize for that by not sanity-checking the master header's size field (there are enough other tests) and by dealing with region offsets properly. BUG=chromium:445938 BRANCH=tot TEST=`cbfstool /build/veyron_minnie/firmware/image.dev.bin print -r FW_MAIN_A` shows that region's directory (instead of claiming that there's no CBFS at all, or showing an empty directory). Change-Id: Ia840c823739d4ca144a7f861573d6d1b4113d799 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 0e5364d291f45e4705e83c0331e128e35ab226d3 Original-Change-Id: Ie28edbf55ec56b7c78160000290ef3c57fda0f0e Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/312210 Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12416 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-13cbfstool: Add way to access entire backing data for a bufferPatrick Georgi
This is required to handle certain relative-to-flash-start offsets. BUG=none BRANCH=tot TEST=none Change-Id: I8b30c7b532e330af5db4b8ed65b21774c6cbbd25 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 596ba1aaa62aedb2b214ca55444e3068b9cb1044 Original-Change-Id: Idc9a5279f16951befec4d84aab35117988f7edb7 Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/312220 Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12415 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-11util/release: Add release notes generator scriptMartin Roth
This script generates the rough format for the release notes, and will add new commits to the top of an existing release notes text file. At that point, a lot still needs to be done by hand - deciding which commits deserve to be in the release notes, and which don't. When updating the existing release notes, The updates are just added to the top of the file, and need to be placed manually. This just helps prevent missed commits. When editing the release notes, don't delete or modify the commit id lines after they've been classified - Just move them to the bottom of the file until the notes are ready to publish. This keeps those commits from re-appearing at the top of the file the next time the script is run to update the notes. Change-Id: I0a699c528117f0347a65a3bed4402f3a57309e3c Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12318 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
2015-11-10utils/scripts: Add microcode conversion toolMartin Roth
This is an update to the script in the blobs repo that converts individual or multiple files into a microcode binary. Change-Id: I66fb650bbfa334d1f07e8e3914ef6deb8e72bbb4 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12332 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2015-11-05util/kconfig: fill glob_t with 0 before calling globzbao
On mingw, the function glob has some default options which are not compliant with man page. If gl_offs is not set as 0, there may be some slots which is reserved. If gl_pathc or gl_pathv is not set as 0, the result might be appended to the list instead of being added as new ones. Change-Id: I03110c4cdda70578828d6499262a085a81d26313 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11711 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
2015-11-04buildgcc: change -j variable name from BUILDJOBS to CPUSMartin Roth
The buildgcc makefile was using the variable 'BUILDJOBS' to pass the number of cores to use for the build into buildgcc. This is changed to 'CPUS' to match the variable name for the what-jenkins-does target. Change-Id: I373c4988e9f096ca2e142afdd5e94d7d806891e3 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12299 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-04util/cbmem: remove duplicated cbmem data structure logic.Aaron Durbin
The cbmem utility shouldn't be using the intra coreboot data structures for obtaining the produced data/information. Instead use the newly added cbmem records in the coreboot tables for pulling out the data one wants by using the generic indexing of coreboot table entries. BUG=chrome-os-partner:43731 BRANCH=None TEST=Interrogated cbmem table of contents with updated code. Change-Id: I51bca7d34baf3b3a856cd5e585c8d5e3d8af1d1c Reviewed-on: http://review.coreboot.org/11758 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-03board-status: Reorder the table categoriesPatrick Georgi
Show laptops and servers before desktop boards since that's where both the market and coreboot are the most active these days. Change-Id: I7de63975f3f2ff5e983b19e07558175a58870a1b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12292 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-03board-status: Update the forewordPatrick Georgi
There's the sentiment that the Supported_Motherboards wiki page is outdated. Point out that the list is current (and drop the table of contents that became a distraction). Change-Id: Ib2363fad0b7f6951b07b2ad0c85148d9bc729b55 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12291 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-01abuild: allow specifying multiple targets by mainboard descriptorPatrick Georgi
abuild -t EMULATION_QEMU_UCB_RISCV,EMULATION_SPIKE_UCB_RISCV works now Change-Id: I49d8cd86e21ede724d8daa441b728efa1f6ea1fa Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12281 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-01abuild: Don't keep around old junit reportsPatrick Georgi
junit reports were kept around (and appended to) in some cases, leading to duplicate reports on jenkins. Drop old per-mainboard reports before building said boards, and do the same for the tools (reported thrice). Change-Id: I74a035587bbf917dca85ba6fc74621c583efe9a2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12280 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-01abuild: allow users to specify multiple boardsPatrick Georgi
Specifying a directory with multiple boards (eg abuild -t google/veyron) makes abuild run through all of them. Change-Id: Ifb60f3a1f0c4a727dc43c48671ea90711ffe5585 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12278 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
2015-11-01abuild: change board identifier to a variant of CONFIG_BOARD_*Patrick Georgi
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>
2015-11-01abuild: change compile_target interfacePatrick Georgi
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>
2015-11-01abuild: change remove_board interfacePatrick Georgi
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>
2015-11-01abuild: remove ancient, unused test submission featurePatrick Georgi
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>
2015-11-01abuild: drop the ability to specify a configurationPatrick Georgi
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>
2015-10-31util/scripts/no-fsf-addresses.sh: Strip last paragraphPatrick Georgi
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>
2015-10-31tree: drop last paragraph of GPL copyright headerPatrick Georgi
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>
2015-10-31cbfstool: avoid naming variables "index"Patrick Georgi
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>
2015-10-29util/cbmem: Handle EC_VBOOT_DONE timestampShawn Nematbakhsh
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)
2015-10-29util/fuzz-tests: Add fuzzer for jpeg decoderPatrick Georgi
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>
2015-10-29lint: Add Kconfig / Kconfig symbol lint toolMartin Roth
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>
2015-10-29cbfstool: extract rmodules as ELFs properlyAaron Durbin
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>
2015-10-29cbfstool: add ELF symbol, relocation, and string table supportAaron Durbin
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>
2015-10-29cbfstool: merge consecutive elf sections in program segmentsAaron Durbin
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>
2015-10-29cbfstool: create ELF files when extracting stagesAaron Durbin
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>
2015-10-29cbfstool: add ELF header initialization helperAaron Durbin
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>
2015-10-29cbfstool: add optional -m ARCH to extractAaron Durbin
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>
2015-10-28lint: don't check for whitespace in jpeg imagesPatrick Georgi
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)
2015-10-27cbfstool: decompress stage files on extractionAaron Durbin
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>
2015-10-25vgabios: fix compilation after x86emu changesStefan Reinauer
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>
2015-10-25cbfstool: have decompress functions provide ouput data sizeAaron Durbin
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>
2015-10-25cbfstool: initialize offset field in buffer_init()Aaron Durbin
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>
2015-10-24util: Update makefiles for junit testingMartin Roth
- 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>