summaryrefslogtreecommitdiff
path: root/host/linktest
Commit message (Collapse)AuthorAgeFilesLines
* cgpt: enable calling CgptEditMatt Delco2018-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | This change allows CgptEdit to be called via the API. Prior to this change link fails in an app that uses CgptEdit due to undefined reference. The underlying implementation wasn't checking set_unique so I've fixed that as well. BRANCH=none BUG=None TEST=Added CgptEdit(0) call to extern.c and verified that build failed. Added cgpt_edit.c to Makefile and confirmed that build is now successful. Successfully ran unit tests on both vboot_reference and the app I'm working on that calls CgptEdit (which also has a unit test for setting the drive ID). Change-Id: Ie0a46ff96406eb83d0564d3f1eac978e0565ed76 Signed-off-by: Matt Delco <delco@google.com> Reviewed-on: https://chromium-review.googlesource.com/1361948 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* host,test: Remove unneeded vb1 rsa functionsRandall Spangler2016-10-291-2/+0
| | | | | | | | | | | | | | | Another in a continued stream of refactoring. This change removes more of the vb1 rsa library code and associated tests, in favor of their vb2 equivalents. This change touches only host-side code and its tests, not firmware. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I1973bc2f03c60da62232e30bab0fa5fe791b6b34 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/400901
* Fix indentation in firmware and host libsRandall Spangler2016-10-131-12/+12
| | | | | | | | | | | | | | | | | | | vboot_reference originally used 2-space indentation, rather than kernel-style tabs. This makes it painful to maintain given that newer source files are kernel-style. Re-indent the files that need it, and reflow comments. No functionality changes. BUG=none BRANCH=none TEST=make runtests Change-Id: I7dabed41f69434b1988a52600c0cb1eac8c8d7e6 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/396488 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot: Remove vboot1 host signature functionsRandall Spangler2016-09-061-5/+0
| | | | | | | | | | | | | | These have been superseded by their vboot2 equivalents. No firmware changes; host-only. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: I36b5d3357767f32489efb7e480049620dcc0fce4 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/363970 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot: replace CreateKernelPreamble() with vboot2 equivalentRandall Spangler2016-09-061-3/+0
| | | | | | | | | | | | | Continued refactoring of host library to kernel style / vboot2 structs. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: Ifed376812ed7690eea1ec0dfab958e836f7724a0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/363951 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* futility: Use vboot 2.0 APIs for public keysRandall Spangler2016-09-021-6/+0
| | | | | | | | | | | | | | This replaces calls to the old vboot 1 APIs with their vboot 2.0 equivalents. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: Ieb1a127577c6428c47ac088c3aaa0d0dad6275a8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/356541 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* futility: Use vboot 2.0 APIs for private keysRandall Spangler2016-08-101-3/+0
| | | | | | | | | | | | | | This replaces calls to the vboot 1 host library with their vboot 2.0 equivalents. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: Id061554fd82ea3efe35d0fe1485693b47599a863 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/356540 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* futility: Use only vboot 2.0 APIs for keyblocksRandall Spangler2016-08-101-5/+0
| | | | | | | | | | | | | | This refactors futility and the host library to use only vboot 2.0 APIs to create and verify keyblocks. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: Ia3cc1e24971b94f01bcb4890c8666a3af6f84841 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/356129 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* futility: Create signatures using vboot 2.0 APIsstabilize-8688.BRandall Spangler2016-08-031-2/+0
| | | | | | | | | | | | | Refactor futility to use only vboot 2.0 APIs to create signatures. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: I176e7f424fa556d34d8fe691df5681f1e43210ce Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/356128 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot: Convert vboot1 SHA calls to use vboot2Randall Spangler2016-07-221-1/+1
| | | | | | | | | | | | | | | | | | This change replaces all calls to the old vboot1 SHA library with their vboot2 equivalents. This is the first in a long series of changes to move the core vboot kernel verification into vb2, and the control/display loop out to depthcharge. BUG=chromium:611535 BRANCH=none TEST=make runtests; build samus firmware and boot it Change-Id: I31986eb766176c0e39a192c5ce15730471c3cf94 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/344342 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* kernel flags: Add flags field to kernel preamble.Furquan Shaikh2015-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | 1. Increase kernel preamble revision from 2.1 to 2.2. 2. Add flags field to kernel preamble. 3. Update futility to accept flags parameter for vbutil_kernel and cmd_sign for kernel. 4. Pass in an extra flags field to SignKernelBlob and CreateKernelPreamble. BUG=chrome-os-partner:35861 BRANCH=None TEST=1) "make runalltests" completes successfully. 2) vboot_reference compiles successfully for ryu. 3) Verified flags field in header using futility show. Change-Id: If9f06f98778a7339194c77090cbef4807d5e34e2 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/245950 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
* vboot: Add flag to vbutil_kernel for reconstruction of vmlinuz imageShelley Chen2015-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding functionality to allow for rebuilding of vmlinuz after it has been processed into vblock and header stripped. Basically appends the 16-bit header of a vmlinuz image onto the end of the vblock. BUG=chromium:438302 BRANCH=none TEST=Successfully ran "make runalltests". Also, ran: 1. Repack kernel block (so that 16-bit header is included): "vbutil_kernel --pack kern_0 ..." 2. Verify kernel: "vbutil_kernel --verify kern_0 ... ". This should be done before booting into kernel, but not necessary for it to work. 3. Rebuild vmlinuz image: "vbutil_kernel --get-vmlinuz kern_0 --vmlinuz-out vm.out" 4. Set up kexec with vmlinuz (this should complete with no errors): "kexec -l vm.out (other kernel cmd line args)" 5. Boot into kernel: "kexec -e" Change-Id: Iaa1582a1aedf70b43cdb3a56cde1fb248f1793d4 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/232750 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* cleanup: remove a couple of unused functions and filesfactory-storm-6269.BBill Richardson2014-09-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | scripts/sign_data.sh is just a wrapper to do this: ./signature_digest_utility $1 $3 \ | openssl rsautl -sign -pkcs -inkey $2 AFAICT, that script is only invoked by the SignatureFile() function in host/lib/file_keys.c, which is not referenced by anything. I think I can remove both of those things. Also remove utility/gbb_utility.cc, which should have been done long ago in commit 6f39615. BUG=none BRANCH=ToT TEST=make runalltests Also ran it on daisy_spring-paladin and link-tot-paladin. Change-Id: I16de5022765806f11bf6144d7ffd8cc849578a68 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/216719 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Split libvboot_host.a into external and local libraries.Bill Richardson2014-07-092-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've been creating and linking against a library called "libvboot_host.a" for two different reasons. The main purpose is to build the vboot_reference tools found in the utility/ directory. But there are some external userspace programs that would also like to use some functions in this library. This change establishes libvboot_host.a as the library for use by external userspace programs only, and creates a new libvboot_util.a library that's only used inside this source tree to build the vboot utilities. BUG=chromium:231567 BRANCH=ToT TEST=manual Build and run the local tests: make runalltests make clean Build Link firmware and all the utilities: emerge-link chromeos-base/vboot_reference \ sys-boot/depthcharge \ sys-boot/coreboot \ chromeos-base/chromeos-ec \ chromeos-base/chromeos-firmware-link \ chromeos-base/chromeos-cryptohome \ chromeos-base/update_engine \ chromeos-base/chromeos-installer \ chromeos-base/chromeos-login \ chromeos-base/verity Build Lumpy utilities, which include the 32-bit cros_installer: emerge-lumpy chromeos-base/vboot_reference \ chromeos-base/chromeos-login \ chromeos-base/verity \ chromeos-base/update_engine \ chromeos-base/chromeos-installer \ chromeos-base/chromeos-cryptohome Change-Id: Ie81ff1f74a6356cb8fab7d98471139d7758c4f19 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/207016 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add support for flags in the firmware preamble.Randall Spangler2011-07-131-1/+1
| | | | | | | | | | | | | | | | | | The old (v2.0) parser is compatible with new (v2.1) structs. That is, this won't break existing firmware or vbutil_firmware. A new (v2.1) parser parsing an old (v2.0) struct will return 0 for the flags. This will be used to support the RO-normal code path in a subsequent CL. BUG=chromium-os:17304 TEST=added unit tests; make && make runtests Change-Id: I73bcd8acd3330b0d7d143061b5ef838e6d79cf1a Reviewed-on: http://gerrit.chromium.org/gerrit/4030 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add license headersRandall Spangler2010-08-051-0/+4
| | | | Review URL: http://codereview.chromium.org/3094003
* Adding --repack and --headeronly options to vbutil_kernelBill Richardson2010-06-301-1/+1
| | | | | | | | | | | | The --repack option lets us sign a previously signed kernel blob with a new kernel data key. The --headeronly option is so we can emit the new verification header separately from the kernel blob. More work to come... Review URL: http://codereview.chromium.org/2812034
* Remove unused files, and tidy the directory structure of the remaining ones.Randall Spangler2010-06-171-0/+13
| | | | Review URL: http://codereview.chromium.org/2815011
* Refactor LoadFirmware() to avoid global variables, which don't work when ↵Randall Spangler2010-06-151-2/+0
| | | | | | running out of ROM Review URL: http://codereview.chromium.org/2848006
* Clean up of key block functionsRandall Spangler2010-06-111-1/+5
| | | | | | No substantial new code, just making the old code consistent. Review URL: http://codereview.chromium.org/2729021
* Add vbutil_keyblockRandall Spangler2010-06-101-0/+1
| | | | Review URL: http://codereview.chromium.org/2748008
* Utility to pack public key, version, algorithm into a single file in ↵Randall Spangler2010-06-101-2/+7
| | | | | | VbPublicKey format Review URL: http://codereview.chromium.org/2762009
* Major refactoring of structures, with unit tests. This matches the doc I ↵Randall Spangler2010-06-101-0/+28
sent out earlier. Firmware-side code for LoadKernel() is in place now. LoadFirmware() replacement coming soon. The new functions are implemented in parallel to the existing ones (i.e., everything that used to work still does). Review URL: http://codereview.chromium.org/2745007