History log of /external/vboot_reference/futility/futility.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1eae873b6194db25781233d7a4aaee6a34160eec 05-Feb-2015 Bill Richardson <wfrichar@chromium.org> futility: Add global args to specify vboot API and format

The host-side futility tool will need to support all extant vboot
implementations. Some legacy futility commands only support the
original vb1 format, but others ("show" or "sign", for example)
may need to be instructed which formats to expect or emit.

This change adds some global args to specify the preferred
formats. It also cleans up a few [unused AFAICT] one-letter args
to avoid conflicts.

BUG=chromium:231574
BRANCH=none
TEST=make runtests

Nothing makes use of this yet, except the "help" command.

Change-Id: Ib79fa12af72b8860b9494e5d9e90b9572c006107
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/246765
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
f242ad0f6fcfc9dc9195af06fe79301a9bd74113 12-Dec-2014 Bill Richardson <wfrichar@chromium.org> futility: remove obsolete dev_sign_file command

This wasn't being used anywhere, so out it goes.

BUG=chromium:231457
BRANCH=none
TEST=make runtests

Change-Id: If3865f54ac29655ee7d520f00e618f490f25c619
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/235481
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
004851f6612d15e8b958f911550eeb2b208773b3 11-Dec-2014 Bill Richardson <wfrichar@chromium.org> futility: prevent segfault for "futility help version"

BUG=none
BRANCH=none
TEST=make runtests

Before, this segfaulted:

futility help version

Now it doesn't.

Change-Id: I7f8fb38d2eb96641b7664709cd78f976e8fed4b2
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/235428
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
e1486c3234b7dc6fc5b58681b271a65a09141e20 31-Oct-2014 Bill Richardson <wfrichar@chromium.org> futility: add version command

BUG=none
BRANCH=none
TEST=manual

make && ./build/futility/futility version

Change-Id: I362b13d3befba62a33bc9fd2e87ad68f4bc62a84
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/226779
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
6df3e33912baf2633ed27fce6fe166d87e2f04a8 03-Oct-2014 Bill Richardson <wfrichar@chromium.org> Add hwid digest field to GBB header

This adds a field in the GBB header to store the sha256 digest of
the HWID string, and updates gbb_utility so that it stores the
digest when it modifies the HWID. Because this is a new field,
the GBB_MINOR_VER is incremented.

BUG=chromium:415227
BRANCH=ToT
TEST=make runtests, VBOOT2=1 make runtests

Since the GBB is in the RO firmware, there should be no side
effects for existing devices (but even without that, they should
handle a minor version change without complaint).

Change-Id: Icdb2a0b564677b0b65e58df897d2ec5af3964998
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221360
/external/vboot_reference/futility/futility.c
3638625d351ec0a0ba32d7cf8172dda179235db9 15-Oct-2014 Bill Richardson <wfrichar@chromium.org> futility: Be more accepting of how it's invoked

Now that futility is pretty much working as intended, we don't
have to be quite so picky in the way it's being invoked. Up until
now, it's only worked when invoked as "futility" or as one of the
built-in commands, such as "dump_fmap".

This change removes those restrictions. You can invoke futility
under any name you wish. If it recognizes the name as a built-in
command, great. Otherwise it will require a valid command as the
first arg, just like it always has.

BUG=none
BRANCH=ToT, Samus
TEST=make runtests

In addtion to the new test included with this CL, I manually ran

lddtree --copy-to-tree=blah --generate-wrappers /usr/bin/futility
./blah/usr/bin/futility dump_fmap -h tests/futility/data/bios_peppy_mp.bin

Before this CL, the wrapper didn't work because the binary was
being invoked as futility.elf, which was rejected. After this CL,
the wrapper works fine.

Change-Id: Iafdaff6e07ed294a7d29e4cff599ace0a3089229
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223386
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
/external/vboot_reference/futility/futility.c
779796f57e1e0236ea502248ede2cbea986fca21 23-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: Improve help messages

This provides help messages for the futility commands similar to
the way git does. These show the available commands:

futility
futility help
futility --help

While these show help for a specific command:

futility help COMMAND
futility --help COMMAND
futility COMMAND --help

BUG=none
BRANCH=ToT
TEST=manual

make runtests

And manually look at help messages for each command.

Change-Id: I1126471e242784c6ca7a2f11694fa7c505d833e8
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/219528
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
ee53d65ac033da640034bc2d04bc09020435c072 05-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: slight tweak to the logging implementation

Just reporting that the parent process is "/bin/bash" doesn't
help much. Let's also report the cmdline args given to the parent
and the cwd. This will help us identify which shell script is
calling futility with the wrong args.

BUG=chromium:231547
BRANCH=ToT
TEST=make runtests

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I800995ff269ab8d8c56cad8827d8de48a53cd150
Reviewed-on: https://chromium-review.googlesource.com/216715
/external/vboot_reference/futility/futility.c
cf6e78dbd54684ebba0c3bfc2524426f61193416 28-Aug-2014 Bill Richardson <wfrichar@chromium.org> futility: the show command can traverse all file types

It doesn't yet handle block devices, but it can display normal files
containing a entire BIOS image, a GBB, a VBLOCK, a .vbpubk, a .vblock,
and a firmware preamble (VbFirmwarePreambleHeader).

The command-line options are not well-documented.

BUG=chromium:224734
BRANCH=ToT
TEST=make runtests

Change-Id: I181f6331ae23599302bbaee3f270e8af9586cf06
Reviewed-on: https://chromium-review.googlesource.com/216032
Commit-Queue: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
31d95c2386df8d3d5ec619a077960645d052fa38 25-Aug-2014 Bill Richardson <wfrichar@chromium.org> futility: Reformat to use kernel coding style

This just reformats the futility sources to conform to the Linux kernel
coding style. No functional changes.

BUG=chromium:224734
BRANCH=ToT
TEST=make runtests

Change-Id: I82df07dd3f8be2ad2f3df24cebe00a9a378b13f4
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213915
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
7351ed7a3cf2759ac043d341d94f16e0ecd139f0 18-Aug-2014 Mike Frysinger <vapier@chromium.org> futility: add more static/const markings

BUG=chromium:404643
TEST=pre-cq passes (runs unittests)
BRANCH=None

Change-Id: I3c3a9ee7192305dfa72333c0b6a77653b7188869
Reviewed-on: https://chromium-review.googlesource.com/212877
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
/external/vboot_reference/futility/futility.c
6f3961507e73f90cec665896dece884e86be560a 15-Jul-2014 Bill Richardson <wfrichar@chromium.org> futility: Add remaining vboot binary utilities

This change adds these formerly external utilities into the futility binary:

dev_sign_file
dump_kernel_config
gbb_utility
vbutil_firmware
vbutil_kernel

These target binaries will remain independent of futility, since they are
not directly related to verified boot:

cgpt
crossystem
tpm_init_temp_fix
tpmc

Also, dumpRSAPublicKey is removed from the target, since it is only used on
the build host to create new keypairs.

This change also add several additional tests.

BUG=chromium:224734
BRANCH=ToT
CQ-DEPEND=CL:210391,CL:210568,CL:210587
TEST=manual

make runtests
make clean

Also build and test:
- normal image
- test image
- recovery image
- firmware shellball

Note that this CL depends on simultaneous changes to the chromeos-initramfs
ebuild.

Change-Id: If791b5e9b5aac218ceafa9f45fc1785f16b91a64
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210403
/external/vboot_reference/futility/futility.c
e155044a7bbb9b8c6eb751af051726cfe1b411a4 17-Jul-2014 Bill Richardson <wfrichar@chromium.org> futility: deprecate eficompress and efidecompress

I don't think these utilities are needed any longer, so mark them as
deprecated. They will still be built and can be run via futility, but
invoking them directly will fail with a warning message.

BUG=chromium:224734
BRANCH=ToT
TEST=make runtests

Change-Id: Ie704f2cecc3c37c91e4a0ffbcbcf94e2bf3ba05b
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/208775
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
d2d08b2cc68f720a485cdfa6f044ddb234e8c42b 09-Jul-2014 Bill Richardson <wfrichar@chromium.org> Cleanup futility test coverage framework a bit

This cleans up the Makfile and test scripts a bit, and adds a new test for
the builtin commands.

BUG=chromium:224734
BRANCH=ToT
TEST=make runtests

Change-Id: Ibf5aa867d4dcabc0e46daac6633036b035c99ac8
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207718
/external/vboot_reference/futility/futility.c
7d028c4f03c82307fc17dd1226c9949bdbbf38d1 12-Jul-2014 Bill Richardson <wfrichar@chromium.org> Simplify the futility linker script a bit.

The alignment rules were complicated and not always correct. This change
sorts pointers instead of structures, and aligns the pointer table better.

BUG=chromium:224734
BRANCH=ToT
TEST=make runtests

Change-Id: I16c4e9b777fffe7537127aba15413b54e8e0f0a4
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207717
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
3401fdcd4125beea1a8cb1cc59ee27df89d4d88a 16-Aug-2013 Simon Glass <sjg@chromium.org> Correct some minor compiler warnings

A few places in the code through up warnings when building with strict
compiler flags. Correct these.

BUG=chrome-os-partner:21115
BRANCH=pit
TEST=manual
Build with:

FEATURES=test emerge-peach_pit vboot_reference

and see that iot now succeeds. Warnings include:

host/arch/arm/lib/crossystem_arch.c: In function 'ReadFdtValue':
host/arch/arm/lib/crossystem_arch.c:93:8: error: ignoring return value of 'fread', declared with attribute warn_unused_result [-Werror=unused-result]

Change-Id: I765723636e5f8979b794925c7b610081b2849026
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/66174
/external/vboot_reference/futility/futility.c
6db8c75021e2edfa400ae707a8544d041e3c415f 05-Apr-2013 Bill Richardson <wfrichar@chromium.org> Build both static and dynamic versions of futility.

In almost every case we want the dynamically linked version of futility,
because it's smaller and the openssl functions require it (they use
dl_open() to invoke the correct RSA libraries).

However, the AU shellball requires three futility functions (crossystem,
gbb_utility, and dump_fmap). Those pretty much have to be built statically,
because they run from the new rootfs and packing all the dynamic libraries
into the shellball is way too large and complicated.

This change prepares to build both futility (full featured) and futility_s
(just those functions). The scripts that create the AU shellball will
already choose futility_s from /build/$BOARD/.

BUG=chromium:224734
BRANCH=none
TEST=none
CQ-DEPEND=CL:47589

Nothing to test just yet. The AU shellball is currently broken (it uses the
dynamic version of futility and doesn't copy the symlinks anyway), so this
should have no effect. We just need to ensure that the _s version doesn't go
into any of the other images.

Change-Id: I60b8dcd17e135f12a0d29ddacfb9fe8275567c70
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47466
/external/vboot_reference/futility/futility.c
0c3ba249abb1dc60f5ebabccf84ff13206440b83 29-Mar-2013 Bill Richardson <wfrichar@chromium.org> Massive refactoring of external header files.

This reduces the number of exported header files to the minimum needed by
the existing userspace utilities and firmware implementations.

BUG=chromium:221544
BRANCH=none
TEST=manual, trybots
CQ-DEPEND=CL:47019,CL:47022,CL:47023

sudo FEATURES=test emerge vboot_reference
FEATURES=test emerge-$BOARD \
vboot_reference \
chromeos-cryptohome \
chromeos-installer \
chromeos-u-boot \
peach-u-boot \
depthcharge

Change-Id: I2946cc2dbaf5459a6c5eca92ca57d546498e6d85
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47021
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/futility.c
feb2518166b1cd181e607c611cbb610f0c7300da 07-Mar-2013 Bill Richardson <wfrichar@chromium.org> Wrap all vboot utilities with futility.

This moves all the old userspace utilities generated by vboot_reference into
a subdirectory not in $PATH, and replaces them with symlinks to a single
executable named 'futility'. At the moment that utility just execs the
original utilities (optionally logging that fact first).

Ultimately, the old utilities will be subsumed into a single binary instead
of multiple separate executables.

There is a matching CL needed to make the recovery image creation work.

BUG=chromium-os:37062
BRANCH=none
CQ-DEPEND=CL:44864
TEST=auto

To test, build everything, test everything. It should work as before in all
cases. I have built normal images, test images, factory installers, recovery
images; they all seem to work.

I've run trybots on daisy-paladin link-paladin lumpy-paladin and alex-paladin.

Change-Id: Ie93db676f2ed2a64e4b13b3b5dc6b65a77db0f8c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44871
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
/external/vboot_reference/futility/futility.c