Commit Graph

1662 Commits

Author SHA1 Message Date
Gaurav Shah
e622f11595 image security test: Allow alternatives for verity parameters
This is again working around the fact that the signer isn't branch
conscious. Depending on which branch you look at, there are 3 possible
verity parameter styles in use.

This CL allows the kernel parameter test to allow multiple alternatives
for verity dm= parameters.

BUG=chromium-os:20640
TEST=manually tried with a R16, R15 and R14 image

Change-Id: I07554594d6adbdfd1988395d3e91edfd603d8cd4
Reviewed-on: http://gerrit.chromium.org/gerrit/8067
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-09-21 15:38:05 -07:00
Sonny Rao
06edfc60f3 vbutil: support 64bit x86
This changes the code accept x86.* as an alias for x86 architecture
since both x86 and x86_64 systems will handle things identically

BUG=chromium-os:20336
TEST=try to use update_kernel.sh on a system running an x86_64 kernel

Change-Id: Icf18925bdb8583cd53c6f6254c7493bdec540465
Reviewed-on: http://gerrit.chromium.org/gerrit/7873
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2011-09-19 00:28:21 -07:00
Eric M. Blake
236faae91a Allow path to the cgpt binary to be set on the command line
BUG=chromium-os:17138
TEST=tested changes on vm8-m2, was able to successfully run au-generate.py
     and it used the cgpt binary from au-generate.zip

Change-Id: Ia57f1be4b0d669cad430e51977cce6e26d704320
Reviewed-on: http://gerrit.chromium.org/gerrit/7796
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Eric Blake <eblake@chromium.org>
Tested-by: Eric Blake <eblake@chromium.org>
2011-09-16 14:37:56 -07:00
Bill Richardson
ec35beb128 Make BIOS screens warn when GBB.flags is nonzero.
BUG=chrome-os-partner:5919
TEST=manual

Until the factory flow has completed, BIOS screens should display a warning
message about GBB.flags. This message should disappear once the flags field
is zero.

You can see the state of the GBB flags in a particular BIOS image using

  gbb_utility -g --flags BIOS.bin

And set it with

  gbb_utility -s --flags=VALUE BIOS.bin NEWBIOS.bin

Change-Id: I15d336bda571978ece0a9744f19d80f0ae385fb1
Reviewed-on: http://gerrit.chromium.org/gerrit/7719
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2011-09-14 15:22:23 -07:00
Bill Richardson
518d4f39b4 Stub out easter egg, in case BIOS wants to implement one.
BUG=none
TEST=manual

Type 'xyzzy' at dev-mode BIOS screen. What happens next depends on the BIOS.

Change-Id: Ifdb49eb6cb53ecee91f576be91679bd5a232f008
Reviewed-on: http://gerrit.chromium.org/gerrit/7656
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2011-09-14 15:22:15 -07:00
Bill Richardson
c55f0f6c7a Up/Down keys should change locale in BIOS screens.
BUG=chrome-os-partner:5927
TEST=manual

Install BIOS with valid bitmaps, boot to dev-mode or recovery, press arrow
keys.

Change-Id: I3946bac94cc075f9d11b4dd3fcb118807c3318c4
Reviewed-on: http://gerrit.chromium.org/gerrit/7636
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2011-09-13 15:57:53 -07:00
Hung-Te Lin
9137e8df48 sign_official_build: support new firmware updater repacking method
To prevent hard-coding the procedure to repack a firmware updater, this CL
supports using new "--sb_repack" mode supported by updater so that signer does
not need to care about how the updater is packed anymore.

BUG=chromium-os:20027
TEST=./sign_official_build.sh ssd \
     ~/trunk/src/build/images/x86-zgb/latest/chromiumos_image.bin \
     ../../tests/devkeys \
     ~/trunk/src/build/images/x86-zgb/latest/chromiumos_new_image.bin
     # success

Change-Id: I035dfaa86b05b85748e69ec039769b0c08d33f64
Reviewed-on: http://gerrit.chromium.org/gerrit/7311
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-09-09 10:02:08 -07:00
Randall Spangler
e339cbacef Add unit tests for vboot_api_firmware.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I030c204527e1c17b8d6523beec3b7604a638fc98
Reviewed-on: http://gerrit.chromium.org/gerrit/7444
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-09-09 09:02:15 -07:00
Bill Richardson
3235751eac Change debug messages to use 1-based GPT partition numbers.
BUG=none
TEST=none

Change-Id: Ib717f1008edbb6c11d73fbe42d533ebe45800a45
Reviewed-on: http://gerrit.chromium.org/gerrit/7410
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-09-08 10:27:53 -07:00
Bill Richardson
209166af0d Fix bug in recognizing bad image files.
BUG=none
TEST=manual

  make
  make runtests

Change-Id: I8456c25187e01666cc46bad50813e8a4d268f1bc
Reviewed-on: http://gerrit.chromium.org/gerrit/7409
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-09-08 10:27:45 -07:00
Bill Richardson
d2ae48a546 Tweak a bit to clean up alignment and one non-rendering character.
BUG=chromium-os:13037
TEST=none

Change-Id: Ib2a18e44753fd82eb3e2c8aed456abfa4165c235
Reviewed-on: http://gerrit.chromium.org/gerrit/7376
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-09-07 16:51:55 -07:00
Hung-Te Lin
eba60ee20e vboot_reference: update localized bitmaps
There were some locale bitmaps displayed as question marks (like ???) due to
missing font with ImageMagick. Since we use Pango now, this CL updates the
bitmaps from those locales:
 ar el fa hi iw ja ko th vi zh_CN zh_TW

BUG=chromium-os:13037
TEST=for X in ar el fa hi iw ja ko th vi zh_CN zh_TW; do
     display $X; done
     # all pictures looks fine - at least no question marks anymore

Change-Id: I4b4c443d6afb25cf603f3371a47677744ea9358d
Reviewed-on: http://gerrit.chromium.org/gerrit/7326
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-09-07 09:25:54 -07:00
Hung-Te Lin
3852698b0b vboot_reference: add pango based text_to_bmp converter
pango provides TTF fontset rendering, which solves i18n text issue.

BUG=chromium-os:13037
TEST=./text_to_bmp localized_text/ja/*.txt
     display localized_text/ja/*.bmp $ looks fine

Change-Id: Id2731efa131516125ea9bd27016d44cdd4c50974
Reviewed-on: http://gerrit.chromium.org/gerrit/7152
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-09-06 21:15:54 -07:00
Randall Spangler
391b31024d Add unit tests for vboot_api_init.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Idca158e82d1ea102221ea3b51d445fadee9d2794
Reviewed-on: http://gerrit.chromium.org/gerrit/7183
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-09-06 14:05:03 -07:00
Bill Richardson
5de6b40ca7 Display sha1sums in BIOS debug info
BUG=none
TEST=manual

Press 'TAB' at any BIOS screen. You should see some sha1sums.

Change-Id: Id2f034ad198e4c9c53ab2f2a8fa6195f3479f6aa
Reviewed-on: http://gerrit.chromium.org/gerrit/7101
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-09-01 16:38:57 -07:00
Randall Spangler
6c6babc51b Add tests for vboot_firmware.c
Yaay, LoadFirmware() finally has unit tests!

Fix minor memory leak in LoadFirmware().

BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I7eabc14484271f488b77f286e846781ccc22b8f2
(cherry picked from commit 2b7c5635d7069c55a1d96d11b99d02291b7e308b)
Reviewed-on: http://gerrit.chromium.org/gerrit/7052
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-09-01 09:05:04 -07:00
Randall Spangler
9c9606b7a6 Add tests for rsa_utility.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Ia86241f5407ba53d93d3862b29c61b510e560e92
Reviewed-on: http://gerrit.chromium.org/gerrit/6959
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-09-01 09:04:46 -07:00
Bill Richardson
1a4d03dc90 Determine GPIO base from /sys/class/gpio/gpiochip<N>
... instead of using hard-coded 192 constant.

BUG=chromium-os:19876
TEST=manual

If crossystem still reports correct values for devsw_cur recoverysw_cur (and
maybe wpsw_cur, although that's a separate bug), then it works.

Change-Id: Id8d4fb389bfd78f40da9ef08aa372071d77cbec1
Reviewed-on: http://gerrit.chromium.org/gerrit/7014
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-31 12:51:05 -07:00
Hung-Te Lin
fec47595ce gbb_utility: add --flags parameter.
The --flags is added to get/set the "flags" field.

BUG=chrome-os-partner:2317
TEST=gbb_utiltiy --get --flags bios.bin # see flags as 0
     gbb_utility --set --flags=0x3052 bios.bin
     # for version error message for GBB1.0 files,
     # and see flag value changed for GBB1.1+ files
     gbb_utility --get --flags bios.bin
     # flag as 0 for GBB1.0, 0x3052 for GBB1.1+

Change-Id: I7aab62c8fc32ea08b4822e496f543511ff5e5ebc
Reviewed-on: http://gerrit.chromium.org/gerrit/6721
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-08-29 16:22:09 -07:00
Randall Spangler
cce4171545 Add more tests for rsa.c.
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Ib1cdb139b695a648fc500ad61c58efc86c7940a9
(cherry picked from commit 5178f3ce82020e8caa287ceee47f9556c0b3bae8)
Reviewed-on: http://gerrit.chromium.org/gerrit/6860
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-29 15:20:11 -07:00
Randall Spangler
a8c7fab879 Fix makefile typo
BUG=none
TEST=emerge-tegra2_aebl vboot_reference

Change-Id: Idc792a1e8b9636a3959fecfde85110e560a64895
Reviewed-on: http://gerrit.chromium.org/gerrit/6836
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-29 13:11:16 -07:00
Randall Spangler
46d37cfbbb Remaining unit tests for rollback_index.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: If2fbfb788bc3199603c8646e8f1c9e061199bc6f
Reviewed-on: http://gerrit.chromium.org/gerrit/6832
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-29 12:58:38 -07:00
Randall Spangler
cb3313e8cb Partial unit tests for rollback_index
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I8ea6bcc15f277e10c5b8539f2ea19ad90be34889
Reviewed-on: http://gerrit.chromium.org/gerrit/6770
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-26 14:15:26 -07:00
Gaurav Shah
c0911e27b9 Fix image verify with new key-value verity params
BUG=chromium-os:18492
TEST=manually on new and old image.

Change-Id: Ifa7ab70cd2cd3629656d167cd6f4bfaae8f7f03a
Reviewed-on: http://gerrit.chromium.org/gerrit/6589
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-08-25 15:16:00 -07:00
Bill Richardson
a36ee8740e Scale the HWID font to match the rest of the text.
BUG=chromium-os:18631
TEST=manual

Boot to recovery mode screen. HWID should be the same size and shape as the
rest of the text.

Change-Id: Iee0b0611c1319a304d911b710dd7f35ef999a1eb
Reviewed-on: http://gerrit.chromium.org/gerrit/6667
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-25 12:58:15 -07:00
Randall Spangler
aeb8632258 Add unit tests for tpm_bootmode
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I6437e41f55d5b705a3768d325999847c5753a13d
Reviewed-on: http://gerrit.chromium.org/gerrit/6627
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-25 09:04:35 -07:00
Louis Yung-Chieh Lo
9462e3e4c4 dump_fmap: flashrom format should generate [start, end] pair.
Rather than [start, size] pair.

BUG=no bug id
TEST=tested on chroot.

Change-Id: I34ec1f654f88f2e9a27b06f07825ff8bf4d9cd8e
Reviewed-on: http://gerrit.chromium.org/gerrit/6573
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Tested-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
2011-08-24 18:38:46 -07:00
Randall Spangler
68f6049f3f Add missing tests for vboot_common
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I8dd6103eb60c8bc5af2abdd733d8f581984f27b9
Reviewed-on: http://gerrit.chromium.org/gerrit/6615
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-24 15:47:58 -07:00
Randall Spangler
f02bbb4635 Add tests for utility.h and sysincludes.h macros
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Id0a834c2b234d5f9cbbb37a69426e2b97c734d0a
Reviewed-on: http://gerrit.chromium.org/gerrit/6608
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-24 14:38:02 -07:00
Randall Spangler
1f5d53f7bd Add tests for vboot_reference stateful_util.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I5d55be2dfead0c5d7af72841cbd6c65485685cd6
Reviewed-on: http://gerrit.chromium.org/gerrit/6596
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-24 13:50:51 -07:00
Bill Richardson
0a9977e161 bmpblock v1.2 - render HWID inside vboot_reference
The vboot_api.h doesn't require the BIOS display the ASCII HWID in
a graphical form (ARM U-Boot doesn't know how), so we have to do it
ourselves. This change makes that possible.

Summary of changes:
* bmpblk_font.h defines a structure to map ASCII chars to BMPs
* bmpblk_font utility generates that font structure
* bmpblock format is bumped to version 1.2
  - YAML file specifies font to use for $HWID
  - make_default_yaml updated to emit the new format
  - README updated to describe the difference

BUG=chromium-os:18631
TEST=manual

I've tested this on ARM, like so:

Inside the chroot, build a U-Boot that uses it:

  emerge-tegra2_kaen vboot_reference vboot_reference-firmware
  emerge-tegra2_kaen tegra-bct tegra2-public-firmware-fdts \
                     chromeos-u-boot chromeos-bootimage

Outside chroot, but in src/platform/vboot_reference:

  make
  <copy ./build/utility/bmpblk_font and ./build/utility/bmpblk_utility to
    somewhere in your $PATH>
  make clean

  cd scripts/newbitmaps/fonts
  bmpblk_font --outfile ../images/hwid_fonts.bin outdir/*

  cd scripts/newbitmaps/images
  make arm
  cd out_arm
  <edit DEFAULT.yaml>
  bmpblk_utility -z 2 -c DEFAULT.yaml arm_bmpblock.bin

  <use gbb_utility to replace the bitmaps in the U-Boot image, boot it>

The HWID string is displayed.

Change-Id: I782004a0f30c57fa1f3bb246e8c59a02c5e9f561
Reviewed-on: http://gerrit.chromium.org/gerrit/6544
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-24 09:27:12 -07:00
Tom Wai-Hong Tam
efea801390 Don't check the firmware body when USE_RO_NORMAL preamble flag is presented.
Since the firmware supporting RO normal boot doesn't contains any valid RW
firmware body. Skipping the check avoids unnecessary failure.

BUG=chromium-os:19451
TEST=manual

Picked a firmware supporting RO normal boot and extracted its sections. Ran:
$ vbutil_firmware --verify VBLOCK_A --signpubkey \
> /usr/share/vboot/devkeys/root_key.vbpubk --fv RW_SECTION_A
Key block:
  Size:                2232
  Flags:               7 (ignored)
  Data key algorithm:  7 RSA4096 SHA256
  Data key version:    1
  Data key sha1sum:    e2c1c92d7d7aa7dfed5e8375edd30b7ae52b7450
Preamble:
  Size:                  2164
  Header version:        2.1
  Firmware version:      1
  Kernel key algorithm:  7 RSA4096 SHA256
  Kernel key version:    1
  Kernel key sha1sum:    5d2b220899c4403d564092ada3f12d3cc4483223
  Firmware body size:    456411
  Preamble flags:        1
Preamble requests USE_RO_NORMAL; skipping body verification.

Change-Id: I8b81e679016f2946198396c5627415fe979c0a4f
Reviewed-on: http://gerrit.chromium.org/gerrit/6396
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2011-08-23 20:19:12 -07:00
Gaurav Shah
69b88dc99b Add support for new verity key-value style kernel parameters
BUG=chromium-os:18492
TEST=manually tested with both an old verity image, as well as a new one (with
     the pending http://gerrit.chromium.org/gerrit/6085)

Change-Id: I347de9185db1c4ea949d37121c63e08184e8fcfe
Reviewed-on: http://gerrit.chromium.org/gerrit/6516
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-08-23 15:56:25 -07:00
Randall Spangler
a3454fcaa4 Add unit tests for utility.c
Also fixes returned value from Memset().  And SafeMemcmp() should
return 0 (equal) if comparing 0 bytes, to match the behavior of memcmp().

BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Id43e70eecf04815216e1fd952271af35e0a66396
Reviewed-on: http://gerrit.chromium.org/gerrit/6539
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-23 15:30:59 -07:00
Randall Spangler
a2da72b4b0 Disable broken bmpblock_utility test
The current bmpblock_utility doesn't preserve the order of images as
specified in the config yaml file.  This doesn't affect the
functioning of the firmware, but does break this overly-restrictive
test.

Filed crosbug.com/19541 to fix this after Bill's current refactoring.

BUG=chromium-os:19541
TEST=make && make runtests

Change-Id: I03fe817bd191fec5f65aad37561a3224b6a2b1e6
Reviewed-on: http://gerrit.chromium.org/gerrit/6512
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-23 13:58:00 -07:00
Bill Richardson
2e0226309d Cleanup: DEFAULT.yaml should include locale_names section.
bmpblk_utility correctly supports this field, which can be used by the
factory process to map the localization to the correct locale. We forgot to
put the entries in the DEFAULT.yaml file. This change corrects that for
future releases.

BUG=none
TEST=none

Change-Id: Iea65d7439e6ef8cc8730ec1b862abba87041d93f
Reviewed-on: http://gerrit.chromium.org/gerrit/6424
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-22 16:05:01 -07:00
Bill Richardson
822eca680f Put VbDisplay* functions into their own file.
This refactoring will enable us to test and mock them separately from the
rest of the vboot_api functions.

BUG=chromium-os:17564
TEST=manual

Built for ARM, ran "vbexport_test display" at U-Boot prompt. Still works.

Change-Id: I2ddb01d3e981603f371aaa7317184457bdff48ac
Reviewed-on: http://gerrit.chromium.org/gerrit/6422
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-22 14:31:24 -07:00
Bill Richardson
b1c85a8442 Decompress images in vboot wrapper, not in BIOS.
The vboot library needs to decompress the images so that it can handle those
that are special cases (like rendering the HWID). This means that 1) it
needs access to the BIOS' native decompression routine, and 2) that
VbExDisplayImage() only needs to handle the uncompressed native-format image
and doesn't need to know about how the image is packed in the GBB.

BUG=chromium-os:19134
TEST=manual

This requires a change to vboot_api.h, which requires a (simultaneous)
matching change to the BIOS, at least for U-Boot, which builds separately.
I've made that change and run the "vbexport_test display" command from the
modified U-Boot, but that also requires a change to the way U-Boot is built
so that I can get at the U-Boot commandline.

Change-Id: I449fb467cd3a68e742f27ec41b95d52685459d89
Reviewed-on: http://gerrit.chromium.org/gerrit/6129
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-17 13:37:08 -07:00
Che-Liang Chiou
49446d8489 obsolete pack_firmware_image
The firmware image packing is now done by cros_bundle_firmware of
cros-devutils package, and we may retire pack_firmware_image.

BUG=none
TEST=emerge vboot_reference && [ ! -x /usr/bin/pack_firmware_image ]

Change-Id: I177508bf8aada822535fe61258cd1a0df52bfac6
Reviewed-on: http://gerrit.chromium.org/gerrit/5979
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2011-08-15 03:39:43 -07:00
Hung-Te Lin
010630f18c make_dev_firmware: handle developer firmware keyblock correctly
We should detect keyblock from existing firmware and decide if a developer
firmware keyblock should be used.

BUG=chromium-os:18946
TEST=./make_dev_firmware.sh -f zgb.bin -t zgb_dev.bin
      # seeing Using keyblocks (developer, normal)...
      ./make_dev_firmware.sh -f mario.bin -t mario_dev.bin
      # seeing Using keyblocks (normal, normal)...
      ./make_dev_firmware.sh -f arm.bin -t arm_dev.bin
      # seeing Using keyblocks (normal, normal)...

Change-Id: I74fa0db980e26a6a19a4393303e8c5b3260c84c7
Reviewed-on: http://gerrit.chromium.org/gerrit/5623
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-08-10 18:17:29 -07:00
Bill Richardson
7f503e4064 Use BMP format for all master images.
Since both UEFI BIOS and U-Boot display BMP images (although with different
compression schemes), we might as well just use that format for the master
images.

We may still need to crop, scale, or compress these master images to the
platform-specific formats, of course. This change also adds an example
Makefile to produce the scaled images for x86 platforms.

BUG=chromium-os:18631
TEST=none

Change-Id: Idd18d66ea46502065c6f3707f625908a892a0cbd
Reviewed-on: http://gerrit.chromium.org/gerrit/5619
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-08-09 18:25:37 -07:00
Bill Richardson
3106d7ce3e Refactor bitmap directories and master images for ARM work.
This change moves the old bitmaps (Mario, Alex, ZGB) and their supporting
scripts into a subdirectory, and creates a new set of images at 1366x768, in
PNG format.

This is preparation for providing a complete set of localized BIOS screens
to use as the master for all new platforms.

The plan is that these master images will be scaled, cropped, and converted
into the correct formats for each target platform, and those binary
bmpblocks saved in their own package. Only if a translation changes should
we need to regenerate the bmpblocks.

These new images do NOT (yet) include locales that cannot be rendered
correctly by ImageMagick, and not all of them have been fully vetted by the
localization team.

BUG=chromium-os:13037
TEST=none

Change-Id: Ic25832aad3c6cc36879db204c2579395014af311
Reviewed-on: http://gerrit.chromium.org/gerrit/5508
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2011-08-08 21:23:46 -07:00
Hung-Te Lin
c88331f18b resign_firmwarefd: replace mosys by "dump_fmap -p"
Parsing fmap information becomes easier after dump_fmap adds "-p" mode, and
prevents the dependency because dump_fmap is in same repo with signing scripts.

BUG=none, pure refine to reduce dependency and less error messages
TEST=./resign_firmwarefd.sh mario_bios.bin output.bin \
     devkeys/firmware_data_key.vbprivk devkeys/firmware.keyblock \
     devkeys/firmware_data_key.vbprivk devkeys/firmware.keyblock \
     devkeys/kernel_subkey.vbpubk
     # Also verified with modern firmware like ZGB/Alex and ARM.

Change-Id: Ia40ecd9ab641250272952e20ab058e780eb7770b
Reviewed-on: http://gerrit.chromium.org/gerrit/5132
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-08-02 18:25:35 -07:00
Hung-Te Lin
b9cc9550cf resign_firmwarefd: don't change preamble flag by default.
When preamble_flag is not assigned manually, resign_firwmarefd should not change
the preamble flag.

BUG=chromium-os:18207
TEST=# Prepare a bios.bin with preamble_flag=1 (ex, ARM firmware)
     ./resign_firmwarefd.sh bios.bin ..... # do not assign preamble
     vbutil_firmware --verify # see preamble_flag=1
     # Repeat with firmware having preamble_flag=0 (ex, x86 firmware like ZGB/Alex)
     # preamble_flag is 0 after resign_firmwarefd.

Change-Id: I50f88bbf51a28defaf1c4e5383ab856168a128fc
Reviewed-on: http://gerrit.chromium.org/gerrit/5133
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-08-02 12:43:47 -07:00
Roy Hashimoto
8bb2f10999 Revert "Move bitmaps for shipping products into a separate directory."
This reverts commit 97505494b15f65e5e667521fa65b9155db673d46

Change-Id: Icbf0b997711fc44aeeeec8e3bb4b6fa103e6e7e6
Reviewed-on: http://gerrit.chromium.org/gerrit/5156
Tested-by: Roy Hashimoto <rhashimoto@chromium.org>
Reviewed-by: Roy Hashimoto <rhashimoto@chromium.org>
2011-08-02 11:45:24 -07:00
Roy Hashimoto
5d65c0c9e8 Revert "Generate base images at 1366 x 768 using Imagemagick."
This reverts commit a193afd320d36e0d60fefe990d869301d37f6340

Change-Id: I8190f98e2d8a33578eaf365ab5eca58f09cfe5bd
Reviewed-on: http://gerrit.chromium.org/gerrit/5155
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Roy Hashimoto <rhashimoto@chromium.org>
2011-08-02 11:44:13 -07:00
Bill Richardson
8a5fb38cd6 Generate base images at 1366 x 768 using Imagemagick.
BUG=chromium-os:13037
TEST=none

Change-Id: I63fba47d14fca684589c885f1aac4b6228b24bb4
Reviewed-on: http://gerrit.chromium.org/gerrit/4426
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2011-08-02 10:57:50 -07:00
Bill Richardson
d52b3dfde2 Move bitmaps for shipping products into a separate directory.
This is the first step in reorganizing and updating the bitmaps for all
locales.

BUG=chromium-os:13037
TEST=none

Change-Id: I95ad4c20fde7cb5eefeb11ef50b6f0ead886bc3c
Reviewed-on: http://gerrit.chromium.org/gerrit/4424
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-08-02 10:54:49 -07:00
Bill Richardson
77c02433b1 Add a -f option to dump_fmap to emit flashrom's layout format.
BUG=none
TEST=none

Change-Id: Ic4fe7d9962eee9b819b5517ea375ca0855ce6968
Reviewed-on: http://gerrit.chromium.org/gerrit/5019
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
2011-07-29 13:13:35 -07:00
Randall Spangler
8eead8e560 Clean up calling LoadFirmware() from VbSelectFirmware()
BUG=chromium-os:18383
TEST=compiles for both x86 and ARM; boots on my test system

Change-Id: I6c7dc1dd086fb06e4ad8daa053bccdf61a463240
Reviewed-on: http://gerrit.chromium.org/gerrit/4977
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-07-29 13:08:12 -07:00