summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add even more load kernel testsstabilize-3658.0.0Randall Spangler2013-02-011-5/+133
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests && FEATURES=test emerge-daisy vboot_reference Change-Id: I49ac7f64c1d0ef17afab5dcc8fcb9f777d6cab1c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42472 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add more vboot_kernel testsRandall Spangler2013-01-311-9/+216
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests && FEATURES=test emerge-daisy vboot_reference Change-Id: I69fdbb9d392ba34c8411362aef0f9f0ace284a3c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42400 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Reformat cgptlib to kernel styleRandall Spangler2013-01-316-720/+800
| | | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: Ib8748df93c64395c88e1f789805393fcfe3ac419 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42397 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Reformat to kernel styleRandall Spangler2013-01-3113-1848/+2086
| | | | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: Id690c8334147970784db5ac54933ad1f5a58dcc1 Reviewed-on: https://gerrit.chromium.org/gerrit/42263 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
* Add kernel testsRandall Spangler2013-01-313-8/+213
| | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: Iee7c965d5c29063259c66d0ccb117c60f4f4a92e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42314
* Add tlcl testsRandall Spangler2013-01-314-0/+365
| | | | | | | | | | | | | | Verifies the right TPM commands are called, but doesn't check at a detailed level that they're packed properly. BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: I6c14db083ac0a40d4738582d200d9687cddb99de Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42261 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Reformat files to kernel styleRandall Spangler2013-01-291-604/+657
| | | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: I93507c45c0790da6162758e0fb02031441169f65 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42171 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add display testsRandall Spangler2013-01-293-17/+128
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: Ibfd3f5f2b7ac8871a99e5d8603baae17926ab972 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42170 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fixed error in verifyPaul Taysom2013-01-291-1/+1
| | | | | | | | | | | | | | | Fixed the error when running "sign_official_build.sh verify" that was introduced by https://gerrit.chromium.org/gerrit/#/c/40052/ BUG=chromium-os:38229 TEST=sign_official_buils.sh verify on parrot recovery image BRANCH=none Change-Id: Ice1933347811c006005f622d178869df12344998 Reviewed-on: https://gerrit.chromium.org/gerrit/42231 Tested-by: Paul Taysom <taysom@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Paul Taysom <taysom@chromium.org>
* Reformat files to kernel styleRandall Spangler2013-01-2512-900/+1009
| | | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: I30c7f74217c10ac7cc618aee30a22febe1e41f5c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42053 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add more vboot common testsRandall Spangler2013-01-253-0/+29
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: Iad795956c1bb7f6444d6cce0bb618687e26d6025 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42052 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Remove dead ECPreamble codeRandall Spangler2013-01-253-244/+140
| | | | | | | | | | | BUG=none BRANCH=none TEST=make runtests Change-Id: I99d8124a7d5a3a644f0d8d64ad36f51e78d851e5 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42018 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Reformat header files to kernel styleRandall Spangler2013-01-2510-954/+1309
| | | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: Id5bac79545e9803d19b45da160c535f7e06465c6 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42016 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Start adding display testsRandall Spangler2013-01-254-4/+91
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: Idd1c275077a9a00cd2f7eab684238eb5b2d235dd Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42015 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fix incorrect CFLAGS when compiling for hostRandall Spangler2013-01-251-5/+5
| | | | | | | | | | | | | | | | | | | Both HOSTLIB and FWLIB depend on FWLIB_OBJS, and it's the OBJS which need to override their CFLAGS. The way it was, depending on the order of evaluation of HOSTLIB and FWLIB, the OBJS would get compiled with different flags. So 'make' worked, because it depended on fwlib before hostlib. But 'make runtests' failed, because it depended on hostlib but not fwlib. BUG=none BRANCH=none TEST=make runtests Change-Id: Id4e4cb4f7a58c7ab8d9fd00d91c4ab8f4518d4bc Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42014 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Improve coverage of cgptlib.cRandall Spangler2013-01-243-2/+140
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: I5719c6b8aa1a23fc65bf38d7096320479152f0ca Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41955 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Reformat cgptlib_testRandall Spangler2013-01-241-1103/+1156
| | | | | | | | | | | | | | | | No code changes, just reformat to kernel style BUG=none BRANCH=none TEST=make runtests Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: Icfcf54327c4da607392f1769fddcbc33f889395c Reviewed-on: https://gerrit.chromium.org/gerrit/41954 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Remove unused vbutil_ecRandall Spangler2013-01-246-809/+0
| | | | | | | | | | | | | | | | | EC verification is done via software sync; the EC doesn't do vboot on its own. BUG=chromium-os:38139 BRANCH=none TEST=manual make runtests emerge-link vboot_reference chromeos-u-boot chromeos-bootimage Change-Id: I6e5c0db8fc54b474f044d37c2603a9c116747a85 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41953 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Reformat vboot_common_testsRandall Spangler2013-01-241-188/+199
| | | | | | | | | | | | | No code changes, just reformat to kernel style BUG=none BRANCH=none TEST=make runtests Change-Id: Ic75f40d6a7e862d51398b7e3bbd1a86fa8a1b33d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41952 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Improve coverage of vboot_api_init.cRandall Spangler2013-01-241-3/+106
| | | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: I3d39feb712eb7e572f9c57f27449f19e8e809ed0 Reviewed-on: https://gerrit.chromium.org/gerrit/41896 Commit-Queue: Randall Spangler <rspangler@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Reformat vboot_api_init_testsRandall Spangler2013-01-241-332/+354
| | | | | | | | | | | | | No code changes, just reformat to kernel style BUG=none BRANCH=none TEST=make runtests Change-Id: I9b07af36b915ead519a8908b3dc5b93aedc5d4be Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41895 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Improve coverage of rollback_index.cRandall Spangler2013-01-234-1190/+1380
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: I21b62b5dd3fc6037f54f7c3bac768c2b67a4c12d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41859 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Improve coverage of vbnvstorage testRandall Spangler2013-01-232-3/+37
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: I93aabedb99fdeba01954a4b59e3e089b4087380c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41850 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fix architecture definitions.Randall Spangler2013-01-233-21/+25
| | | | | | | | | | | | | | | | | | | | We should use only arm, x86, and x86_64; currently we also use i386 to mean x86, and amd64 to mean x86_64. BUG=chromium-os:26317 BRANCH=none TEST=manual sudo FEATURES=test emerge vboot_reference FEATURES=test emerge-link vboot_reference chromeos-u-boot chromeos-installer FEATURES=test emerge-daisy vboot_reference chromeos-u-boot chromeos-installer FEATURES=test emerge-x86-alex vboot_reference chromeos-installer make && make runtests (both inside and outside chroot) Change-Id: I4fb64fafa9c48a76ded862e074776cab9ea54ab3 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41838 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Clean up building code coverageRandall Spangler2013-01-231-16/+32
| | | | | | | | | | | | | | | Now 'COV=1 make' will make coverage automagically. Coverage stats are reported separately for the firmware subdirectory, for easier tracking. BUG=chromium-os:38139 BRANCH=none TEST='COV=1 make' then browse to build/coverage/index.html Change-Id: Ie671a82b402beeb17882536f89b9230821fc4d13 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41824
* Convert common tests from shell scripts to running directlyRandall Spangler2013-01-234-264/+392
| | | | | | | | | | | | | | | | | | | | So they can run under qemu. Also, mount /proc and /dev before running qemu in the chroot. BUG=chromium-os:37916 BRANCH=none TEST=manual make runtests sudo FEATURES=test emerge vboot_reference FEATURES=test emerge-daisy vboot_reference FEATURES=test emerge-link vboot_reference Change-Id: I940ce370bd149621e666250b07cf9219f9e22bac Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41786 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Complete refactoring of MakefileBill Richardson2013-01-223-479/+643
| | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the Makefile to add correct dependencies, avoid using variables before they're fully defined (which required .SECONDEXPANSION to work around), generally improve readability. There are so many changes that there's no point in trying to compare old vs new - just look at the final result. And this still isn't perfect, but it's a big step forward. BUG=chromium-os:37062 BRANCH=none TEST=manual All these should continue to work: make && make runtests sudo emerge vboot_reference emerge-$BOARD vboot_reference Change-Id: Ic05a19231155d7e6427732e41d1682012d2dcdca Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41768 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* (modify and resend) Trigger sync right after writing.Louis Yung-Chieh Lo2013-01-221-0/+5
| | | | | | | | | | | | | | | | | | | | This can trigger the sync mechanism earlier so that the kernel has enough time to schedule a real disk sync before system reboots. We sent this in CL 41269, however it is reverted because the sync() and syncfs() make test cases timeout (tons of disk access). So we only sync file itself in this CL and leave the whoe system sync outside cgpt. BUG=chromium-os:35992 TEST=make && make runtests ; and trybot BRANCH=none Change-Id: I9c6b602220131f1f011e7865788a122d4c379e73 Reviewed-on: https://gerrit.chromium.org/gerrit/41345 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Yung-Chieh Lo <yjlou@chromium.org> Tested-by: Yung-Chieh Lo <yjlou@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fixed the cmdline modification for bootcachePaul Taysom2013-01-181-18/+41
| | | | | | | | | | | | | | | | | | Changed the manipulation of the device mapper arguments in the command line to handle bootcache. Had to maintain backwards compatibility with older versions because the signer is used with older images. BUG=chromium-os:37114, 37061 TEST=On a parrot with dev signed keys, signed and installed an R-23 image (2913), a image with bootcache disabled and an image with bootcache enabled. BRANCH=none Change-Id: I59c46ccc3ff8b89ae9c4515f020ea9fbe6d96c7c Reviewed-on: https://gerrit.chromium.org/gerrit/40052 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Paul Taysom <taysom@chromium.org> Tested-by: Paul Taysom <taysom@chromium.org>
* mount-encrypted: expprt nvram contents to tmpfsWill Drewry2013-01-171-1/+33
| | | | | | | | | | | | | | | | | Export the NVRAM contents to tmpfs (/tmp) for use during boot without incurring the cost of repeated trips through the TPM. Signed-off-by: Will Drewry <wad@chromium.org> BUG=chromium-os:37367 TEST=builds, boots, emits lockbox.nvram which validates using in-progress lockbox-cache BRANCH=none Change-Id: I8b1103f4bd22bd75e98a7617a571bdb3a06d2914 Reviewed-on: https://gerrit.chromium.org/gerrit/41433 Reviewed-by: Kees Cook <keescook@chromium.org> Commit-Queue: Will Drewry <wad@chromium.org> Reviewed-by: Will Drewry <wad@chromium.org> Tested-by: Will Drewry <wad@chromium.org>
* fix s_tpm_pcr_read_cmd structure name typoKees Cook2013-01-161-1/+1
| | | | | | | | | | | | | | Che-Liang Chiou noticed this structure was misnamed. Luckily, they have the same offsets to the useful fields. BUG=None TEST=link build, manual verification BRANCH=None Change-Id: I40abd21f053f19758e47c7775333208ad1c3c33d Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41482 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
* Run some tests under qemu when cross-compilingRandall Spangler2013-01-164-43/+116
| | | | | | | | | | | | | | | BUG=chromium-os:26317 BRANCH=none TEST=manual sudo FEATURES=test emerge vboot_reference FEATURES=test emerge-link vboot_reference chromeos-u-boot chromeos-installer FEATURES=test emerge-daisy vboot_reference chromeos-u-boot chromeos-installer make && make runtests (both inside and outside chroot) Change-Id: Ie829e375736ce0df46ddd5a3345efb0ca7e33aba Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41317
* Revert "Trigger sync right after writing."Bill Richardson2013-01-151-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f3613b60c7374dfcf54c922d46c7da8feeb22000. That commit attempts to solve a disk-syncing problem by forcing numerous sync() calls inside cgpt. However, it's too much of a sledgehammer approach. Some subset of buildbots now run a short test suite when compiling vboot_reference. On my z620, commit f3613b60c737 increases the time to run "make runcgpttests" from 1.6 seconds to over eight minutes. We need a different solution to this problem. BUG=chromium-os:35992 TEST=manual BRANCH=none To test: cd vboot_reference make && make runtests Change-Id: I0489906103dbc93edf201570bd9158621c651d54 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41306 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Fix missing dependencyRandall Spangler2013-01-151-1/+1
| | | | | | | | | | | BUG=chromium-os:26317 BRANCH=none TEST=make && make runtests Change-Id: I420e81a9f9cb1333c233abedfad5cae8984f11b7 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41233 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Trigger sync right after writing.Louis Yung-Chieh Lo2013-01-151-0/+5
| | | | | | | | | | | | | | | This can trigger the sync mechanism earlier so that the kernel has enough time to schedule a real disk sync before system reboots. BUG=chromium-os:35992 TEST=compile only BRANCH=none Change-Id: I505fdf45d95a52c9eca7687ecd6fb9f6be8cc5f1 Reviewed-on: https://gerrit.chromium.org/gerrit/41269 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Yung-Chieh Lo <yjlou@chromium.org> Commit-Queue: Yung-Chieh Lo <yjlou@chromium.org>
* Use 'install' to do installation, prepare for futility installation.Bill Richardson2013-01-141-8/+11
| | | | | | | | | | | | | | | | | | | | | | | Previously we've been using manual cp and chmod operations to implement "make install". This switches to using the install utility instead, which can handle permissions and so forth. This also tweaks the DESTDIR slightly to prepare the way for futility. BUG=chromium-os:26317 BRANCH=none TEST=manual Run sudo emerge vboot_reference Shouldn't see any difference. Change-Id: I667ddbb9de3ab7713921ddd734d1fbcbe3b936b1 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41228 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add .PHONY targets for phony targetsBill Richardson2013-01-141-58/+80
| | | | | | | | | | | | | | | | | | | | | | We have a bunch of manual dependency targets. They need to be marked as .PHONY so that they'll always work. Also made the spacing around the ':' more consistent so it's easier to find specific instances. BUG=chromium-os:26317 BRANCH=none TEST=manual sudo emerge vboot_reference emerge-link vboot_reference chromeos-u-boot chromeos-installer emerge-daisy vboot_reference chromeos-u-boot chromeos-installer Change-Id: I00a1b8abcd588bdbab33b172c64a4b305b6d7237 Reviewed-on: https://gerrit.chromium.org/gerrit/41185 Commit-Queue: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Make tpmc able to send and receive raw datagrams.Luigi Semenzato2013-01-113-2/+64
| | | | | | | | | | | | | | | | This is immediately needed to debug a Parrot TPM problems, but we've had similar situation in the past and probably will again in the future. BUG=chromium-os:37819 TEST=manually tested with a couple of different packets, and error inputs BRANCH=none Change-Id: Id7f66bdbdfe5887fa49cd62af4a9b807fa3d9a89 Reviewed-on: https://gerrit.chromium.org/gerrit/41166 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Luigi Semenzato <semenzato@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org>
* Rename files and defines to simplify makefile.Randall Spangler2013-01-1122-236/+210
| | | | | | | | | | | | | | BUG=chromium-os:26317 BRANCH=none TEST=manual sudo emerge vboot_reference emerge-link vboot_reference chromeos-u-boot chromeos-installer emerge-daisy vboot_reference chromeos-u-boot chromeos-installer Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: I8c55ca40f3f0cacf08530ab63c886fe351bcee8e Reviewed-on: https://gerrit.chromium.org/gerrit/41152
* Unify vboot build into a single makefileRandall Spangler2013-01-119-828/+678
| | | | | | | | | | | | | | | | | | This is a necessary precursor to getting coverage working. BUG=chromium-os:26317 BRANCH=none TEST=manual sudo emerge vboot_reference emerge-link vboot_reference chromeos-u-boot emerge-daisy vboot_reference chromeos-u-boot Change-Id: Ibed91c64a5ca5fa486169d64fb01a9e868ce27e5 Signed-off-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 13ed1f4812f810ee0a47b946ad990f1fa93f366c) Reviewed-on: https://gerrit.chromium.org/gerrit/40906 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add missing TlclLibClose function for mock TPM interfaceDuncan Laurie2013-01-111-0/+4
| | | | | | | | | | | BUG=none BRANCH=none TEST=manual: MOCK_TPM=1 emerge vboot_reference Change-Id: I81ae9bb646b1a1186629e1a3ba8317efe8397faf Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/41131 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fix bad free order in tlcl_generator.c.factory-3536.BLuigi Semenzato2013-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | Fix suggested by the OpenSUSE friends: https://build.opensuse.org/package/view_file?expand=1&file=fix-tlcl-generator.patch&package=vboot&project=devel%3AFactory%3AARM%3AContrib%3AChromebook for this bug: http://paste.opensuse.org/86254908 BUG=chromium-os:37707 TEST=emerge-daisy vboot_reference BRANCH=none Change-Id: I61c116152fab7b997a84f44da89c93b89659e852 Reviewed-on: https://gerrit.chromium.org/gerrit/40902 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org> Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
* Move lengthy tests from 'make runtests' to 'make runlongtests'Randall Spangler2013-01-035-106/+211
| | | | | | | | | | | | | | | This reduces 'make runtests' from ~90 sec on a z620 to ~8 sec, which is short enough we can run it as part of the continuous build. BUG=chromium-os:26317 BRANCH=none TEST=make && time make runtests && time make runlongtests Change-Id: I8165efaf8b8290ca3c8f8da73e3f8a54c2bc19f9 Reviewed-on: https://gerrit.chromium.org/gerrit/40374 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Use a separate knob for SHA512 unrollingSimon Glass2012-12-261-46/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SH512 code gets quite large when unrolled, about 20KB larger on x86. This is a net loss on machines with slow SPI. Split this out into a separate knob, and don't enable it on any architecture for now. Also swap the code around so that we do #ifdef...#else...#endif instead of #ifndef...#else...#endif. BUG=chrome-os-partner:13961 BRANCH=none TEST=manual build and boot to kernel on link U-Boot image size before this change: text data bss dec hex filename 319403 8260 83988 411651 64803 u-boot after: 293227 8260 85492 386979 5e7a3 u-boot This is a saving of about 25KB. Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I9fa7ea8eba6691d8a06df9374950303e6f2ce2fd Reviewed-on: https://gerrit.chromium.org/gerrit/40155 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* Add support for a V option which selects verbose Makefile output.Gabe Black2012-12-213-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | When V=1, the full command lines are printed. When V is not 1, then only a small summary line is printed which shows what commands are being executed. The command lines themselves are usually quite long and are overwhelming to see fly by on the console. Abbreviated command lines are easier to read and don't fill up your console so quickly. This change is primarily targeted at vboot_fw.a and probably excludes some things which could also be converted. The indentation between the action string (OBJCOPY, CC, etc.) and the target is three spaces longer than "normal", aka what's used in depthcharge, so that when this make is run from the other, you can tell the difference between the commands run by each. BUG=chrome-os-partner:8339 TEST=Built with and without V=1 and saw and did not see the full command lines, respectively. BRANCH=None Change-Id: Ibee244c24dc44b8da109b8c23ac7273174836bb9 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/40011 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
* mount-encrypted: finalize if keyfile missingtoolchain-3428.65.BKees Cook2012-12-181-4/+11
| | | | | | | | | | | | | | | | | | | | | | | If a system key is available (could read TPM NVRAM), but the "finalization needed" file exists, it means that we are in the situation where either cryptohome was interrupted, or the TPM was temporarily unavailable at an earlier boot. In this case, it is up to mount-encrypted to perform the finalization. Before, we were making the very bad assumption that the keyfile was valid if a system key was found, meaning we would delete the "finalization needed" file, leaving us with no way to find the encryption key leading to an OOBE on the next boot. BUG=chrome-os-partner:15960 TEST=daisy build, manual testing BRANCH=None Change-Id: Ifb6d74d8a38100e00d9a4597c25a71a6c33f806c Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/39883 Reviewed-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Elly Jones <ellyjones@chromium.org> Reviewed-by: Will Drewry <wad@chromium.org> Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
* Add recovery_subcode field to nvstorage and crossystemBill Richardson2012-12-175-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just adds a one-byte field in the nvstorage region for use in debugging hard-to-catch errors. There's no official meaning or expectation for this field. It's just a handy place to emit some information. BUG=chrome-os-partner:11534 BRANCH=parrot TEST=manual Just change the value and ensure that it persists across a (working) reboot. It's only updated at specific points under very exacting error conditions, so all we really want to test is that it works as a place to store some extra info. crossystem recovery_subcode crossystem recovery_subcode=14 reboot crossystem recovery_subcode The recovery_subcode byte is at index [6] of the VbNv.raw bytes that appear when you press TAB, so you can find it there too: VbNv.raw: 60 20 00 00 00 00 0e 00 00 00 00 00 00 00 00 65 Decimal 14 == 0x0e Change-Id: I1930b8f81a03ab838dbee99a8d72c35a444efdfd Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/39803 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* sign_official_build: add a dump_config helper and clean up argument processingMike Frysinger2012-12-121-12/+47
| | | | | | | | | | | | | | | | | | | | | | | | For debugging purposes, we like to see the kernel command line that a particular kernel is using. We have all the tools to do this already, but not easy to leverage (you have to manually extract/etc...). So add a "dump_config" helper to help people out. Further, the existing argc processing is incomplete and not terribly friendly. Add some useful error messages explaining why we quit. BUG=None TEST=`./sign_official_build.sh dump_config <bin>` works TEST=`./sign_official_build.sh verify <bin>` works TEST=`./sign_official_build.sh` shows usage TEST=`./sign_official_build.sh recovery <bin>` shows usage TEST=`./sign_official_build.sh recovery <bin> / /tmp/foo` tries to sign BRANCH=None Change-Id: I9f94250b8c299783bdcba704733974c6a5491101 Reviewed-on: https://gerrit.chromium.org/gerrit/39603 Reviewed-by: Paul Taysom <taysom@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
* tlcl: move open retry into TlclKees Cook2012-12-122-27/+26
| | | | | | | | | | | | | Make sure all Tlcl users benefit from the new retry logic. BUG=None TEST=daisy build, manual testing of racing tpmc loops BRANCH=None Change-Id: I8e9656a65b5d6b45694c1c8bceb95f54f7c751bb Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/39525 Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
* Addtional -h args to dump_fmap will ignore overlap errors.Bill Richardson2012-12-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | Snow was built with overlapping regions in its FMAP, so when we use dump_fmap -h to see what the layout is, it complains and dies. This change lets it keep going if you give it multiple -h args. Nothing else is different. BUG=none BRANCH=none TEST=manual This complains and quits: dump_fmap -h image-snow.bin This complains and keeps going: dump_fmap -hh image-snow.bin Change-Id: Ia4592b9ba6963b8c5064dd6f51625e9495db2845 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/39551 Reviewed-by: Randall Spangler <rspangler@chromium.org>