Commit Graph

228 Commits

Author SHA1 Message Date
Hung-Te Lin
798cc91de1 Change flashrom target selection parameter.
The "-p internal:bus=*" is now deprecated by "-p {host,ec}" because we may have
EC on SPI bus.

BUG=none
TEST=manually executed dev_debug_vboot and see correct output.
BRANCH=none

Change-Id: I6363c09c2ebf57812bf35b7db220303a2786db20
Reviewed-on: https://gerrit.chromium.org/gerrit/66321
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
2013-08-21 19:19:43 -07:00
Don Garrett
7a3a467667 Add a script to remove /boot and its contents from an image.
This is a helper script intended for the signing servers to use to strip
out the /boot directory from images just before signing.

BUG=chromium:210352
TEST=Manually used to strip and image and validated the results.
BRANCH=None

Change-Id: I814522284143d8f90651e13000d428718aeca1e4
Reviewed-on: https://gerrit.chromium.org/gerrit/60828
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
2013-08-05 19:16:24 -07:00
Paul Taysom
f5c62bd7dc Fixed sign_official_build.sh to work with PARTUUID
Fixed sign_official_build.sh to work with PARTUUID in the linux format,
PARTUUID=%U/PARTNROFF=1. Had to handle the '/'.

Also fixed a misspelled variable name, devcie -> device. It worked
before because a NULL string generated the right results in the
current configuration.

BUG=chromium:224066
TEST=~/trunk/src/platform/vboot_reference/scripts/image_signing/sign_official_build.sh recovery /home/taysom/trunk/src/build/images/$B/latest/recovery_image.bin /home/taysom/trunk/src/platform/vboot_reference/tests/devkeys /tmp/taysom.bin
BRANCH=none

Change-Id: Id201885a63c6eba4cdb7c9216c0d3d35e6d3f0c4
Reviewed-on: https://gerrit.chromium.org/gerrit/61889
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
2013-07-24 12:09:45 -07:00
Randall Spangler
f2a1dc0a54 Add GBB flags for disabling software sync and defaulting to legacy boot
1) GBB flag to skip EC software sync, so EC will be untouched.  Needed
for EC development.

2) GBB flag to default to booting legacy at end of dev screen timeout.
Very handy for booting Ubuntu (or other OS).

Also added unit tests for the new flags.

BUG=chrome-os-partner:20111
BRANCH=none
TEST=make runtests

Change-Id: I9da87d87014881a1b1393b0b4a5acb921d080066
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58270
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-06-12 09:22:32 -07:00
Paul Taysom
01bc003cff Changed to use sed for regex pattern matching
The code was using a mixture of shell patterns and
sed regular expression. Changed code to just used
sed regex. This will let me use more complex regex
that are needed for adding PARTUUID to uuids.

BUG=chromium:241572
TEST=./security_test_image
BRANCH=none

Change-Id: I2e8570051b31d580ae36cb82f05383a33236b88e
Reviewed-on: https://gerrit.chromium.org/gerrit/51503
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2013-05-21 14:00:46 -07:00
Paul Taysom
ed92adaddf Added support for PARTUUID=
The Linux kernel expects partitions that are identified by uuid,
to have the the uuid prefixed by "PARTUUID=" and an optional suffix
of "PARTRNOFF=%d".

The change adds additional pattern matching for these strings.

This will also let get rid of custom uuid processing in dm-verity,
dm-bootcache and dm-verity-chromeos.

BUG=chromium:224066
TEST=security_test_image with old and new command line
BRANCH=none

Change-Id: I71b89dd1df8d7ccd5768c2784078bb869d546bf3
Reviewed-on: https://gerrit.chromium.org/gerrit/51303
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2013-05-16 12:16:30 -07:00
Bill Richardson
9a8e79cc26 Remove +x permissions from source files.
There's no need to give execute permissions to files that aren't supposed to
executed.

BUG=none
BRANCH=none
TEST=manual

make runtests

Change-Id: I2480b97b39124e98c2f639d56be54cadfdc17f9b
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42648
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-02-05 14:36:53 -08:00
Mike Frysinger
5ede8c9698 set_lsb_release: enable batch modification
When setting a field, this script mounts the image, unmounts, mounts
it, then writes the field, then unmounts it.  When setting 4 or 5
keys at once, this is quite a waste.

Tweak it so we only mount it once, and we can set multiple keys in
a single call by looping over the input args.

BUG=None
TEST=`./signing_unittests.py` passes
BRANCH=None

Change-Id: Id7dc4e8ef58113cc4632721851fcab04ef1e69eb
Reviewed-on: https://gerrit.chromium.org/gerrit/42601
Reviewed-by: Ryan Cui <rcui@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-02-05 12:32:33 -08:00
Paul Taysom
c8c8dfd909 Fixed error in verify
Fixed the error when running "sign_official_build.sh verify"
that was introduced by https://gerrit.chromium.org/gerrit/#/c/40052/

BUG=chromium-os:38229
TEST=sign_official_buils.sh verify on parrot recovery image
BRANCH=none

Change-Id: Ice1933347811c006005f622d178869df12344998
Reviewed-on: https://gerrit.chromium.org/gerrit/42231
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
2013-01-29 14:10:31 -08:00
Paul Taysom
96d16de52e Fixed the cmdline modification for bootcache
Changed the manipulation of the device mapper arguments in the
command line to handle bootcache. Had to maintain backwards
compatibility with older versions because the signer is used
with older images.

BUG=chromium-os:37114, 37061
TEST=On a parrot with dev signed keys, signed and installed an R-23 image (2913),
a image with bootcache disabled  and an image with bootcache enabled.
BRANCH=none

Change-Id: I59c46ccc3ff8b89ae9c4515f020ea9fbe6d96c7c
Reviewed-on: https://gerrit.chromium.org/gerrit/40052
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2013-01-18 14:50:45 -08:00
Mike Frysinger
b55c538fca sign_official_build: add a dump_config helper and clean up argument processing
For debugging purposes, we like to see the kernel command line that a
particular kernel is using.  We have all the tools to do this already,
but not easy to leverage (you have to manually extract/etc...).  So
add a "dump_config" helper to help people out.

Further, the existing argc processing is incomplete and not terribly
friendly.  Add some useful error messages explaining why we quit.

BUG=None
TEST=`./sign_official_build.sh dump_config <bin>` works
TEST=`./sign_official_build.sh verify <bin>` works
TEST=`./sign_official_build.sh` shows usage
TEST=`./sign_official_build.sh recovery <bin>` shows usage
TEST=`./sign_official_build.sh recovery <bin> / /tmp/foo` tries to sign
BRANCH=None

Change-Id: I9f94250b8c299783bdcba704733974c6a5491101
Reviewed-on: https://gerrit.chromium.org/gerrit/39603
Reviewed-by: Paul Taysom <taysom@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-12-12 14:57:17 -08:00
Paul Taysom
8a42c2718f remove verity regardless of dm device
Changed the pattern substitution to work with dm-[0-9]

BUG=chromium-os:25441
TEST=Turned off verity on stumpy both with and without bootcache
BRANCH=none

Change-Id: I519ad71879f2db847f450b869c8f7a67606f1e20
Reviewed-on: https://gerrit.chromium.org/gerrit/38691
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
2012-11-27 10:02:43 -08:00
Paul Taysom
0bbc17c69a Added handling of regex for dm params
To handle a more diverse set of configurations, added
processing of regular expressions for the dm params.

BUG=chromium-os:36441
TEST=rand security_test_image for various configurations
BRANCH=none

Change-Id: I4d9e610586cc9f63d55397e60462600ed9b9651f
Reviewed-on: https://gerrit.chromium.org/gerrit/38202
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2012-11-19 16:14:31 -08:00
Hung-Te Lin
7682e5e87a newbitmaps: Move files to new location (bmpblk).
BUG=none
TEST=none
BRANCH=none

Change-Id: I4a5ecedd4dd8e2ef866793edd825f4d5716402bf
Reviewed-on: https://gerrit.chromium.org/gerrit/38097
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-11-16 23:47:46 -08:00
Hung-Te Lin
5eaf916f52 newbitmaps: Increase font size & fix JP font.
Using PT=18 provides better screen on scaled screens.
IPAPGothic does not look good after being scaled, so let's use Droid Sans
Fallback again.

BRANCH=none
BUG=none
TEST=make # pass

Change-Id: I59f3768a14055d8f135e15b85107406d5a2d4924
Reviewed-on: https://gerrit.chromium.org/gerrit/38016
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-11-14 17:59:05 -08:00
Hung-Te Lin
8e32e75f4f newbitmaps: Get rid of ImageMagick and use PIL for image processing.
To simplify dependency (and prepare for building inside chroot), we need to get
rid of dependency for ImageMagick, which is now entirely replaceable by Python
Image Library.

BRANCH=none
BUG=none
TEST=make # pass

Change-Id: Ie3d3a4ac399b2fe58aa75f8e02e4475bcba21c51
Reviewed-on: https://gerrit.chromium.org/gerrit/37985
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-11-14 17:59:04 -08:00
Marc Jones
9754cae1c1 Add FAFT keyboard remap GBB flag
Add a new flag, 0x100, to indicate FAFT key stroke overrides.

BUG=chrome-os-partner:14056
TEST=none
BRANCH=stout

Change-Id: I76b7f3f4c51abec5528047f690f20a09b257abc2
Signed-off-by: Marc Jones <marc.jones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37074
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-by: Gediminas Ramanauskas <gedis@chromium.org>
Tested-by: Gediminas Ramanauskas <gedis@chromium.org>
Commit-Ready: Marc Jones <marc.jones@se-eng.com>
2012-11-06 11:40:28 -08:00
Hung-Te Lin
3f9857420f newbitmaps: Speed up image conversion by using PIL.
Running ImageMagick + PIL is a redundant task; we should let PIL
do flatten, resize, and exporting to different format.

Before: real 11m54s, user 37m10s.
After: real 8m3s, user 16m33s.

BRANCH=none
BUG=none
TEST=make

Change-Id: I65f1e5b769161650310abca46851824755402d9b
Reviewed-on: https://gerrit.chromium.org/gerrit/37200
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-11-05 16:52:50 -08:00
Hung-Te Lin
7909cb8293 newbitmaps: Speed up make_default_yaml.
Sub-shell execution is slow. To improve shell script execution speed:
 - Replae $(expr) by $(()).
 - Cache image file data and avoid executing ImageMagick.
 - Prevent extra eval & subshell.
 - Remove bash-only syntax to allow using dash.

 # time ../make_default_yaml en
 Before change: Real 9s, User 1m7s.
 After (bash): Real 1.6s, User 8.8s.
 After (dash): Real 1.0s, User 6.9s.

BRANCH=none
BUG=none
TEST=make

Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Reviewed-on: https://gerrit.chromium.org/gerrit/37006
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-11-05 16:20:11 -08:00
Hung-Te Lin
68a516a43c newbitmaps: Remove language navigation bar in TONORM_CONFIRM.
BRANCH=none
BUG=chrome-os-partner:15823
TEST=make # pass

Change-Id: Ibb998e71059146067403872386bf17659a50c0f3
Reviewed-on: https://gerrit.chromium.org/gerrit/37098
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-11-05 16:20:09 -08:00
Hung-Te Lin
97625b69be newbitmaps: Add "USB2 only, no SD" profile.
Change *usb2 to "USB2 only, no SD" and add "*sdusb2" as "USB2 only, with SD".

Also fixed PIL conversion error on Ubuntu Precise edition.

BRANCH=none
BUG=chrome-os-partner:15738
TEST=make # pass

Change-Id: I9bc22b7f82bc6e58e6069ae6dd4951e882edb19c
Reviewed-on: https://gerrit.chromium.org/gerrit/36997
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-10-31 18:42:04 -07:00
Hung-Te Lin
ca8c372e60 sign_official_build: Support signing additional RW firmware in shellball.
There will be more bios*.bin (ex, bios_rw.bin) in firmware updater, and we do
want to sign all files.

BRANCH=signer
BUG=chromium-os:35369
TEST=sign_official_build.sh ssd DEV_IMAGE ../../tests/devkeys

Change-Id: I2ea0c5c3d7a18c43df581f50b4bd907206dcd7ad
Reviewed-on: https://gerrit.chromium.org/gerrit/36890
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-10-30 15:33:29 -07:00
Mike Frysinger
8b42ac8e26 Key increment scripts: fix incrementing keys not in $PWD
Part of the recent rewrite dropped changing of the active dir to
${KEY_DIR}.  Meant the scripts needed to be run inside of the key
dir since not all functions take the key dir as an argument but
instead assume they're in ${PWD}.

BUG=None
TEST=Ran increment_kernel_subkey_and_key_mp.sh and saw it work
BRANCH=None

Change-Id: Icbc02f123e999d186d9c40fd16528a134397699e
Reviewed-on: https://gerrit.chromium.org/gerrit/35803
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-10-16 23:25:29 -07:00
Gaurav Shah
9bf0d535fe resign_firmwarefd.sh: Fix flag option name
We didn't get bit by this bug because getlong_opt does partial matching
on long option names. So --flag also works.

BUG=none
TEST=resign a test firmware; ensure preamble flag is preserved.
BRANCH=none

Change-Id: Ifd87c627b82468529fe1241be3629198d194027b
Reviewed-on: https://gerrit.chromium.org/gerrit/35350
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2012-10-12 11:12:54 -07:00
Paul Taysom
212eb98136 Added patterns for bootcache
The bootcache will be changing the linux command line. Added additional
patterns that are acceptable to the signing software.

BUG=chromium-os:25441
TEST=ran security_test_image script against stumpy recovery images
BRANCH=none

Change-Id: I22d00ebc6191b5499f722974d90c260b78eb63b2
Reviewed-on: https://gerrit.chromium.org/gerrit/34959
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2012-10-09 13:45:13 -07:00
Mike Frysinger
4615b96345 signer scripts: return an error when loading configs fail
If we are given a config file that doesn't exist, return an error rather
ignoring it.  This way we don't accidentally give images a pass when we
didn't properly test them.

BUG=None
TEST=`./security_test_image --board=x86-alex --baselines=/` now shows 3 failures rather than all pass
BRANCH=None

Change-Id: I9d130db05befaeac8fcca921f0e43f47c2461f9f
Reviewed-on: https://gerrit.chromium.org/gerrit/34795
Reviewed-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-10-05 15:21:10 -07:00
Mike Frysinger
283cbf89a9 sign_official_build.sh: add an update payload operation
This enables the signer script to sign update payloads.

BUG=chromium-os:34521
TEST=`./sign_official_build.sh update_payload testcase.sha256 . foo` produced a signed foo file
BRANCH=None

Change-Id: I27a9de89e760427251538deec38161944388a152
Reviewed-on: https://gerrit.chromium.org/gerrit/33535
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-09-26 16:12:48 -07:00
Stefan Reinauer
a2326ee152 Add CTRL-L in dev screen to support a "legacy boot option"
This option is disabled per default and can be enabled with
crossystem dev_boot_legacy=1
or by setting the GBB flag
GBB_FLAG_FORCE_DEV_BOOT_LEGACY      0x00000080

BUG=chrome-os-partner:6108
TEST=crossystem dev_boot_legacy=1
     boot to dev mode screen, press CTRL-L, see SeaBIOS start
     (other CLs needed)
BRANCH=link
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>

Change-Id: I593d2be7cff5ca07b8d08012c4514a172bd75a38
Reviewed-on: https://gerrit.chromium.org/gerrit/31265
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
2012-09-20 17:32:22 -07:00
Kris Rambish
40bc7b7802 Do not create the kernel data keys.
BUG=None
TEST=Ran it
BRANCH=None

Change-Id: Ib494c64d81c4ee80991a01b2172c7c47b60d5658
Reviewed-on: https://gerrit.chromium.org/gerrit/33659
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2012-09-19 18:45:21 -07:00
Kris Rambish
40d8651bb3 Add scripts to increment single fm/kernel keys.
For firmware and kernel key increment testing we need to be able to
rev only particular keys and verify an autoupdate works.

BUG=None
TEST=Ran it
BRANCH=None

Change-Id: Ic814480b4bf8fbc994132fcd7ba519c3be9b0ccd
Reviewed-on: https://gerrit.chromium.org/gerrit/32458
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
2012-09-18 16:05:00 -07:00
Tom Wai-Hong Tam
46c01a2d2b scripts: Add the new GBB_FLAG_ENTER_TRIGGERS_TONORM usage
This GBB_FLAG_ENTER_TRIGGERS_TONORM is new added for allowing Enter
(default is Space) to trigger the TONORM screen. This flag is
used by FAFT testing.

Chage the usage of set_gbb_flags.sh to help an user.

BUG=chrome-os-partner:12699
TEST=None. Trivial comment change.

Change-Id: I8a1efa880627965570719f22dedfa0e31ab2d5f5
Reviewed-on: https://gerrit.chromium.org/gerrit/33404
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-09-17 07:47:03 -07:00
Hung-Te Lin
35f5474788 newbitmaps: Remove language in UPDATE screen.
Currently we don't accept keyboard input in UPDATE screen.

BRANCH=none
BUG=chrome-os-partner:13821
TEST=make # no more languages on UPDATE screen.

Change-Id: I08fa6dab7415e9a461ca8096073e98a155a8489e
Reviewed-on: https://gerrit.chromium.org/gerrit/33161
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-09-12 21:17:14 -07:00
Mike Frysinger
22bd8b0c29 sign_official_build.sh: rename "install" to "factory"
This lines up with the terminology that people have been using, and the
valid types that can appear in signer instruction files.  We keep around
the old "install" so that other code continues to work.

BUG=None
TEST=None
BRANCH=none

Change-Id: I8d0d2ab4c0ae61f6bcdbcc24ec9796d9eabe386e
Reviewed-on: https://gerrit.chromium.org/gerrit/33056
Reviewed-by: David McMahon <djmm@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-09-12 00:29:28 -07:00
Hung-Te Lin
4b193b7f5c newbitmaps: Add 1280x* with AR=8x5 profiles
For larger panels, we want to support 1280x* profiles.

BRANCH=none
BUG=chrome-os-partner:12896
TEST=make # all profiles generated.

Change-Id: I5b6729e4335bc0ade3948151e766c02ab937435d
Reviewed-on: https://gerrit.chromium.org/gerrit/32892
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-09-11 19:22:36 -07:00
Hung-Te Lin
599565b4dd newbitmaps: Remove SD card asset for USB-only profiles.
BRANCH=none
BUG=chrome-os-partner:13767
TEST=make # success, s1024usb profiles don't have SD in Remove page.

Change-Id: Ifa605dea50d9d8538fca6032743662e9d8dc7e6c
Reviewed-on: https://gerrit.chromium.org/gerrit/32683
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Dave Parker <dparker@chromium.org>
2012-09-10 23:15:40 -07:00
Hung-Te Lin
2607e39f0e newbitmaps: Add more locales & fix locale 'ms' (Malay).
Adding 'update' and language description for locale 'ms'.
Also fixed 'model' height in 'th' locale.

BRANCH=none
BUG=chrome-os-partner:11969
TEST=make # success.

Change-Id: I3eb12d43284bab8c3c243cf86e3dc90c7c0e5497
Reviewed-on: https://gerrit.chromium.org/gerrit/32440
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-09-06 18:13:20 -07:00
Gaurav Shah
7b3e34a236 Key increment script: Preserve extension and take the target keyset directory
First, preserve extensions for the backed up keys (and keyblocks). Useful since
our wrapping scripts look at the extension in deciding what needs wrapping.

Second, instead of having to run the script from within a keyset directory,
take the keyset path as an argument and increment the versions for
the keys in there.

BUG=chrome-os-partner:13748
TEST=ran on devkeys
BRANCH=none

Change-Id: I9e8c3e58149e5cb4cd5557521e047e25c06b0cd6
Reviewed-on: https://gerrit.chromium.org/gerrit/32417
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2012-09-06 16:29:24 -07:00
Che-Liang Chiou
3ae4dd7052 signing script: Resign just firmware body, not the entire section
The signing script extracted firmware body sections FW_MAIN_{A,B} and
resigned the whole section instead of just firmware body.

As a result, read-only firmware spends more time loading read-write
firmware from SPI flash.

Since vblock has firmware body size information, signing script should
retrieve it and use it to sign just firmware body.

This may reduce boot time for ~560ms, depending on firmware image size,
section size and SPI flash/bus throughput.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>

BRANCH=snow,link
BUG=chrome-os-partner:13094
TEST=For Snow (or boards that use cros_bundle_firmware), check that
       after resigning, VBLOCK_{A,B} and FW_MAIN_{A,B} are unchanged
     For Alex and ZGB, check that old and new resign_firmwarefd.sh
       generates identical output

(Test for Snow; repeat for A and B)

dump_fmap -x image.bin VBLOCK_A FW_MAIN_A
mv VBLOCK_A VBLOCK_A.orig
mv FW_MAIN_A FW_MAIN_A.orig

resign_firmwarefd.sh image.bin image-resigned.bin \
  firmware_data_key.vbprivk \
  firmware.keyblock \
  dev_firmware_data_key.vbprivk \
  dev_firmware.keyblock \
  kernel_subkey.vbpubk

dump_fmap -x image-resigned.bin VBLOCK_A FW_MAIN_A
cmp VBLOCK_A.orig VBLOCK_A
cmp FW_MAIN_A.orig FW_MAIN_A

(Test for Alex and ZGB; repeat for old and new resign_firmwarefd.sh)

resign_firmwarefd.sh image.bin image-resigned-{old or new}.bin \
  firmware_data_key.vbprivk \
  firmware.keyblock \
  dev_firmware_data_key.vbprivk \
  dev_firmware.keyblock \
  kernel_subkey.vbpubk

cmp image-resigned-old.bin image-resigned-new.bin

Change-Id: Ie70b6c91614343ad9f991ae369a0f8e74ec213fe
Reviewed-on: https://gerrit.chromium.org/gerrit/31572
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2012-09-04 17:11:23 -07:00
Mike Frysinger
16de2c7bae signer scripts: break kernel parameters on spaces rather than word boundaries
The current kernel parameter parsing logic uses word boundaries (\b) to
keep from replacing parameters inside of other parameters (like "level=1"
mangling "loglevel=1" into "log"), but this fails when the last character
isn't a "word" character.  e.g. "\bconsole=\b" doesn't match "console=".

Change the \b to a space.  Since we're already using spaces as our split
marker, this shouldn't be a problem.

BRANCH=None
BUG=chrome-os-partner:12780
BUG=chromium-os:33868
TEST=ran `ensure_secure_kernelparams.sh` on an image with 'console=' and saw it work

Change-Id: Id69250179ea76aabfed9cd21c1c59483d78a215d
Reviewed-on: https://gerrit.chromium.org/gerrit/31356
Reviewed-by: David McMahon <djmm@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-08-24 13:26:03 -07:00
Mike Frysinger
513be212d9 signer scripts: include debug output when we fail
When checking kernel params fail, it's useful to know all the variables
as to what it's doing.  So dump some state when an error occurs.

BRANCH=None
BUG=None
TEST=ran `ensure_secure_kernelparams.sh` on a bad image and saw useful output
TEST=ran `ensure_secure_kernelparams.sh` on a good image and saw no output

Change-Id: I0e499f87a6d8feed80da72aba75e1e6c1b4076c9
Reviewed-on: https://gerrit.chromium.org/gerrit/31355
Reviewed-by: David McMahon <djmm@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-08-24 12:50:56 -07:00
Hung-Te Lin
ea1b7dd9d9 newbitmaps: Add "native 1366x768 USB" profile.
BRANCH=none # we always build images in ToT.
BUG=chrome-os-partner:13048
TEST=make # got n1366usb bmpblk.bin

Change-Id: I5af3c4f599c6789c208013095db86f0836241ced
Reviewed-on: https://gerrit.chromium.org/gerrit/31324
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-24 11:40:11 -07:00
Hung-Te Lin
2ac65ecccf newbitmaps: Reduce spacing between for_help and URL text.
Both for_help_* and Url bitmaps have margin, so it looks too large as a
"margin*2 + 5(x_pad)" gap on screen.

BRANCH=none
BUG=chrome-os-partner:12893
TEST=make # All bitmaps generated.

Change-Id: Ic8d3e9180e52b7476b07367a027793cea0ed3109
Reviewed-on: https://gerrit.chromium.org/gerrit/30988
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-08-22 18:34:44 -07:00
Hung-Te Lin
1d9c217085 newbitmaps: Improve insert_sd_usb2 message.
"insert_sd_usb2" message didn't include the "ChromeOS is missing or damaged"
text, also is too long for certain locales.

We should revise message and check if the locale fits screen width.

BRANCH=none
BUG=none
TEST=cd strings; make  # all pass

Change-Id: Ie9cb5e4ecd6d143772ffa8e7de29c202e9bde130
Reviewed-on: https://gerrit.chromium.org/gerrit/30824
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-08-20 10:13:01 -07:00
Hung-Te Lin
1550b14604 newbitmaps: Support more profiles.
Added "n1366usb2" profile and remove SD icon in *usb profile.

BRANCH=none
BUG=chrome-os-partner:11078
TEST=make # all profiles generated.

Change-Id: If280cebb847cdc7a599f510f279df03e1cc9b4d5
Reviewed-on: https://gerrit.chromium.org/gerrit/30810
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-08-20 10:13:00 -07:00
Hung-Te Lin
7ce91cd2f9 newbitmaps: Change build targets from x86/arm to "profiles".
The difference of firmware bitmaps won't rely on platform (x86/arm) in future;
instead, things will differ by rescaling & message contents.

To support that, we need to change build target from "platform" to "profiles".

To build all platforms, run "make" in top leve (or "make all" in images).
To debug (en locale without rescaling), run "make" in images folder.
To debug a specific profile, run "make $PROFILE" in images folder.

BRANCH=none
BUG=chrome-os-partner:11078, chrome-os-partner:12790
TEST=make # all profiles generated in images/out_*/*.bin

Change-Id: Iaabf160b1b2bc844d230188eb593daa8a597d378
Reviewed-on: https://gerrit.chromium.org/gerrit/30683
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-08-17 20:02:15 -07:00
Hung-Te Lin
5f5f086e38 newbitmaps: Replace image source BMP files by PNG format.
PNG files are better for editing and checking than BMP files.
Also smaller file size.

BRANCH=none
BUG=none
TEST=make # x86 & arm bitmap blocks generated.

Change-Id: I828779aafa4938cb21356a8c42dee27b1b3ad8ae
Reviewed-on: https://gerrit.chromium.org/gerrit/30682
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-08-17 20:02:14 -07:00
Hung-Te Lin
4d31d0b045 newbitmaps: Revise fonts, color, layout & messages.
Inspired by https://gerrit.chromium.org/gerrit/#/c/30631/

 - Increase gray colored text contrast
 - Enlarge font size to 17pt
 - Change standard font to Verdata (which is wider than usually fonts,
   to provide better quality when stretched in horizontal)
 - Decomposed tonorm_confirmation & devmode so we can have better control
   to verif_* prompt, and look more similar to original mock.

BUG=chrome-os-partner:11078
TEST=make # All platforms generated
BRANCH=none

Change-Id: If019b5767f13556df0e4da77f6457e092fa06016
Reviewed-on: https://gerrit.chromium.org/gerrit/30679
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-08-17 20:02:14 -07:00
Hung-Te Lin
194d7d8867 newbitmaps: Add "insert SD / USB2" text resource.
We need the text for "SD or USB2" (i.e., not USB3).

BRANCH=none
BUG=chrome-os-partner:12790
TEST=none, only adding text translation resource.

Change-Id: Id70a2565bb1fb0b6a4ed92d3fceddbc72e60d77a
Reviewed-on: https://gerrit.chromium.org/gerrit/30663
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-08-17 20:02:14 -07:00
Dave Parker
0868f8f3b7 Fix vertical placement of bmp images on firmware screens.
BUG=chromium-os:33608
TEST=Run 'make' in newbitmaps directory to generate new bmpblock.
Run on DUT. Observe spacing in the footer section is closer
together.

Change-Id: I96987e827fd395f13244dbc58db600de5dc30958
Reviewed-on: https://gerrit.chromium.org/gerrit/30610
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
2012-08-16 18:45:21 -07:00
Dave Parker
12ef75d84d Fix alignment of HWID on firmware screens and bitmap viewer.
BUG=chrome-os-partner:12701
TEST=Disable the 'clean' step in the Makefile and
run 'make' in newbitmaps directory. Use the bitmap_viewer to
verify the HWID is correctly aligned when compared with the "Model"
text.

Change-Id: Icd3977f50461492a0999059ccd4982d16a373dce
Reviewed-on: https://gerrit.chromium.org/gerrit/30453
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Dave Parker <dparker@chromium.org>
Tested-by: Dave Parker <dparker@chromium.org>
2012-08-15 22:49:09 -07:00