summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* create_new_keys.sh uses key versions file0.12.433.B620.12.433.B1090.12.433.BRandall Spangler2011-05-171-5/+21
| | | | | | | | | | | | | | | | | | BUG=chromium-os:14904 TEST=manual: ./create_new_keys.sh verify that keys are created edit key.versions to change versions to 10 20 30 40 ./create_new_keys.sh verify that keys are created with versions from the file (cherry picked from commit 1fb83158560de5eaec4f04d021afe0594e03cc5d) Change-Id: Ibccbdb18d376663647ce9f164e680a9a1710c907 Reviewed-on: http://gerrit.chromium.org/gerrit/1054 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add more specific recovery reasons for RW firmware invalid (with fix)Randall Spangler2011-05-172-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:3698 TEST=manual 1. Run the firmware key/version autoupdate test; this rolls forward your stored TPM version numbers. 2. Put back the original firmware. 3. Reboot. 4. Press TAB at recovery screen. 5. Should see Recovery Reason 0x14. Reviewed-on: http://gerrit.chromium.org/gerrit/567 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 9243e616d727c3e57525f8dec2b5f22840900451) Also: Fix build break BUG=none TEST=emerge-x86-generic vboot_reference Reviewed-on: http://gerrit.chromium.org/gerrit/608 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 4dd03035c2cd9deeaebac68bf7181fe50dc30237) Change-Id: Ifbf26ee58169f707a776e1528a3638d5f1ef88dc Reviewed-on: http://gerrit.chromium.org/gerrit/1059 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org>
* Change GBB bmpblock to version 1.1, supporting direct HWID rendering.Bill Richardson2011-05-1713-658/+2183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With version 1.0, the BIOS displays its screens using composited images, but we still have to create a new bmp image for every HWID. Version 1.1 lets us render the ASCII HWID string directly, so the BIOS screens don't need modification just because the HWID changes. In the yaml file, we just replace the hwid image with a magic string, like so: bmpblock: 1.1 [...] screens: en_remove: - [ 0, 0, remove_bg] - [256, 534, en_model_text] - [314, 534, $HWID] - [192, 479, url] - [195, 453, en_remove_text] This change modifies the bmpblk_utility to accept and generate both 1.0 and 1.1 versions. It also updates the supporting scripts (most of which aren't needed anymore) and adds a new DEFAULT.yaml file which can be used as the basis for all locales. BUG=chrome-os-partner:3264 TEST=none (manual) Reviewed-on: http://gerrit.chromium.org/gerrit/378 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> (cherry picked from commit 54e95825b30d4f730cbd70c109fb6622dda6fbb8) Change-Id: Ib052c9525c8803273178d79bbe212c942e6e7cd1 Reviewed-on: http://gerrit.chromium.org/gerrit/1051 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Build EFI compression utilities on hostBill Richardson2011-05-173-1/+284
| | | | | | | | | | | | | | | | Build eficompress and efidecompress utilities on host. R=rpangler@chromium.org BUG=chromium-os:13037 TEST=none Review URL: http://codereview.chromium.org/6880176 (cherry picked from commit 573d4f6d80730ac56d23b2c5c8620a9fd843e816) Change-Id: I0fb9eb037d2720b98c98d9229be0bbc60cfdd267 Reviewed-on: http://gerrit.chromium.org/gerrit/1050 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org>
* Cherry-pick into R12 - Check whether key block and preamble fit in padding.Randall Spangler2011-05-131-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add --pad as a valid option to --repack and --verify, so that kernels with larger-than-normal padding can be verified. BUG=chromium-os:13720 TEST=see bug 13720 Using the supplied kernel images from the bug, vbutil_kernel --verify 007 --debug vbutil_kernel --verify 008 --debug These should now fail with an error that the key block extends past the padding. Next, supply a large enough padding size that the key block and preamble fit. For example: vbutil_kernel --verify 007 --pad 0x900000 --debug vbutil_kernel --verify 008 --pad 0x900000 --debug These should now make it past the padding check, and fail on a subsequent test (for example, no kernel blob found). Original-Change-Id: I7ec32b4def29970e302bf922b96d3e206d97fe82 Reviewed-on: http://gerrit.chromium.org/gerrit/810 Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 7ecb39d419706756a7a9054fa151345f04c3a0a2) Change-Id: Ida875d59e2b35d1ee3c7d927323512c54340cf02 Reviewed-on: http://gerrit.chromium.org/gerrit/872 Reviewed-by: Puneet Kumar <puneetster@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add --minversion option to vbutil_kernel to check for rollback.Randall Spangler2011-05-131-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:3309 TEST=manual: 1. Extract a kernel partition from an image, for example, using unpack_partitions.sh. Or if running this on a device, use /dev/sda2 or /dev/sda4 for the kernel filename. 2. vbutil_kernel --verify part_2 3. Note the data key version and kernel version printed. For example, Data key version: 1 Kernel version: 3 4. Test specifying the same version. This should succeed. vbutil_kernel --verify part_2 --minversion 0x00010003 5. Test specifying a higher data key version. This should fail with a data key version error. vbutil_kernel --verify part_2 --minversion 0x00020003 6. Test specifying a higher kernel version. This should fail with a kernel version error. vbutil_kernel --verify part_2 --minversion 0x00010004 Original-Change-Id: I7b69041cf41527fc59ad29995135f30d9f496fac Reviewed-on: http://gerrit.chromium.org/gerrit/792 Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit ae87b92cbe41e7a0ac9927de06d722051130a35f) Change-Id: Ifc7165efd9b0067908173e53633e8def5402599c Reviewed-on: http://gerrit.chromium.org/gerrit/868 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Reviewed-by: Puneet Kumar <puneetster@chromium.org>
* make_dev_ssd: more sanity checks (merge from ToT to R12)Hung-Te Lin2011-04-271-33/+133
| | | | | | | | | | | | | | | | | | | | | make_dev_ssd is a powerful command bug may confuse developers by its behavior. Adding sanity checks can prevent developers throwing their system into un-bootable ste. Cherry-Picked URL: http://codereview.chromium.org/6870026 BUG=chromium-os:14219 TEST=./make_dev_ssd.sh -i some_images; # no check, pass ./make_dev_ssd.sh # see alert for live partitions (with non-developer firmware) ./make_dev_ssd.sh --partitions 2 # seeing firmware warning (with developer firmware) ./make_dev_ssd.sh --partitions 2 # pass, no warning (with dev-signed normal firmware) ./make_dev_ssd.sh --partitions 2 # pass, no warning ./make_dev_ssd.sh -f # seeing 5 second condown alert screen and then continue Change-Id: I7ae134c03899b2dc4a6d95f6d9091c38e6f8cf65 R=rspangler@chromium.org Review URL: http://codereview.chromium.org/6903025
* Update firmware section namesChe-Liang Chiou2011-04-211-5/+5
| | | | | | | | | | R=rspangler@chromium.org BUG=none TEST=run load_firmware_test successfully Review URL: http://codereview.chromium.org/6877077 Change-Id: I51886ee877319558a5593ad7ce41cb12f1c9aa4d
* Add option to bitmap_viewer to save all snapshots at once.Bill Richardson2011-04-201-0/+13
| | | | | | | | | | Change-Id: Ifded1063faf5f7fae27b1b3ea57ecf716407fa91 R=rspangler@chromium.org BUG=chromium-os:13037 TEST=none Review URL: http://codereview.chromium.org/6873120
* Adding bitmaps that can't be generated by ImageMagickBill Richardson2011-04-20183-70/+2439
| | | | | | | | | | | | | | | | Also adding support for the xx-YY variants to the make_yaml_from_hwids script, which required that I rename those directories from xx-YY to xx_YY. Providing a default locale ordering for all locales, which is roughly geographical. Change-Id: I4919728a0a876b649cef9dec3a023d0263efe794 R=rspangler@chromium.org BUG=chromium-os:13037 TEST=none Review URL: http://codereview.chromium.org/6878074
* Alphabetize crossystem variablesRandall Spangler2011-04-201-30/+26
| | | | | | | | | Change-Id: I836796c45849c03172f2a4947f39302616d03f1b BUG=none TEST=manual - run on test platform, see alphabetized variables. Review URL: http://codereview.chromium.org/6877054
* Process case of corrupted firmware explicitly.Vadim Bendebury2011-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | Add the missing return statement to allow to tell between different recovery reasons on legacy firmware. Change-Id: I287e9d91dde040dd0edbe23422dc8914f81cc9f2 BUG=chromium-os:14295 TEST=manual On a system with a chromeOS Flash USB drive plugged in: - preserve currently running firmware - corrupt both RW firmware sections - restart the system (it comes up in recovery mode) - login - run `crossystem recovery_reason' and observe the result: it used to print '66' before the fix, prints '3' after the fix. - restore the firmware Review URL: http://codereview.chromium.org/6879051
* Fix stupid typo in informational message.Bill Richardson2011-04-191-1/+1
| | | | | | | | | | Change-Id: Ic8e7ddd37550d88e7f2a84331b6e49a96723efa9 R=rspangler@chromium.org BUG=chromium-os:8947 TEST=none Review URL: http://codereview.chromium.org/6883024
* Do not advance kernel version in TPM if we are in firmware B trying a new ↵Randall Spangler2011-04-171-7/+6
| | | | | | | | | | | | firmware Change-Id: If5b6390d011d743689cf96e49202358397663651 R=bleung@chromium.org,dlaurie@chromium.org,sumit@chromium.org BUG=chrome-os-partner:3367 TEST=make && make runtests Review URL: http://codereview.chromium.org/6871044
* vboot_reference: check developer firmware before running make_dev_ssdHung-Te Lin2011-04-151-1/+36
| | | | | | | | | | | | | | | | | | | | | Developers may turn on developer switch, enter shell, and then try to run make_dev_ssd without switching to developer firmware / dev root key. And that would make the system showing "NO GOOD" or "INSERT" screen after reboot. For sanity check, we should check if firmware type is "developer" before running make_dev_ssd. BUG=none TEST=(using normale firmware) make_dev_ssd # seeing the error messages sudo chromeos-firmwareupdate --mode=todev; sudo reboot (using developer firmware) make_dev_ssd # not seeing error Change-Id: Id62959c91c39b0bbcca604c9e83fd087e3727b8b R=rspangler@chromium.org Review URL: http://codereview.chromium.org/6840047
* Put the final output of dev_debug_vboot under /var/log/Bill Richardson2011-04-121-7/+4
| | | | | | | | | | | | | | Change-Id: I9e7a947541eb6a5b56556038a254ad4017b349b4 R=jimhebert@chromium.org,gauravsh@chromium.org BUG=chromium-os:8947 TEST=manual Boot, wait 60 seconds, navigate to chrome://system. Click the "Expand" button for "verified boot". You should see useful information. Review URL: http://codereview.chromium.org/6840005
* make_dev_ssd.sh: support updating legacy boot partitionsHung-Te Lin2011-04-131-0/+24
| | | | | | | | | | | | | | | | Change the boot default option in partition 12 (ESP) when we want to disable rootfs verification. BUG=chromium-os:12424 TEST=./make_dev_ssd --remove_rootfs_verification --recovery_key -i USB_IMAGE # the image is bootable by H2C and H2C BIOS(EFI). # Not tried on non-EFI (syslinux) firmware, but it should work. Change-Id: I7533bb73597041bbdc8cc57e4e8baaf6ca242309 R=wfrichar@chromium.org Review URL: http://codereview.chromium.org/6813109
* Add a script to increment kernel subkey and data key.Gaurav Shah2011-04-124-22/+127
| | | | | | | | | | | | | When we do perform firmware updates, we'd like to change the kernel subkey to ensure that new firmware and Chrome OS image stay in sync. This CL adds a scripts which makes it possible to do this revving in an automated manner. The current versions rollback versions corresponding to the keyset are stored in key.versions. If we change the kernel subkey (to enforce firmware/Chrome OS lockstep), we must also update the firmware version. Similarly, since we modify the kernel subkey, we also generate a new set of kernel data keys. Thus, we also increment the kernel key version. Change-Id: I364ab50bda115991dd4f69331d37291f66abbf36 BUG=chrome-os-partner:3274, chromium-os:8016 TEST=Manually tested using a newly generated keyset. Review URL: http://codereview.chromium.org/6824059
* Add crossystem loc_idxRandall Spangler2011-04-122-0/+5
| | | | | | | | | | | | | | | Change-Id: I9fdedabd02b11e5623b9417f24dc388ce092548c R=wfrichar@chromium.org BUG=chromium-os:14069 TEST=manual crossystem loc_idx=3 crossystem loc_idx # prints 3 crossystem loc_idx=0 crossystem loc_idx # prints 0 Review URL: http://codereview.chromium.org/6826057
* Add Mario support for fwupdate_triesRandall Spangler2011-04-111-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1c4240ebe5783ca923c310061e2a76947aa6601b R=reinauer@chromium.org BUG=chromium-os:14030 TEST=manual On a Mario: crossystem fwupdate_tries=3 crossystem fwupdate_tries # should be 3 cat /mnt/stateful_partition/.need_firmware_update # should be 3 crossystem fwupdate_tries=0 crossystem fwupdate_tries # should be 0 cat /mnt/stateful_partition/.need_firmware_update # should complain file doesn't exist On a newer platform: crossystem fwupdate_tries=3 crossystem fwupdate_tries # should be 3 cat /mnt/stateful_partition/.need_firmware_update # should complain file doesn't exist crossystem fwupdate_tries=0 crossystem fwupdate_tries # should be 0 cat /mnt/stateful_partition/.need_firmware_update # should complain file doesn't exist Review URL: http://codereview.chromium.org/6825047
* Add default arch to fix compiling outside emakeRandall Spangler2011-04-111-0/+5
| | | | | | | | | | Change-Id: I225c2ee7e703aad961c50ec8988ed2466886f266 R=wfrichar@chromium.org BUG=none TEST=make && make runtests Review URL: http://codereview.chromium.org/6820018
* Add the latest localized text strings, update scripts to support them.0.12.392.BBill Richardson2011-04-11601-380/+1064
| | | | | | | | | | | | | | | | | | There are lots of new and changed files here, but they're mostly localized text strings and prerendered bitmaps of them. There are a few that still need rendering by hand. These locales don't work with ImageMagick: ar el fa hi iw ja ko th vi zh-CN zh-TW Change-Id: I1777f985460d46d5aedbb3fbc2fd3c159439c454 R=rspangler@chromium.org BUG=chromium-os:13037 TEST=none Review URL: http://codereview.chromium.org/6825032
* Address symlink attack on dev_debug_vboot.Bill Richardson2011-04-081-18/+23
| | | | | | | | | | | | | | | | | | | | | Two things here: Use mktemp to create a unique and new temporary directory to work in, and copy the published log file to a known path in a way that can't be redirected with symlinks. There are also a couple of minor tweaks to cleanup a little bit rot in the information that the script provides. BUG=chromium-os:8947 TEST=manual Boot, wait 60 seconds, look for "/tmp/debug_vboot_noisy.log". It should exist and contain useful and interesting data. Change-Id: Iff9c5c86802ab7fcf3342e82ba128a1795dba16d R=rspangler@chromium.org,wad@chromium.org,gauravsh@chromium.org Review URL: http://codereview.chromium.org/6824018
* Add a script to arbitrarily change channels on imageGaurav Shah2011-04-081-0/+40
| | | | | | | | | Change-Id: Icf9abbff05f9b29664216079b5c008cb7906a4f6 BUG=chrome-os-partner:3229 TEST=manually on an image. Review URL: http://codereview.chromium.org/6813047
* Add --all option to crossystem to print normally-hidden fieldsRandall Spangler2011-04-081-5/+10
| | | | | | | | | | | | | Change-Id: I649b0d745316acc38b5a121dfd1c353c475ac44a R=reinauer@chromium.org BUG=chromium-os:13204 TEST=manual crossystem # should not print vdat_lfdebug and vdat_lkdebug crossystem --all # should print them Review URL: http://codereview.chromium.org/6824020
* Change description of fwupdate_triesRandall Spangler2011-04-081-1/+2
| | | | | | | | | | | | | | | | Change-Id: Ie88d93cbfe7450083335e2ecb17ac1f9018d45ec Add crossystem fwupdate_tries and fix nv storage writes Change-Id: I1835f4867de80aa3764e4a4c6d90b3fde2dc4308 BUG=chromium_os:13672 TEST=manual 1. crossystem 2. Note that description of fwupdate_tries changed Review URL: http://codereview.chromium.org/6826014
* Add crossystem fwupdate_tries and fix nv storage writesRandall Spangler2011-04-082-1/+18
| | | | | | | | | | | | | | | | | Change-Id: I1835f4867de80aa3764e4a4c6d90b3fde2dc4308 R=reinauer@chromium.org BUG=chromium_os:13672 TEST=manual crossystem kern_nv=3 crossystem fwupdate_tries # should print 3 crossystem fwupdate_tries=15 crossystem kern_nv # should print 0x0000000F crossystem kern_nv=0 crossystem fwupdate_tries # should print 0 Review URL: http://codereview.chromium.org/6813056
* Add crossystem arch (reports x86 or arm, depending on platform)Randall Spangler2011-04-083-2/+7
| | | | | | | | | | | | Change-Id: I857ead5b108d42195145cdbc5cdafa817f3416b4 R=reinauer@chromium.org BUG=chrome-os-partner:3023 TEST=crossystem arch (reports 'x86' on x86 platform, 'arm' on ARM platform) Review URL: http://codereview.chromium.org/6813054
* Add dummy crossystem_arch implementation for amd64 (host)Randall Spangler2011-04-071-0/+57
| | | | | | | | | Change-Id: Ia87cdd9551af1d592ece641c2abcc02db73869e1 R=piman@chromium.org,jrbarnette@chromium.org BUG=none TEST=sudo emerge vboot_reference TBR=jrbarnette@chromium.org
* Refactor crossystem to move x86-specific implementation to its own file.Randall Spangler2011-04-077-604/+893
| | | | | | | | | | | | | | | | | | | | This should be ready for the ARM team to pick up and work on. I added a placeholder ARM implementation file, though it's not hooked up in the Makefile yet. As soon as you implement the VbNvStorage APIs, all the related crossystem commands will start working. Ditto for VbSharedData. The params which x86 gets from ACPI you'll need to get from u-boot somehow, probably via your own kernel driver. R=robotboy@chromium.org BUG=chromium-os:12522 TEST=emerge-x86-alex vboot_reference, make sure it still works on x86 Review URL: http://codereview.chromium.org/6780008 Change-Id: I628ee56508421b937ed50db7cb9b8385408d2f5e
* Add EntryWiped to pack_firmware_imageChe-Liang Chiou2011-04-071-0/+23
| | | | | | | | | | | | | EntryWiped takes a byte value wipe_value of range [00:ff] as one of its arguments that pack_firmware_image uses the value to "wipe" the entry. R=yjlou@chromium.org BUG=chrome-os-partner:3089 TEST=emerge-tegra2_seaboard chromeos-bios Review URL: http://codereview.chromium.org/6799009 Change-Id: Ib2265caf5cfbd6d297465684e87f5a299cd4d043
* vboot_reference: allow using recovery_key in make_dev_ssd.Hung-Te Lin2011-04-071-3/+11
| | | | | | | | | | | | | | Adding --recovery_key enables make_dev_ssd to process recovery images (including USB bootable images). R=gauravsh@chromium.org BUG=chromium-os:12424 TEST=./make_dev_ssd.sh --remove_rootfs_verification --recovery_key -i /dev/sdd # then use the USB to boot on a H2C device - success. Review URL: http://codereview.chromium.org/6799007 Change-Id: Ie983f08ff8eba9472800b2f4097915ce380a0c50
* Fail verification if the rootfs hash is empty.Gaurav Shah2011-04-051-0/+5
| | | | | | | | | | | This should let the signer catch errors where there are errors parsing verity output. And failing verification if rootfs hash verification is turned off for whatever reason. Change-Id: I1e3f239a5b6afab31accdd8f0a737b8685530e8d BUG=chrome-os-partner:3093, chrome-os-partner:3104 TEST=manually on a badly signed image (verification fails now) Review URL: http://codereview.chromium.org/6720043
* Fix vboot_reference-firmware linking errorGaurav Shah2011-04-042-0/+2
| | | | | | | | | Change-Id: I54052f6d15b9afa52944bf04e09924a3ddb8922e BUG=none TEST=emerge-arm-generic vboot_reference-firmware && emerge-arm-generic chromeos-u-boot-next (running) Review URL: http://codereview.chromium.org/6792031
* Make SHA256 and SHA512 handle >UINT32_MAX data correctly (now with fix for ↵Gaurav Shah2011-04-043-22/+54
| | | | | | | | | | | | | | | | ARM compilation) Change-Id: Iaa0c5675c07e9b54b2a389c53ed503e7a21ba731 BUG=chrome-os-partner:2912 TEST= 1) emerge-x86-generic vboot_reference 2) emerge-arm-generic vboot_reference 3) emerge-arm-generic vboot_reference-firmware 4) emerge-tegra2 vboot_reference-firmware 5) make && make runtests Review URL: http://codereview.chromium.org/6760017
* Fix preamble range checks0.12.362.BRandall Spangler2011-04-011-6/+6
| | | | | | | | | | Change-Id: I0571f4524703566b8840e2b264d868c404f87c80 R=gauravsh@chromium.org,wfrichar@chromium.org BUG=chrome-os-partner:2910 TEST=make && make runtests Review URL: http://codereview.chromium.org/6759075
* Fix duplicate -I's harmless under gcc but which break bunny-gccJim Hebert2011-03-311-17/+17
| | | | | | | | | | | | (This helps us do some instrumented fuzz testing with "bunny the fuzzer".) Change-Id: I4d06129d577115b9dd5cd9bec2c2e1b526490456 BUG=chromium-os:13690 TEST="CC=/usr/local/google/bunny-0.93/bunny-gcc make -k" now builds vbutil_*, and regular gcc/make did not break. STATUS=Fixed Review URL: http://codereview.chromium.org/6783006
* vboot_reference: remove trailing newline/space for make_dev_ssdHung-Te Lin2011-03-301-1/+1
| | | | | | | | | | | | | | To make the output of kernel_config from make_dev_ssd more close to the original images, we should eliminate the trailing newline/space. BUG=chromium-os:13516 TEST=make_dev_ssd.sh # succcess Change-Id: I17f030f8815dea22b04058456d98db6911888ef6 R=rspangler@chromium.org,clchiou@chromium.org Review URL: http://codereview.chromium.org/6735009
* Revert "Make SHA256_update and SHA512_update if the passed in length is ↵David James2011-03-292-50/+22
| | | | | | | | | | | | | | | | greater than UINT32_MAX" Needed to unbreak the tegra build. This reverts commit a01a62bf85e01e1687ea5132286628b2a760f6d8. R=gauravsh@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/6731068 Change-Id: I096fde817c0e1cfa0c34f4f1dab986c7844c0714
* Make SHA256_update and SHA512_update if the passed in length is greater than ↵Gaurav Shah2011-03-292-22/+50
| | | | | | | | | | | UINT32_MAX BUG=chrome-os-partner:2912 TEST=make && make runtests Change-Id: If415a023d47b78ae2fc5af0b2fe5e410ef37086d Review URL: http://codereview.chromium.org/6750016
* Add additional checks for size greater than header size.Randall Spangler2011-03-251-0/+12
| | | | | | | | | | Change-Id: Iea64e3df795d1f9299117cbd161b203295211629 R=wfrichar@chromium.org,gauravsh@chromium.org BUG=chrome-os-partner:2908 TEST=make && make runtests Review URL: http://codereview.chromium.org/6745027
* Fix not checking hashed data sizeRandall Spangler2011-03-251-0/+7
| | | | | | | | | | R=wfrichar@chromium.org,gauravsh@chromium.org BUG=chrome-os-partner:2909 TEST=make && make runtests Review URL: http://codereview.chromium.org/6748009 Change-Id: I3251aa6e6dd62ff4351fdf33ca9182b19a29cbbf
* Use uint64_t and avoid down casting as much as possible.Gaurav Shah2011-03-254-16/+16
| | | | | | | | | Change-Id: I231d1b3a059907c3806feced7e1b8f1c06575ba5 BUG=chromeos-partner:2912 TEST=make clean all && make runtests Review URL: http://codereview.chromium.org/6733018
* vboot_reference: fix make_dev_firmware failureHung-Te Lin2011-03-241-0/+4
| | | | | | | | | | | | | | | The script to resign firmware (resign_firmwarefd.sh) has changed its syntax, due to the new "dev firmware" design. BUG=chromium-os:13375 TEST=./make_dev_firmware.sh # seeing the "changed firmware to Developer Keys" message. Change-Id: Id553f3ce1641f13e732bd5e208cb2fb00ca9c078 R=rspangler@chromium.org,gauravsh@chromium.org Review URL: http://codereview.chromium.org/6727019
* Revert "Revert "Add --kloadaddr option to utilities""Che-Liang Chiou2011-03-222-25/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bc7a84d9a1bef3fb8c1e2709033f6c9777599fe9. It was a false alarm that --kloadaddr causes chromeos-install on a x86 targets to fail. The error of chromeos-install cannot be reproduced, and judging by the reported error message, the error should not be attributed to --kloadaddr, which has no effect in x86 targets. So --kloadaddr is restored. Verification process are below: (Verify that --kloadaddr option is restored) $ dump_kernel_config -h Expected argument after options dump_kernel_config - Prints the kernel command line Usage: dump_kernel_config [--kloadaddr <ADDRESS>] <image/blockdevice> (Setup a x86 target with kernel-next profile) $ rm -rf /build/${X86_TARGET} $ ./setup_board --board=${X86_TARGET} --profile=kernel-next $ ./build_packages --board=${X86_TARGET} $ ./build_image --board=${X86_TARGET} (Run chromeos-install on target machine successfully) $ /usr/sbin/chromeos-install (Change directory to where image sits) $ cd ~/trunk/src/build/images/${X86_TARGET}/latest (Unpack Chromium OS image) $ ./unpack_partitions.sh chromiumos_image.bin (Verify that dump_kernel_config runs successfully) $ dump_kernel_config part_2 console=tty2 init=/sbin/init add_efi_memmap boot=local noresume noswap i915.modeset=1 cros_secure kern_guid=%U tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic i8042.nomux=1 root=/dev/dm-0 quiet loglevel=1 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="vroot none ro,0 1740800 verity %U+1 %U+1 1740800 1 sha1 c357e07395150770ce25ebc0e3c6d15941675c58" (Run load_kernel_test) $ load_kernel_test -b 2 chromiumos_image.bin /usr/share/vboot/devkeys/recovery_key.vbpubk Read 2088 bytes of key from /usr/share/vboot/devkeys/recovery_key.vbpubk bootflags = 6 Reading from image: chromiumos_image.bin Ending LBA: 3989538 Read(1, 1) Read(2, 32) Read(3989506, 32) Read(3989538, 1) Read(4096, 128) Read(4224, 6472) LoadKernel() returned 0 Partition number: 2 Bootloader address: 4345856 Bootloader size: 16384 Partition guid: b2a453b0-a64a-5c4d-a957-1388cea384a5 R=marcheu@chromium.org,sjg@chromium.org BUG=none TEST=see verification process above Review URL: http://codereview.chromium.org/6685079 Change-Id: I932753197550b853495f2c03e8880ad71df765a7
* Add a blank screen value into screen index.Tom Wai-Hong Tam2011-03-221-1/+2
| | | | | | | | | | | | | A convenient value that firmware to identity the blank screen. TEST=emerge-tegra2_seaboard vboot_reference-firmware successfully BUG=chromium-os:1305 Change-Id: Ib38f0c5ba571e95c966ae58c81d22487e416e666 R=clchious@chromium.org Review URL: http://codereview.chromium.org/6712029
* Add error checking for poorly-formed crossystem argsRandall Spangler2011-03-211-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | R=petkov@chromium.org BUG=chromium-os:13322 TEST=manual The following command lines should cause crossystem to fail with a warning about a poorly formed parameter: crossystem '' crossystem '=cros_debug' crossystem '?cros_debug' The following command line should warn that you can't use both = and ?: crossystem cros_debug?=0 (that is, it warns, not just compares with '=0') The following should print 'UNEQUAL' crossystem cros_debug? || echo UNEQUAL (because it's comparing cros_debug with an empty string) Review URL: http://codereview.chromium.org/6718012 Change-Id: I2e2851515f4914b16aba64065600fb92d9ad1a63
* Print LoadKernel() debug data from VbSharedDataRandall Spangler2011-03-213-15/+139
| | | | | | | | | | Change-Id: I60cf9c4dd07e83b1ed1a5bac8a3ce8c2a54df45b R=reinauer@chromium.org BUG=chrome-os-partner:2748 TEST=manually check output of 'crossystem vdat_lkdebug' Review URL: http://codereview.chromium.org/6685097
* Use VbSharedData instead of VbNvStorage for fwb_tries and kernkey_vfyRandall Spangler2011-03-186-45/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5ed3509a9d4e578cd2e98f493dab59bc2fbd5827 R=dlaurie@chromium.org BUG=chrome-os-partner:2748 TEST=manual crossystem fwb_tries=3 (reboot) crossystem tried_fwb (should print 1) crossystem fwb_tries=0 (reboot) crossystem tried_fwb (should print 0) In dev mode... Boot a kernel signed with the same key as in the firmware crossystem kernkey_vfy (should print sig) Boot a kernel signed with a different key than the firmware crossystem kernkey_vfy (should print hash) Review URL: http://codereview.chromium.org/6711045
* Add VbSharedData debug output to LoadKernel()Randall Spangler2011-03-182-30/+220
| | | | | | | | | | Change-Id: Id2837c83877520067e46e2434460349ef001b7b9 R=dlaurie@chromium.org BUG=chrome-os-partner:2748 TEST=nmake uefi64; boot in normal and recovery modes Review URL: http://codereview.chromium.org/6688035