History log of /external/vboot_reference/futility/cmd_show.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/cmd_show.c
80e779d50b52cd97c9d5896a3b75fa8118ee488f 04-Feb-2015 Furquan Shaikh <furquan@google.com> kernel flags: Add flags field to kernel preamble.

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>
/external/vboot_reference/futility/cmd_show.c
4805f1841de9d670aaed9bdaea21147ee1d59242 31-Jan-2015 Bill Richardson <wfrichar@chromium.org> futility: show .vbprivk files

BUG=none
BRANCH=none
TEST=make runtests

futility show tests/devkeys/*.vbprivk

Change-Id: Ic062a193c7ee3d7f9837698e1c8fc6bb1e3d7757
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/245503
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
7ccd9ce48e761b7614d29ff95ef97d0a7dc1d599 31-Jan-2015 Bill Richardson <wfrichar@chromium.org> futility: handle truncated BIOS images without segfault

A truncated BIOS with an otherwise valid FMAP that now points way
off the end of the file shouldn't cause coredumps.

BUG=none
BRANCH=ToT
TEST=make runtests

Change-Id: Idf96e1e6a381bf0fe0b1cb2d16e3dad39ce7a0dc
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/245500
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
2559338dbdacbcbd3ae426337403196135bbc7e8 30-Jan-2015 Bill Richardson <wfrichar@chromium.org> futility: refactor file type detection into new files

This moves the what-kind-of-file-is-this logic into a separate
file, and makes it work by calling distinct recognizers until one
hits. A new "-t" option to the show command prints what it's
doing.

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

Change-Id: Id8f60bdf3fe6a9adf41b4555b3448a261fa52fea
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/245122
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
f1f53b3732f235da15a50080db6e7bbd4666e390 08-Jan-2015 Shelley Chen <shchen@chromium.org> vboot: Add flag to vbutil_kernel for reconstruction of vmlinuz image

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>
/external/vboot_reference/futility/cmd_show.c
bd2eb59ded600c7a62b396f41dcf6937d567dca2 03-Dec-2014 Bill Richardson <wfrichar@chromium.org> futility: fix segfault when displaying truncated kernels

Also added a test for it.

BUG=none
BRANCH=none
TEST=make runtests

Change-Id: I108c75d114400e664f0ad1f29038a94cb1effd54
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/233037
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.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/cmd_show.c
52a15f96ac009222ebf7d1299c7d17825e5a4ab5 24-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: show vs verify

This adds a --strict mode to the show command, which requires
that all signatures be valid in order to exit cleanly. It also
creates a "verify" command, which is really just an alias for
"show --strict".

BUG=none
BRANCH=ToT
TEST=make runtests

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I1fed7db7fe7128191bcab0c615706ef4fe2709f5
Reviewed-on: https://chromium-review.googlesource.com/219732
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
5f2696d2ff09d7c9c5c6125e9f0a62e56e54e0b8 24-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: Add support for [re]signing kernel partitions

BUG=none
BRANCH=ToT
TEST=make runtests

This also modifies the tests to compare the futility sign command
results against the vbutil_kernel results.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: Ibc659f134cc83982e3f0c0bcc108cc0eddbe228e
Reviewed-on: https://chromium-review.googlesource.com/219730
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
b0f1cc5e22e87a3ef1655643116991673dd1b531 24-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: do traversal of a buffer, not a file

We have been traversing things by passing a file descriptor. Now
the caller should mmap the file first. This will allow the caller
to determine the file type before traversing into it, so we can
check args.

BUG=none
BRANCH=ToT
TEST=make runtests

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: If69799bde0133689dc9fb5111e6ecb5ac61639c7
Reviewed-on: https://chromium-review.googlesource.com/219649
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
e192e7f6cea5f2c4556b729bf57ef1f552e0242a 23-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: clean up a few shared functions

Move the Debug() function into a common place instead of several
copies in different files, rename shared functions to start with
"futil_"

BUG=none
BRANCH=ToT
TEST=make runtests

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I6b844553dff95c24894dae611102716a8da5312d
Reviewed-on: https://chromium-review.googlesource.com/219645
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.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/cmd_show.c
a19b00dfd0c17681b71bd61994854dff3f3576a3 05-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: make resign_firmwarefd.sh simply invoke futility

Since all of the functionality of the resign_firmwarefd.sh script
is built in to futility, let's just make that script invoke
futility to do the work. We'll come back and remove the script
entirely, once all outside references to it have been changed to
do the right thing.

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

Also tested by editing tests/futility/test_resign_firmware.sh to
invoke the resign_firmwarefd.sh script instead of futility.
Everything passed.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: Id068e551067a956cd7ddc3f9b9e23488261d8d94
Reviewed-on: https://chromium-review.googlesource.com/216716
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
08efd1ee358c546c968918a24b45219d7003ceca 05-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: preserve preamble flags when resigning BIOS images

If we're re-signing a valid BIOS image, we want to be sure that
we preserve the original firmware preamble flags (RO_NORMAL and
so forth) if the --flags option does not specifically override
it.

This change adds a test for that case, and makes it happen.

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

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I8cbde66abaf96ec82adf0205bedf57b1fd1b82a1
Reviewed-on: https://chromium-review.googlesource.com/216714
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.c
15dc6fc5eabc1b1756aca1dbed38cb9d26259bf2 02-Sep-2014 Bill Richardson <wfrichar@chromium.org> futility: add "sign" command to resign firmware images

The "sign" command can perform the same operation as the old
resign_firmwarefd.sh script, only about 20 times faster. The
test for that will use the new command instead.

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

Change-Id: Ie7f7a0ab6fc00d7e06cb263733bf6e7246fdb023
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216227
Reviewed-by: Randall Spangler <rspangler@chromium.org>
/external/vboot_reference/futility/cmd_show.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/cmd_show.c