Commit Graph

169 Commits

Author SHA1 Message Date
Hung-Te Lin
4e4ed8bc96 Generates x86 and arm firmware bitmap blocks.
X86 (coreboot) uses 800x600 resolution while ARM systems (uboot) initialze LCD
as its maximum size, so we must refine the bmpblk build scripts to generate
output with different scaling parameters.

BUG=chrome-os-partner:11078
TEST=make # got ARM bmpblock and verified to work on daisy.

Change-Id: Ib9e9a0dc3b6695cef451772391f207a5b57977df
Reviewed-on: https://gerrit.chromium.org/gerrit/29606
Reviewed-by: Dave Parker <dparker@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2012-08-09 01:56:45 -07:00
Hung-Te Lin
7f06cfd68d Generate localized messages in PNG format.
To support rendering messages in multiple resolution profiles, we need to keep
the images in its original format.

BUG=chrome-os-partner:11078
TEST=./text_to_png # images were converted correctly.

Change-Id: I6e13331eddfa4c40b17b67b5cf56b5a0284e3b34
Reviewed-on: https://gerrit.chromium.org/gerrit/29605
Reviewed-by: Dave Parker <dparker@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-08-09 01:56:45 -07:00
Hung-Te Lin
c11d83513f Add firmware update message for WAIT screen.
Simply copied from assets (boot-messages).

BUG=chrome-os-partner:11078
TEST=none, simply adding text resource files.

Change-Id: Idd81a1471b440e2ef2b7be652e4eb6896e93a2fc
Reviewed-on: https://gerrit.chromium.org/gerrit/29604
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-08-09 01:56:44 -07:00
Dave Parker
5da1061b46 Update bmpblock with new-style minimalist screens.
NOTE: Only the "launch countries" have a full set of updated
text strings...and those strings were translated via
translate.google.com and need fixing-up prior to use in a
real product.

BUG=chrome-os-partner:11078
TEST=install bmpblock_x86.bin into a firmware image with
gbb_utility -s -b bmpblock_x86.bin image.bin
Verify the four firmware screens are displayed correctly.

Original-Change-Id: Ib8ff142e9a938a6a3bf949153594cc013c8bb311
Reviewed-on: https://gerrit.chromium.org/gerrit/28574
Reviewed-by: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
(cherry picked from commit 7c41920b754cb0d18da9a125f76d3f1ef90e04f4)

Change-Id: I534beaea5be95b549a6305d4b2911abeb983e034
Reviewed-on: https://gerrit.chromium.org/gerrit/29603
Reviewed-by: Dave Parker <dparker@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-08-09 01:56:44 -07:00
Dave Parker
3985f94fae Increase max number of bitmaps to composite to 16 per screen.
This is needed to render new-style screens that use 13 bitmaps.
bmpblk version is changed from 1.2 to 2.0, due to incompatibility.

BUG=chrome-os-partner:11078
TEST=emerge-<board> vboot-reference. Run firmware with new bmpblock.

Original-Change-Id: I750da66b020fe195896df58f31fcbb2a9e33e404
Reviewed-on: https://gerrit.chromium.org/gerrit/28945
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
(cherry picked from commit 0b7ee46c2eeba858ff59d534e265b445895623a2)

Change-Id: I80543c46a7c0e09169e29e32077d84c57192e431
Reviewed-on: https://gerrit.chromium.org/gerrit/29602
Reviewed-by: Dave Parker <dparker@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2012-08-09 01:56:44 -07:00
Jim Hebert
61ed188e95 Extend "non-release" check to session manager use-flags.
Since we've moved away from flag-files in session manager to
enable certain dev/test-mode features, our strategy of checking
for those flag files on the signer fell behind. This test adopts
a scheme that any use flag starting with "test_" or "dangerous_"
is blacklisted from release signing.

BUG=chromium-os:32430
TEST=ran the script against both a 'base' and 'test' image
from the builder/ToT. Passes/fails as expected.

Change-Id: I54d6ef17d52371c7543d5705e0939e000db85e51
Reviewed-on: https://gerrit.chromium.org/gerrit/29034
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
Commit-Ready: Jim Hebert <jimhebert@chromium.org>
2012-08-07 14:28:01 -07:00
Bill Richardson
b48cd672a7 Add WAIT screen to default bitmap
Some systems take a long time to program the EC firmware (because it's
behind a really slow I2C bus or something). This could happen at any boot as
part of software sync. If it's necessary to reprogram the EC on a slow
system, we need to display a BIOS screen to the user so he/she doesn't think
it's bricked.

This CL is just to add a new default bitmap so we'll have something to
display when we need it. Nothing actually uses it yet.

BUG=chrome-os-partner:12254
TEST=none

There should be no user-visible changes. We don't invoke this screen yet.

Change-Id: Icb922f933e2e921472dbdff7a26a3ca4d58fbba3
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29241
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2012-08-05 22:08:33 -07:00
Randall Spangler
8dde1491e5 Fix make_dev_ssd.sh --remove_rootfs_verification
It was checking for /dev/dm-0, which isn't the case anymore.  It now
always attempts to remove rootfs verification from the command line;
this is harmless (no-op) if it's already removed.

BUG=chromium-os:31558
TEST=manual

/usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification
reboot
touch /opt/google/chrome/chrome

Change-Id: I62dc138e8d1d09bdcb16be3faab74d32c5f7675a
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28506
Reviewed-by: David James <davidjames@chromium.org>
2012-08-03 12:22:32 -07:00
Hung-Te Lin
af44dce1e8 vboot_reference: Improve make_dev_firmware script.
Developers testing firmware preamble flags (usually for turn on/off RO-NORMAL
bits) need a easy way to change existing firmware, without hacking FDT source /
looking for complex script.

Also included some minor improvements:
 * Always enable FORCE_DEV_BOOT_USB and DISABLE_FW_ROLLBACK_CHECK. These are
   flags most developers need when leaving official signed normal firmware.
 * --bmpfv is deprecated because our latest firmware now always include
   official bitmaps in updater, no more DEV bitmaps.

BUG=none
TEST=./make_dev_firmware.sh -f bios.bin -t new_bios.bin --preamble_flags 0
     ./make_dev_firmware.sh -f bios.bin -t new_bios.bin --preamble_flags 1

Change-Id: I7ee72d32b4b7fa28f2be635fd8c7bb678852e132
Reviewed-on: https://gerrit.chromium.org/gerrit/28792
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-08-01 09:07:06 -07:00
Nirnimesh
c6051ff378 [vboot_reference] Prepare for the removal of /root/.forget_usernames from test images
/root/.forget_usernames is going away from test images. It was a hack.

BUG=chromium-os:31807
TEST=suite:bvt

Change-Id: I27b606fa0232514f3ec45a4ed765b89efcf8f07e
Reviewed-on: https://gerrit.chromium.org/gerrit/27588
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Nirnimesh <nirnimesh@chromium.org>
Commit-Ready: Nirnimesh <nirnimesh@chromium.org>
2012-07-17 16:03:44 -07:00
Hung-Te Lin
61603e2d61 vboot_reference: add "set_gbb_flags" script.
A simple script to help setting GBB flags on-the-fly, with help information for
flag value meanings.

BUG=chrome-os-partner:10389
TEST=./set_gbb_flags.sh 0x20
     ./set_gbb_flags.sh 0x0

Change-Id: Ic624f76c0897a1cbda876f3073b36f7c6425b5d4
Reviewed-on: https://gerrit.chromium.org/gerrit/26224
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-06-27 18:44:28 -07:00
Gaurav Shah
79461cbc03 security test: Add test that verifies that update verification is enabled
BUG=chromium-os:31893
TEST=verified on images with/without payload verification enabled.

Change-Id: Ic1883aafcc2c48d9e7c5323d6dc7e21fb8f47585
Reviewed-on: https://gerrit.chromium.org/gerrit/25407
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2012-06-18 15:21:42 -07:00
Bill Richardson
1d75e69f3d Check in sources for the default, unofficial BIOS screens
The original sources have been lost. These were obtained by unpacking the
binary.

BUG=none
TEST=none

Change-Id: I8042a3abf586551bc2a855d3fd9d7d6ae1aae2d9
Reviewed-on: https://gerrit.chromium.org/gerrit/24710
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-06-07 14:00:14 -07:00
Gaurav Shah
9c783ce3c1 Signing scripts: Add firmware signing to sign_official_build.sh
This makes it easy to integrate firmware signing into the signer
since we can reuse the base signing script.

BUG=chromium-os:10094
TEST=try signing both firmware and normal images.

Change-Id: I8beb598e267de33a2c3468dcf8d7c4b74d4de9fd
Reviewed-on: https://gerrit.chromium.org/gerrit/24654
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2012-06-07 12:39:38 -07:00
Don Garrett
bb5c49b343 Modify align_rootfs to use --src_image only.
Align_rootfs was written to auto-fetch the previous release of a given
image, but that logic has bit-rotted. This CL is a quick hack to use
--src_image instead.

BUG=chromium-os:31124
TEST=Hand ran.

Change-Id: I530c6f82c42993648cecb5d59172010d61dd1603
Reviewed-on: https://gerrit.chromium.org/gerrit/23168
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
2012-06-04 15:55:36 -07:00
Bill Richardson
2448d3b3bc Create vbutil_ec tool for signing EC firmware.
This just adds the vbutil_ec tool (and a simple test of the library
functions related to it).

BUG=chrome-os-partner:7459, chromium-os:27142
TEST=manual

  make
  make runtests

Change-Id: I2a2c4e7cfb8ac6ce2229c5de4252a5cc89321fa5
Reviewed-on: https://gerrit.chromium.org/gerrit/21868
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2012-05-04 12:16:45 -07:00
Mike Frysinger
81f704edad signer scripts: retry more than once when mounting
The retry logic has brought down the number of flakes significantly (from
multiple errors a day to ~one every other day).  But let's up the retry
count, and have it sleep longer after each failure, so hopefully we can
bring down the flake count even further.

BUG=chrome-os-partner:8156
TEST=`./signing_poller.py -s` signs local images fine

Change-Id: I98bc947836514d8b931568f87f7f9a373f771b79
Reviewed-on: https://gerrit.chromium.org/gerrit/21468
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-05-01 12:37:57 -07:00
Mike Frysinger
aca0a135ac signer scripts: workaround flaky kernels and loop mount failures
The kernels we are running the signers on flake out from time to time
when mounting the loop back images.  Have the mount code detect this
edge case and automatically retry when the flake hits.

BUG=chrome-os-partner:8156
TEST=`./signing_poller.py -s` signs local images fine

Change-Id: Iaa08445904aa26f0aa7240504f6c7a96e6ef3bbb
Reviewed-on: https://gerrit.chromium.org/gerrit/21055
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-04-25 12:50:12 -07:00
Gaurav Shah
cd10a96926 Create default key.versions file if none exist
Also remove the default checked in key.versions.

BUG=none
TEST='rm key.versions && ./create_new_keys.sh; ./create_new_keys.sh'

Change-Id: Ia46d411904cb67bcefdbf73524f506e5b2336875
Reviewed-on: https://gerrit.chromium.org/gerrit/20253
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2012-04-16 14:57:56 -07:00
Mike Frysinger
caddf52936 signer scripts: use make_temp_dir helper
The common code takes care of cleaning up temporary files for us if we
use the right helpers.  These scripts don't though, so the temp files
end up not getting cleaned and over time, /tmp/ files up with crap.

The common helper takes care of unmounting and removing, so converting
these files over should be safe.

BUG=None
TEST=`./signer/signer_poller.py -s` signs local images and leaves no /tmp/tmp.* junk

Change-Id: I87aa122895997a5ec0017665203fdc8d14e0ab2a
Reviewed-on: https://gerrit.chromium.org/gerrit/20329
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-04-16 14:00:21 -07:00
Mike Frysinger
db1d5b20f8 signer scripts: use sudo if need be when modifying /etc/lsb-release
If we try to run the signing_poller daemon as non-root, it fails to set
the channel.  Detect if the lsb file is writable, and if not, switch to
using sudo on the fly.

BUG=None
TEST=`./signer/signing_poller.py` as non-root and setting the channel works

Change-Id: Iadb10ae68582edfb332f33d3b101c83949ee9502
Reviewed-on: https://gerrit.chromium.org/gerrit/20089
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-04-12 16:06:58 -07:00
Mike Frysinger
7437af134e signer scripts: add OWNERS
BUG=chromium-os:22007
TEST=`cat scripts/OWNERS` show signing people

Change-Id: I0e7e50d4ee6bd97ab651c851057d7ed1ee069155
Reviewed-on: https://gerrit.chromium.org/gerrit/20018
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-04-11 15:44:10 -07:00
Gaurav Shah
d170a9d542 signer scripts: unmount loop devices without -d arg to umount
Investigations in crosbug.com/26483 revealed a bug in loop device handling
if 'umount -d' was called on loop devices mounted using 'mount -o loop'.

This CL changes all invocations of umount to remove the -d option since they
are always in the context of a loop device creating using -o loop.

BUG=chrome-os-partner:8156
TEST=none

Change-Id: I96f30664c3f9148d3b57d430002512d8e94b66bc
Reviewed-on: https://gerrit.chromium.org/gerrit/19858
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2012-04-09 17:28:23 -07:00
Gaurav Shah
075fd17655 signer security test: special case dogfood channel for app id check
Similar to the canary channel, the dogfood channel images can have their
own app id that is distinct from the board app id.

BUG=chromium-os:25702, chrome-os-partner:8441
TEST=on a dogfood-channel image

Change-Id: Ic993a40d905b224072d325a69e47fdb6633c2e22
Reviewed-on: https://gerrit.chromium.org/gerrit/18039
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
2012-03-13 15:43:57 -07:00
Gaurav Shah
f5b5b4ce5f signer tests: Allow different appids for canary channel images
If the channel is canary, allow appid to match the value of
expected_appid_canary in the ensure sane lsb release test
configuration.

BUG=chromium-os:25437
TEST=manually tested on an image with and without the channel being canary.

Change-Id: I6bf71adbe0fc090ef777c28d24c53eaa8be18404
Reviewed-on: https://gerrit.chromium.org/gerrit/15509
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
2012-02-08 12:09:18 -08:00
Bill Richardson
b5cf3f30cc remove.txt no longer mentions USB and SD cards explicitly
BUG=chrome-os-partner:6953
TEST=none

Just changing the source, so nothing to test here.

Change-Id: Ic09c45d49ea9e5acd4b57e281de73a4ca0a3af81
Reviewed-on: https://gerrit.chromium.org/gerrit/14915
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
2012-01-26 16:43:06 -08:00
Gaurav Shah
e5d31dce37 signer: run kernel security test of kernel partition 4 instead of partition 2
The test is run on a recovery image by the signer. We care more about the
parameters on the kernel partition 4 (the SSD install kernel) than 2.

It'd be nice to have security test on the recovery kernel too and I have
marked that as a TODO for now.

BUG=chromium-os:24077
TEST=tested on a R17 and R18 mario, alex and zgb image.

Change-Id: Ia27ceaefb24dff64115f08b1cc6bbb75d1900071
Reviewed-on: https://gerrit.chromium.org/gerrit/12970
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-12-15 11:35:50 -08:00
Gaurav Shah
ce66492505 signing script: Check for errors on extracted dm params in kernel command line.
Correctly handle the lack of valid dm config parameters in the kernel
command line (dm="..."). In particular, skip trying to perform a rootfs
hash update for that kernel partition.

This change has the side effect of properly signing new recovery images
with the in-flight changes recovery install changes being done as part of
crosbug.com/22530.

Also fix verification of recovery images to consider both kernel partitions
for determing the hash to compare the calculated value against.

Finally, remove dd's verbose output while signing the firmware.

BUG=chromium-os:22530
TEST=manually re-signed new (Alex) and old (Lumpy) recovery image. Verified
     that recovery install works.

Change-Id: Ied9f82f2e77ed581875cec0b43ce45fd98186db2
Reviewed-on: https://gerrit.chromium.org/gerrit/12588
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
2011-12-13 12:38:13 -08:00
Gaurav Shah
59c4b30d00 sign_official_build: Do not ignore the firmware version while re-signing firmware
Change https://gerrit.chromium.org/gerrit/12471 introduced a regression where by
we always sign a firmware with version 1.

This change fixes that bug.

BUG=chromium-os:23817
TEST=ran sign_official_build and made sure the firmware was signed with the
     right firmware version.

Change-Id: I6c8d3e8b103f3f7329b7a4db5a78a8f1ce4415a2
Reviewed-on: https://gerrit.chromium.org/gerrit/12496
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2011-12-06 15:59:07 -08:00
Gaurav Shah
42d23c664d sign_official_build: Use sign_firmware.sh for in-place firmware signing.
We recently fixed a bug in the sign_firmware.sh script to perform
root key replacement after signing FWA and FWB to allow
resign_firmwarefd.sh to correctly determine the preamble flag to use.

As it turns out, the sign_official_build.sh script used by the signer
for in-place firmware re-signing was using a different code path (by
directly calling resign_firmwarefd.sh).

This change makes sign_official_build script call sign_firmware.sh instead.

BUG=chrome-os-partner:6874
TEST=tried signing a vanilla lumpy image with and without the fix, and
     observed the value of preamble flag used.

Change-Id: Icffb1d86fbe44f69e444da51fe251ad3427635c6
Reviewed-on: https://gerrit.chromium.org/gerrit/12471
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-12-05 16:02:16 -08:00
Hung-Te Lin
505a047c85 vboot_reference: sanity check firmware A/B content when resigning
If the FW_A and FW_B contents are the same, we should not resign with
DEV/NORM keyblocks.

BUG=chrome-os-partner:6942
TEST=(to sign) ./resign_firmwarefd.sh bios.bin new.bin \
	       ../../tests/devkeys/firmware_data_key.vbprivk
	       ../../tests/devkeys/firmware.keyblock \
	       ../../tests/devkeys/dev_firmware_data_key.vbprivk \
	       ../../tests/devkeys/dev_firmware.keyblock \
	       ../../tests/devkeys/kernel_subkey.vbpubk
     (to verify) dump_fmap -x new.bin
                 vbutil_keyblock --unpack VBLOCK_A | grep Flags
                 vbutil_keyblock --unpack VBLOCK_B | grep Flags
     When the input (bios.bin) have DEV FW (ex, zgb/alex), then output
     is A=6, B=7; when the input is old or new firmware without DEV
     (ex, mario/s*y/l*y), output is A=7, B=7, and you'lll see
     "Found firmware with same A/B content - ignore DEV keyblock."
     meessage during resign process.

Change-Id: I10cbbf7370f35a40673b328b70c83e7d1213a45d
Reviewed-on: https://gerrit.chromium.org/gerrit/12371
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-12-05 06:42:36 -08:00
Gaurav Shah
a24e30cdc2 Make dev firmware keyblock/data key generation and use optional
For key generation, only generate dev firmware keyblocks, if the
--devkeyblock option is passed. For signing, re-use normal firmware
keyblock and data key if no dev keyblocks or data key are found in
the keyset directory.

BUG=chrome-os-partner:6942
TEST=manual
     - tested key generation with/without the new flag
     - tested signing with or without the presence of dev keyblock

Change-Id: Ic4bf72cb194461e07fcc0f6de39d4e16d1c979a6
Reviewed-on: https://gerrit.chromium.org/gerrit/12038
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
2011-11-22 20:22:07 -08:00
Gaurav Shah
4c1f3c8e54 Replace root and recovery keys in the GBB after firmware sections have been re-signed
resign_firmwarefd.sh needs a verifiable copy of the firmware (and associated root key)
to determine the preamble flag value to use.

BUG=chrome-os-partner:6874
TEST=manually tested resigning a firmware .bin using sign_firmware.sh. Verified correct
     preamble flag determination.

Change-Id: Ifb132f54f4891dec4fa7250d3a00e7b4feda24c1
Reviewed-on: https://gerrit.chromium.org/gerrit/11776
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-11-16 10:50:56 -08:00
Bill Richardson
f1282d321f Use the correct fonts for BIOS screens.
We should have been using Droid Sans, not Helvetica, and some of the
non-Roman locales need special handling to render clearly and correctly. We
also get better results if we avoid scaling after rendering the text.

Added scripts/newbitmaps/Makefile to regenerate it all, updated the READMEs.
Since Hung-Te figured out how to use pango-view to render the UTF-8
reliably, we don't need to keep all the pre-rendered locale images anymore
either.

This provides the x86 bmpblock for Stumpy PVT. We may need some more
tweaking for Lumpy and/or ARM.

BUG=chrome-os-partner:6595
TEST=manual

Put the new screens into the bios:

  gbb_utility -s --flags=0 -b bmpblock_x86.bin OLDBIOS NEWBIOS
  flashrom -w NEWBIOS

Then reboot and look at the BIOS screens. The lettering is much clearer.

Change-Id: Icb07bc6d131920730f41348c7de9151e42cc9518
Reviewed-on: https://gerrit.chromium.org/gerrit/11007
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-11-02 18:18:18 -07:00
Bill Richardson
a6d6702c6e Despeckle background images, improve x86 generation.
BUG=chrome-os-partner:6595
TEST=manual

User our new officially finally final localizations for Stumpy.
Start by removing some of the subtle speckles from the background images so
they'll compress a little better, then modify the Makefile to autogenerate
the bitmap blob (for x86, anyway).

Note: the size improvment isn't much, but every little bit helps. With all
43 locales, bmpblock.bin was 659798 bytes. Now it's 665142 (5344 bytes saved).

And, no, we can't fit all 43 locales in our current BIOS. Yet.

Change-Id: I78cf8215f3da41a7ebc0e354cd1964c427a8c651
Reviewed-on: https://gerrit.chromium.org/gerrit/10879
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-11-02 08:48:35 -07:00
Sonny Rao
82054d9577 Change load_shflags to use the new location of shflags for clients
BUG=chromium-os:21742
TEST=manual, ensure vboot scripts continue to work
like make_dev_ssd.sh on the client

Change-Id: I405334bab734f35a1a81e4b9e90e93cb760cc3d2
Reviewed-on: https://gerrit.chromium.org/gerrit/10479
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
2011-10-27 23:39:53 -07:00
Jim Hebert
7f253ebc03 Add test script that can determine if a build contains ASAN-binaries.
BUG=chromium-os:21863
TEST=ensure_not_ASAN.sh image.bin

Change-Id: I414f941a787e0023257401bb8ed7b4a5257f026a
Reviewed-on: http://gerrit.chromium.org/gerrit/10352
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
2011-10-19 16:04:11 -07:00
Bill Richardson
7b32cad272 Finally final results from l10n team.
* Updated the text strings using the latest results from the localization
  experts.

* Strip the leading byte-order-mark and trailing whitespace from the text
  files, since it's not used for anything and sometimes renders as a box.

* Added options to the text_to_bmp script to handle right-to-left languages
  and to override the font.

* Added scripts/newbitmaps/strings/localized_text/Makefile to regenerate all
  the bitmaps from the text strings. This handles right-to-left languages
  correctly.

* Modified make_default_yaml so that the th/model.txt string is moved up a
  bit to align it properly with the HWID.

* Regenerated DEFAULT.yaml using the new bitmaps.

BUG=chromium-os:13037
TEST=none

Change-Id: I095830a46ba831742d437867a9caac88c8e28de1
Reviewed-on: http://gerrit.chromium.org/gerrit/8834
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-10-07 09:08:51 -07:00
Hung-Te Lin
bd3dad01b0 sign_official_build: allow repacking firmware when executed by sudo
To prevent execution permissions lost after being copied to /tmp, force adding
a+rx to the staging file.

BUG=chromium-os:20797
TEST=sudo sign_official_build.sh ssd \
     x86-zgb-0.16.1089.0.bin ../../tests/devkeys ssd_image.bin

Change-Id: Ibee12dbb3faea9f6b05600d1343620e0af8633fb
Reviewed-on: http://gerrit.chromium.org/gerrit/8263
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
2011-09-26 16:47:46 -07:00
Gaurav Shah
132e6e0c8c sign_official_build: Work around different verity arguments across images
Work around the fact that we have 3 different verity kernel arguments depending
on the image being signed (legacy parameters, new key=value parameters, new key=
value parameters with salt).

Since the signer is not branch conscious, expect and use the old verity binary to
be present when legacy kernel arguments are specified. The last 2 types of verity
arguments can be distinguished based on whether a salt is present.

BUG=chromium-os:20640
TEST=manually tested by signing r14, r15 and r16 images and verifying
     that kernel parameters are set correctly.

Change-Id: I96ecf6f506a94509a64ef12d7a108e977f94c23c
Reviewed-on: http://gerrit.chromium.org/gerrit/8214
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: David McMahon <djmm@chromium.org>
Tested-by: David McMahon <djmm@chromium.org>
2011-09-23 12:50:45 -07:00
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
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
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
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
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
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
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