summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CHERRY-PICK: mount-encrypted: issue sync()s between umount stagestoolchain-3701.42.Bstabilize-3701.81.Bstabilize-3701.46.Bstabilize-3701.30.0bstabilize-3701.30.0release-R26-3701.BKees Cook2013-02-221-0/+9
| | | | | | | | | | | | | | | | | | | | | In an effort to reduce the chances of a kernel bug wrecking filesystems during encrypted-stateful shutdown, add explicit sync() calls during shutdown. BUG=chrome-os-partner:17610 TEST=link build, shutdown with simulated panic in LOOP_CLR_FD results in successful journal replays BRANCH=None Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/43736 Reviewed-by: Grant Grundler <grundler@chromium.org> Change-Id: Ifd2a5f70c325d0a24296fed5e8f303838e25c36c (cherry picked from ToT commit e6cf2c21a1cd6fc46b6adcaadc865e2f8bd4874e) Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/43837 Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
* Software sync checks for shutdown-requested in all code pathsRandall Spangler2013-02-122-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, 1) AP-RO, EC-RO -> checked 2) AP-RW, EC-RO transition to EC-RW -> checked 3) AP-RW, EC-RW already -> NOT checked Now, (3) calls VbExIsShutdownRequested() as well. This fix is needed to avoid inconsistent behavior of software sync after we ship a RW update. Whether we *should* actually shut down or not based on how/why we booted is a separate issue to be addressed by the U-boot implementation of VbExIsShutdownRequested() in a separate CL. BUG=chromium-os:38645 BRANCH=all TEST=make runtests Manual testing also possible - force AP-RW firmware, then reboot with lid closed. Previously, the first boot would shut down because of (2), but subsequent reboots of the AP only wouldn't because of (3). Change-Id: I226202f48d793b88a30ffa62731de878f8c22315 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/43044 Reviewed-by: Simon Glass <sjg@chromium.org>
* Add more display testsRandall Spangler2013-02-113-12/+73
| | | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests && FEATURES=test emerge-daisy vboot_reference Change-Id: I28cd31f995f078d1715acaeaccce6e864930a986 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42846 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add more vboot_api_kernel testsstabilize-bluetooth-smartRandall Spangler2013-02-067-31/+1189
| | | | | | | | | | BUG=chromium-os:38139 BRANCH=none TEST=make runtests && FEATURES=test emerge-daisy vboot_reference Change-Id: Ib280b80ba707f8a2141d728f78ae296774b1301a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42669
* Fix and enable vboot_api_kernel_testsRandall Spangler2013-02-062-35/+16
| | | | | | | | | | | | | | Previously, these were not being run, and failed due to a test config problem when they were run (vboot_api_kernel.c worked correctly, but the test checked the wrong recovery reason). BUG=chromium-os:38139 BRANCH=none TEST=make runtests && FEATURES=test emerge-daisy vboot_reference Change-Id: Ibefe5fe32f99a2c40f619a85df1bbfc81eb0c26c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42668
* Reformat to kernel styleRandall Spangler2013-02-062-359/+389
| | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: Ibffadf6c8a5911b79a29f8f554ca00c595f6b27b Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42624
* EC software sync uses precomputed hash if availableRandall Spangler2013-02-064-19/+102
| | | | | | | | | | | | | This removes the need to load the EC code at all when the precomputed hash matches. BUG=chrome-os-partner:17606 BRANCH=spring TEST=wouldn't that be nice Change-Id: If4438b9db8b1449b8fd4d90ef3acb3bbec5e09a0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42567
* Remove +x permissions from source files.Bill Richardson2013-02-057-0/+0
| | | | | | | | | | | | | | | | There's no need to give execute permissions to files that aren't supposed to executed. BUG=none BRANCH=none TEST=manual make runtests Change-Id: I2480b97b39124e98c2f639d56be54cadfdc17f9b Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42648 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* set_lsb_release: enable batch modificationMike Frysinger2013-02-051-12/+22
| | | | | | | | | | | | | | | | | | | When setting a field, this script mounts the image, unmounts, mounts it, then writes the field, then unmounts it. When setting 4 or 5 keys at once, this is quite a waste. Tweak it so we only mount it once, and we can set multiple keys in a single call by looping over the input args. BUG=None TEST=`./signing_unittests.py` passes BRANCH=None Change-Id: Id7dc4e8ef58113cc4632721851fcab04ef1e69eb Reviewed-on: https://gerrit.chromium.org/gerrit/42601 Reviewed-by: Ryan Cui <rcui@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
* Add VbExEcGetExpectedRWHash()Randall Spangler2013-02-051-1/+12
| | | | | | | | | | | | | | This is used by vboot to retrieve the precomputed hash of the expected EC image, which requires reading less data from EEPROM than getting the entire EC image. BUG=chrome-os-partner:17606 BRANCH=spring TEST=none; just a new API not used yet Change-Id: I226643144280acabba147d345ef1f83a77a91fbc Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42566
* Reformat to kernel styleRandall Spangler2013-02-041-719/+901
| | | | | | | | | | | | | No code changes, just reformatting. BUG=none BRANCH=none TEST=make runtests Change-Id: I0adb8044ff79a1653a5093ba24934d87b142c9b7 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42565 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* 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