chromiumos/platform/initramfs.git
12 months agoExtract entire stateful and use tar 36/63536/3 firmware-pit-4482.B master release-R30-4537.B stabilize-4512.B
Kees Cook [Thu, 25 Jul 2013 22:51:23 +0000 (15:51 -0700)]
Extract entire stateful and use tar

This includes the unencrypted stateful partition in the extraction now
(though it excludes the various encrypted files and trees). Since doing
a raw "cp" to a USB stick can go very slowly (3 hours for 8000 files),
and to save on space and time, generate a compressed tarball instead.

Additionally, this adds more debug reporting to various commands that
might fail, and detects a pathological condition that should just be
ignored to allow the user/pass prompt to start over.

BUG=chromium:216804
TEST=Stumpy build, decrypted extraction worked

Change-Id: I1b0bbd996b17113b8002911d159812c38cf003b0
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63536
Reviewed-by: Elly Jones <ellyjones@chromium.org>
14 months agoPrompt for user/password in decryption recovery 48/57548/3 factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-4262.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B release-R29-4319.B stabilize-4255.B stabilize-4287.B stabilize-4443.B
Kees Cook [Tue, 4 Jun 2013 21:03:14 +0000 (14:03 -0700)]
Prompt for user/password in decryption recovery

Changes decryption recovery to the "version 2" format which requires a
username and passkey. It uses the target's system salt file to calculate
the passkey from the typed password, and installs the flag file as
before.

BUG=chromium:236093
TEST=link build, decryption recovery workflow produces correct file

Change-Id: Id5770922c7287093f3d6aa05946f4076cb338e2d
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/57548
Reviewed-by: Will Drewry <wad@chromium.org>
15 months agoAdd dmesg to the recovery log and also copy it separately. 82/55582/2
Chris Sosa [Fri, 17 May 2013 21:34:29 +0000 (14:34 -0700)]
Add dmesg to the recovery log and also copy it separately.

BUG=chromium:213731
TEST=Ran recovery -- checked both recovery.log and dmesg on image.

Change-Id: I64c6deeff286eb168fc6ba11d610c3ec680c1194
Reviewed-on: https://gerrit.chromium.org/gerrit/55582
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>

15 months agoGather hw diagnsostics log and print it to dlog. 02/50002/3 factory-4128.B factory-spring-4131.B release-R28-4100.B stabilize-4100.38.B stabilize-spring-4100.53.B toolchainB
Chris Sosa [Fri, 3 May 2013 01:22:19 +0000 (18:22 -0700)]
Gather hw diagnsostics log and print it to dlog.

As part of gathering more hw diagnostics, we're adding more diagnostic
information when recovery fails. In this CL, we are adding the results
of a storage test run from chromeos-install on a failure. This log, if
it exists is stored in /tmp as /tmp is shared across the chroot.

BUG=chromium:235068
TEST=Run through recovery with a failure.

Change-Id: I1e8dae770c24a2966bec5ab5d51fd2db6500b9e6
Reviewed-on: https://gerrit.chromium.org/gerrit/50002
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>

17 months agorecovery: Prevent accidentally loading modules from usb key 97/44297/4 factory-spring-3842.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B release-R27-3912.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B toolchainA
Doug Anderson [Thu, 28 Feb 2013 19:31:54 +0000 (11:31 -0800)]
recovery: Prevent accidentally loading modules from usb key

Prevent there being any chance of accidentally loading kernel modules
from the mounted USB key by using /proc/sys/kernel/modules_disabled.

BUG=chrome-os-partner:13068
TEST=Manual:
1. Don't apply <https://gerrit.chromium.org/gerrit/#/c/44292/> or
   revert it if it's already applied.
2. Apply hack from comment #110 of chrome-os-partner:13068
3. From the first shell prompt in the hacked recovery image type:
   chroot /usb /usr/sbin/flashrom -r /tmp/foo.bin
4. Type lsmod
5. Confirm that spidev isn't in there.
TEST=Remote trybots for an ARM and x86 build including gerrit CLs
44290 and 44292.  Confirm recovery works on these.

Change-Id: Ib9b1a6cc728afeac92a6d1a1e0b298f118c0b306
Reviewed-on: https://gerrit.chromium.org/gerrit/44297
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
18 months agoSupport network boot factory install 14/41914/9 release-R26-3701.B stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-bluetooth-smart toolchain-3701.42.B
Vic Yang [Tue, 22 Jan 2013 09:27:26 +0000 (17:27 +0800)]
Support network boot factory install

To speed up factory install, we want to pull only required files into
initramfs and remove initrd from the network imaging flow. To support
this, some minor modifications are needed to support executing factory
installer in initramfs.

BUG=chrome-os-partner:17368
TEST=Network boot and install

Change-Id: I415a12f21c92ba2c69c826de69afcf0a1891a325
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41914
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
20 months agoinitramfs: Use smaller font to avoid cut-off URL. 56/39356/7 factory-3536.B release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 toolchain-3428.65.B
Daniel Erat [Fri, 7 Dec 2012 02:33:51 +0000 (18:33 -0800)]
initramfs: Use smaller font to avoid cut-off URL.

My previous changes to the font used for text on
recovery mode resulted in a URL getting clipped at the
bottom of dev_switch.png.  Switching from 12-point (16
pixels at 96 DPI) to 14-pixel appears to fix the issue in
all locales.

I'm also making the script check the text layout dimensions
and abort if they exceed the available space.

BUG=chromium-os:36755
TEST=visual inspection of all images.  since i don't read
     the majority of these languages, confirmed that the URL
     is visible in all versions of dev_switch.png.  updated
     script aborts with old text sizes but doesn't with new
     sizes.

Change-Id: Ia0fdd905760ba8c287baed2501816770db38ffb2
Reviewed-on: https://gerrit.chromium.org/gerrit/39356
Commit-Ready: Daniel Erat <derat@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
21 months agoinitramfs: Update fonts to match Chrome's UI. 77/37077/2 stabilize2
Daniel Erat [Wed, 31 Oct 2012 23:32:54 +0000 (16:32 -0700)]
initramfs: Update fonts to match Chrome's UI.

This updates the make_images script to use the same set of
font families as Chrome's UI.

I'm also removing a red-herring call to
set_antialias(cairo.ANTIALIAS_SUBPIXEL) that doesn't do
anything and adding a comment mentioning that font rendering
is instead controlled by the host sysroot's Fontconfig
settings.

BUG=chromium-os:27872
TEST=manual: ran make_images; compared old and new images
     and observed that characters were rendered properly and
     not clipped
CQ-DEPEND=I7587b9c7a5f864bb7afeb52a3935ed45052d0b86

Change-Id: I57218225ed3eb5fad0b58a176568c5504605629d
Reviewed-on: https://gerrit.chromium.org/gerrit/37077
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Jungshik Shin (jungshik at google) <jshin@chromium.org>
Commit-Ready: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
21 months agoinitramfs: fixes for recovery to work with bootcache
Paul Taysom [Thu, 25 Oct 2012 22:47:27 +0000 (15:47 -0700)]
initramfs: fixes for recovery to work with bootcache

The command line format for device mappers has changed. Initramfs
can now work with either the old or the new format and with bootcache
on or just verity or niether.

BUG=chromium-os:25441
TEST=Tested recovery kernels for x86 with old format, with new format
with and without bootcache. ARM - old format.

Change-Id: Icbc92a2dc1425d8b8e64c8da28542a888d5df0ab
Reviewed-on: https://gerrit.chromium.org/gerrit/36606
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
22 months agoFix USB->tmpfs copying error on devices with large rootfs. factory-2985.B factory-2993.B factory-3004.B
Hung-Te Lin [Fri, 28 Sep 2012 04:06:23 +0000 (12:06 +0800)]
Fix USB->tmpfs copying error on devices with large rootfs.

On device like Link, the rootfs for factory install shim has exceed 300M (ex,
2962.0.0 = 317M), so let's increase the default tmpfs size.

Also moved definition of TMPFS_SIZE from shared init to factory_init since
recovery image does not use that.

BUG=chrome-os-partner:14645
TEST=Boot factory install shim and passed USB->tmpfs copy process.

Change-Id: Iaa0a22859551c3698f79fc6e668af66a57726b8f
Reviewed-on: https://gerrit.chromium.org/gerrit/34256
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

22 months agofix typo in previous commit
Mike Frysinger [Fri, 21 Sep 2012 21:59:36 +0000 (17:59 -0400)]
fix typo in previous commit

The && operator doesn't work with [...], just [[...]], so convert to
the POSIX -a operator instead.  And add missing linewrap.

BUG=chromium-os:34652
TEST=read the code

Change-Id: I7d971f8c7925c8ecc84676401e484db9af193a00
Reviewed-on: https://gerrit.chromium.org/gerrit/33812
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
23 months agodon't count empty sd devices in recovery
Derek Basehore [Mon, 17 Sep 2012 20:23:47 +0000 (13:23 -0700)]
don't count empty sd devices in recovery

In recovery_init.sh, don't count empty sd devices when determining if we have
only 2.

BUG=chrome-os-partner:13942
TEST=recover devices

Change-Id: If547356edc1fcb9158ed46d11e30e94f0e6ca91e
Reviewed-on: https://gerrit.chromium.org/gerrit/33457
Tested-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Derek Basehore <dbasehore@chromium.org>

23 months agoUpdate log messages for better user understanding. factory-2914.B
Kris Rambish [Wed, 12 Sep 2012 00:43:40 +0000 (17:43 -0700)]
Update log messages for better user understanding.

BUG=None
TEST=None

Change-Id: I85a76e6d28f09fc90cd3f142bfdaa484d319afbe
Reviewed-on: https://gerrit.chromium.org/gerrit/33027
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Ready: Kris Rambish <krisr@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
23 months agoSet correct console when switch to new root
Rong Chang [Sat, 8 Sep 2012 12:59:36 +0000 (20:59 +0800)]
Set correct console when switch to new root

BUG=chrome-os-partner:13689
TEST=manual
  Legacy boot factory install shim and check console messages on tty2

Change-Id: If1458621730b4107ef5b921b8188f5307f5c8e9a
(cherry picked from commit a1b27b793eae36bef8efaefe63642c15961eacad)
Reviewed-on: https://gerrit.chromium.org/gerrit/32651
Commit-Ready: Rong Chang <rongchang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
23 months agorfc: add stateful encryption debugging file mode to recovery
Will Drewry [Fri, 7 Sep 2012 04:01:41 +0000 (23:01 -0500)]
rfc: add stateful encryption debugging file mode to recovery

Allow recovery to create the required file on the target system after a
moderate delay.  The file that needs to be created on the host should match
exactly the file placed in the recovery image's stateful partition.  It thens
reboots back over and expects the host system to return to recovery upon
completion.

TEST=tested on devkeys parrot for full round trip including error cases (not enough space)
BUG=chromium-os:34199

Change-Id: I3eafa8911c4f9cd102891562ec330e6bf9cbca53
Reviewed-on: https://gerrit.chromium.org/gerrit/32500
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Tested-by: Will Drewry <wad@chromium.org>
Commit-Ready: Will Drewry <wad@chromium.org>

23 months agorecovery_init.sh: check that we have 2 sd devices
Derek Basehore [Fri, 31 Aug 2012 01:10:19 +0000 (18:10 -0700)]
recovery_init.sh: check that we have 2 sd devices

Instead of assuming that /dev/sda is the internal device, we make sure that we
only have 2 sd devices for recovery. It takes the device that is not the
recovery shim and it takes that as the install destination.

Recovery works when the internal storage is sda or sdb.

BUG=chrome-os-partner:12934
TEST=recover device

Change-Id: I85b8f4da098af467297d65b5524f9a9bad94387f
Reviewed-on: https://gerrit.chromium.org/gerrit/32005
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Derek Basehore <dbasehore@chromium.org>
Tested-by: Derek Basehore <dbasehore@chromium.org>
23 months agoRevert "recovery_init.sh: use first ATA device as destination" factory-2846.B
Michael Krebs [Thu, 30 Aug 2012 00:55:32 +0000 (17:55 -0700)]
Revert "recovery_init.sh: use first ATA device as destination"

This reverts commit db2d802614e769f6367d07bf245652b402cd785c

parted command has to be removed because it makes the kernel too big (crosbug.com/34039).

Change-Id: I28f10a396962302d9e91dff4d693bbb3a8c75712
Reviewed-on: https://gerrit.chromium.org/gerrit/31773
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>

23 months agorecovery_init.sh: use first ATA device as destination
Derek Basehore [Wed, 29 Aug 2012 03:32:51 +0000 (20:32 -0700)]
recovery_init.sh: use first ATA device as destination

Instead of assuming our install destination is /dev/sda, find the first ATA
device. We take this and compare it to our source to make sure we those do not
conflict.

Upon testing, I ran into the case where /dev/sdb is the hard drive and it
worked.

BUG=chrome-os-partner:12934
TEST=install with a recovery image

Change-Id: I39100e1ea75db1bcfe3a295453ff539b568e425c
Reviewed-on: https://gerrit.chromium.org/gerrit/31676
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Derek Basehore <dbasehore@chromium.org>
Tested-by: Derek Basehore <dbasehore@chromium.org>
2 years agofactory_init: remove developer mode checking. factory-2717.B factory-2723.14.B firmware-butterfly-2788.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-stout-2817.B
Hung-Te Lin [Thu, 26 Jul 2012 04:50:56 +0000 (12:50 +0800)]
factory_init: remove developer mode checking.

Developer mode checking can be done in firmware key signing part, or inside
factory_install.sh. We don't need to check that inside initramfs.

BUG=chrome-os-partner:11864
TEST=none.

Change-Id: I9c0c0f26ea5f0e67154c1697196c517c5b5084e3
Reviewed-on: https://gerrit.chromium.org/gerrit/28469
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Jay Kim <yongjaek@chromium.org>
2 years agoDrop problemantic '-t ext2' on mount commands. factory-2475.B factory-2569.B release-R21-2465.B
J. Richard Barnette [Mon, 4 Jun 2012 23:28:31 +0000 (16:28 -0700)]
Drop problemantic '-t ext2' on mount commands.

In the code paths for some images, 'mount -t ext2' could be used
even though the target file system would actually be ext3.  This
didn't cause recovery to fail, but it had annoying side-effects.
Dropping the -t option makes everything work as intended.

BUG=chromium-os:28361
TEST=boot a recovery image built with --nominimize, with and without the non_interactive flag file present

Change-Id: If48d6105427f6a9f353d2388ba813c27b9b9fb6b
Reviewed-on: https://gerrit.chromium.org/gerrit/24452
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoinitramfs: Treat network boot as nonchrome factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B firmware-link-2348.B release-R20-2268.B
Vic Yang [Mon, 7 May 2012 03:15:51 +0000 (11:15 +0800)]
initramfs: Treat network boot as nonchrome

Since we don't have verified boot in network boot, treat network boot as
nonchrome.

BUG=chrome-os-partner:7952
TEST=Manual

Change-Id: Iad65152f08e6f83f71da496396e802a75947317f
Reviewed-on: https://gerrit.chromium.org/gerrit/21947
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2 years agoIncorporate updated localized messages.
J. Richard Barnette [Fri, 13 Apr 2012 23:46:43 +0000 (16:46 -0700)]
Incorporate updated localized messages.

This incorporates translations for the most recent update
to messages for en-US.

BUG=None
TEST=Examine images online
TEST=spot-check selected locales

Change-Id: I34f885533deb8601416a491501c99444c2f10e4b
Reviewed-on: https://gerrit.chromium.org/gerrit/20281
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: St├ęphane Marchesin <marcheu@chromium.org>
2 years ago[initramfs] add OWNERS
Elly Jones [Fri, 6 Apr 2012 19:26:23 +0000 (15:26 -0400)]
[initramfs] add OWNERS

TEST=None
BUG=chromium-os:22007

Change-Id: I717c992f8a2f105cf3b8cff76ac9edb385e72e79
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19772
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2 years agoAdd new spinner with adjusted colors.
J. Richard Barnette [Tue, 3 Apr 2012 22:35:57 +0000 (15:35 -0700)]
Add new spinner with adjusted colors.

BUG=chromium-os:28920
TEST=boot recovery and observe the spinner

Change-Id: Ie3515e2c6c2c08e87c96498eb0e6b77f7d52e5c9
Reviewed-on: https://gerrit.chromium.org/gerrit/19689
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hristo Stefanov <hstefanov@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAdjust the location of the progress bar to be closer to the text.
J. Richard Barnette [Mon, 2 Apr 2012 20:23:12 +0000 (13:23 -0700)]
Adjust the location of the progress bar to be closer to the text.

BUG=chromium-os:28829
TEST=Boot and observe recovery

Change-Id: Id14b045ac36234d581f50691d478a0136d86bd50
Reviewed-on: https://gerrit.chromium.org/gerrit/19495
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hristo Stefanov <hstefanov@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAdjust US-English texts to match latest review comments.
J. Richard Barnette [Mon, 2 Apr 2012 20:12:49 +0000 (13:12 -0700)]
Adjust US-English texts to match latest review comments.

BUG=chromium-os:27297
TEST=Boot and observe recovery

Change-Id: Ib5bf66aa6feb72cc34541acf4211414e86ef4b6c
Reviewed-on: https://gerrit.chromium.org/gerrit/19494
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hristo Stefanov <hstefanov@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoUse ply-image --offset to locate images
J. Richard Barnette [Fri, 9 Mar 2012 01:33:15 +0000 (17:33 -0800)]
Use ply-image --offset to locate images

When recovering with an external monitor attached to a laptop,
ply-image and messages.sh calculated different dimensions for
the display, resulting in a mismatch between the centering of
the logo background and the centering of messages.  Switch to
using 'ply-image --offset' so that all centering calculations
agree.

BUG=chrome-os-partner:8296
TEST=run recovery with an external monitor attached

Change-Id: Ib3de1748875a251f24cde0bea736ee6084a8a264
Reviewed-on: https://gerrit.chromium.org/gerrit/17655
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoRevamp the recovery message texts. factory-1987.B
J. Richard Barnette [Wed, 29 Feb 2012 22:46:58 +0000 (14:46 -0800)]
Revamp the recovery message texts.

This change applies only to en-US.  Translated and localized texts
will be added in a later step.

BUG=None
TEST=boot in recovery with the dev switch both on and off

Change-Id: I8ab0e021708a96a8ea7fddec67131f92b0e4403a
Reviewed-on: https://gerrit.chromium.org/gerrit/17095
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hristo Stefanov <hstefanov@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoUse the Motoya fonts for Japanese when available.
J. Richard Barnette [Tue, 6 Mar 2012 00:00:41 +0000 (16:00 -0800)]
Use the Motoya fonts for Japanese when available.

The Motoya fonts for Japanese are only available for Chrome (not
Chromium) OS builds.  For Chromium OS builds, continue to use the
IPA fonts instead.

BUG=chromium-os:26757
TEST=build and inspect recovery message images from public and private overlays

Change-Id: I4a553703b0e14e33683734b895181a2bad5da2a4
Reviewed-on: https://gerrit.chromium.org/gerrit/17374
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Tested-by: Takayoshi Kochi <kochi@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoInitial changes in response to UX review.
J. Richard Barnette [Wed, 29 Feb 2012 00:12:27 +0000 (16:12 -0800)]
Initial changes in response to UX review.

This changes the foreground colors for text and the progress bar,
changes the dimensions of the progress bar, moves the activity
spinner from the center of the screen to be beside the text, and
adds optional icons to be placed beside the text of some messages.

BUG=None
TEST=boot and observe recovery for us-EN

Change-Id: I2412ae1e7da48f9541ee79ff003aa63fe7f53d91
Reviewed-on: https://gerrit.chromium.org/gerrit/17023
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2 years agoFix font selection to be locale specific.
J. Richard Barnette [Tue, 28 Feb 2012 01:47:22 +0000 (17:47 -0800)]
Fix font selection to be locale specific.

Japanese and Chinese share a number of character code points, but
the glyphs used to render these common code points must be
different.  The default font uses the Chinese glyphs, so Japanese
must use a locale-specific font.

BUG=chromium-os:26757
TEST=visually inspect generated images in a browser

Change-Id: I7434ef9cd7ea8bdcd8835900840272d1e58fd532
Reviewed-on: https://gerrit.chromium.org/gerrit/16879
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoLocalized translations to change 'Chromebook' to 'system'.
J. Richard Barnette [Mon, 27 Feb 2012 21:17:35 +0000 (13:17 -0800)]
Localized translations to change 'Chromebook' to 'system'.

BUG=chrome-os-partner:6561
TEST=review screens offline
TEST=review texts with persons familiar with the target languages

Change-Id: Iaf86db9aa7055be81973617cf85565ea27f8fc47
Reviewed-on: https://gerrit.chromium.org/gerrit/16844
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoRename 'make_text_images' to 'make_images'
J. Richard Barnette [Tue, 28 Feb 2012 00:48:34 +0000 (16:48 -0800)]
Rename 'make_text_images' to 'make_images'

This change is conceptually part of the preceding changes for the
new UX.  It's separate in order to preserve file history better.

BUG=None
TEST=build a recovery image

Change-Id: I73cc03def9708b7dbfbc19036eca558fbd0bccea
Reviewed-on: https://gerrit.chromium.org/gerrit/16880
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoSwitch recovery UX to use images from chromeos-assets.
J. Richard Barnette [Fri, 17 Feb 2012 00:16:46 +0000 (16:16 -0800)]
Switch recovery UX to use images from chromeos-assets.

This changes the background color and arranges for all messages to
be framed by the logo screen from chromeos-assets.  Additionally the
moving box animation is replaced with a simple spinner, also from
chromeos-assets.

The 'make_text_images' script now generates the progress bar.  To
prevent duplicate definitions, the script also generates
'constants.sh'.  For purposes of better preserving file history,
the script will be renamed 'make_images' in a follow-on CL.

Finally, this adds a small extra bit of debug for the progress bar
to recovery_init.sh.

BUG=None
TEST=boot and watch recovery

Change-Id: I6dd9bab76bd1062166ffb36b66b6a0cf2fb7ef13
Reviewed-on: https://gerrit.chromium.org/gerrit/16098
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAdd support for the en-AU and en-CA locales.
J. Richard Barnette [Wed, 15 Feb 2012 00:43:26 +0000 (16:43 -0800)]
Add support for the en-AU and en-CA locales.

These two locales don't have separate message texts; they reuse the
messages for en-GB and en-US, respectively.

BUG=None
TEST=inspect the contents of the initramfs CPIO archive

Change-Id: I2c05c3a62ea8efe2dbb386aa9850f26f378a8438
Reviewed-on: https://gerrit.chromium.org/gerrit/15863
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hristo Stefanov <hstefanov@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAdd es-419, ja, pt-BR, and sv to the list of supported locales
J. Richard Barnette [Tue, 14 Feb 2012 21:03:01 +0000 (13:03 -0800)]
Add es-419, ja, pt-BR, and sv to the list of supported locales

BUG=None
TEST=visually inspect the PNG files for formatting errors
TEST=check the contents of the initramfs CPIO image for the new locales

Change-Id: I1a58d6b9d50ef0683c6984112772a69f4c5372f0
Reviewed-on: https://gerrit.chromium.org/gerrit/15841
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hristo Stefanov <hstefanov@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoChange make_text_images to allow invocation with no arguments.
J. Richard Barnette [Tue, 14 Feb 2012 20:43:53 +0000 (12:43 -0800)]
Change make_text_images to allow invocation with no arguments.

To make it more convenient to generate message images for manual
review, changed make_text_images to have a useful default behavior if
invoked without arguments.  This also avoids the side effect of
needlessly regenerating graphic images that haven't changed.

Updated the README to reflect the new use case.

BUG=None
TEST=run the commands described in the README

Change-Id: I798fcb1d7eb408e2d9ceaf0e592279b3bed26992
Reviewed-on: https://gerrit.chromium.org/gerrit/15834
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoDelete code to mount and modify the installed stateful partition.
J. Richard Barnette [Wed, 8 Feb 2012 22:41:47 +0000 (14:41 -0800)]
Delete code to mount and modify the installed stateful partition.

Previously, if the dev mode switch was enabled at boot time or if
the hardware was not Chrome OS hardware then the recovery code would
mount the stateful partition (partition 1) on the install target,
and touch a file named ".developer_mode".  To improve long-term
maintainability, that code has moved to chromeos-install.

BUG=chromium-os:22614
TEST=Recover to an image built with the new installer
CQ-DEPEND=Ieeb8ed9bb68507e44cbf7d30af5085ca258a1ccb

Change-Id: Iaae82a95895d701cc9a644df17f1748d48c2fb27
Reviewed-on: https://gerrit.chromium.org/gerrit/15536
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoDelete message screen PNG files.
J. Richard Barnette [Mon, 6 Feb 2012 21:34:37 +0000 (13:34 -0800)]
Delete message screen PNG files.

Message images are now generated from the ebuild, rather than generated
manually and checked in to the repository.

BUG=chromium-os:25954
TEST=build and boot with new ebuild
CQ-DEPEND=I8997a48e5f0c293e5969602f744702336485fcd1

Change-Id: I4a1788a0194360d2b98e77e9fceccf1166aba76b
Reviewed-on: https://gerrit.chromium.org/gerrit/15352
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAllow message images to be generated dynamically from the ebuild.
J. Richard Barnette [Mon, 6 Feb 2012 21:27:53 +0000 (13:27 -0800)]
Allow message images to be generated dynamically from the ebuild.

All localized message screens can now be generated directly from
make_text_images without relying on make_images.  This allows the
ebuild to invoke make_text_images directly.

Note that make_image still cannot be invoked from the ebuild,
because it uses ImageMagick commands that don't work from inside the
chroot.

BUG=chromium-os:25954
TEST=Build and boot with the new ebuild

Change-Id: I7d7dd43b6168510bcd3eb315af1657dc1a60b88d
Reviewed-on: https://gerrit.chromium.org/gerrit/15351
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoLocate message boxes in the center of the screen.
J. Richard Barnette [Wed, 1 Feb 2012 20:45:11 +0000 (12:45 -0800)]
Locate message boxes in the center of the screen.

Use the contents of /sys to determine the location of the screen
center at run time, in order to accomodate a variety of screen
sizes.

BUG=chrome-os-partner:6852
TEST=boot and observe that messages are centered and properly displayed.

Change-Id: I33d3d2876cb54c79ab5c14e62275ee77c8cbd4f7
Reviewed-on: https://gerrit.chromium.org/gerrit/15162
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoChange 'Chromebook' to 'system'. release-R18-1660.B
J. Richard Barnette [Tue, 24 Jan 2012 20:42:26 +0000 (12:42 -0800)]
Change 'Chromebook' to 'system'.

BUG=chrome-os-partner:6561
TEST=boot recovery image, and observe the messages

Change-Id: I73b5f64e1f8d07bf83d1a33ad8b491de7b050ba4
Reviewed-on: https://gerrit.chromium.org/gerrit/14717
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Simon Arscott <arscott@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAdd support for Castilian Spanish.
J. Richard Barnette [Wed, 14 Dec 2011 02:36:46 +0000 (18:36 -0800)]
Add support for Castilian Spanish.

The Spanish text for invalid_kernel was dangerously close to being
truncated on the bottom, so the change also allows for more vertical
space within all text message boxes in all locales.

BUG=chromium-os:24186
TEST=perform recovery on a system configured for 'es' locale
TEST=inspect all the Spanish images for obvious layout errors
TEST=spot check selected non-Spanish images for obvious layout errors

Change-Id: I8975275565c9e3202c3e811c081ecf5b07d9a3ab
Reviewed-on: https://gerrit.chromium.org/gerrit/12890
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2 years agoAdd localized texts for all available locales.
J. Richard Barnette [Mon, 12 Dec 2011 21:50:51 +0000 (13:50 -0800)]
Add localized texts for all available locales.

Add translated/localized texts for 36 new locales (this brings the
total to 43).  The additional locales reflect all the locales that
Google supports in Chrome, but to which Chromebooks currently do not
ship.

The new localized texts have not been qualified, and may contain
translation errors, layout issues, typos, or other problems.

BUG=None
TEST=run make_images, and see that it generates only the needed files.

Change-Id: I35239062fd7416c0bd7d4221bca872d0e01838eb
Reviewed-on: https://gerrit.chromium.org/gerrit/12766
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2 years agoSpecifically whitelist supported recovery locales.
J. Richard Barnette [Mon, 12 Dec 2011 18:36:12 +0000 (10:36 -0800)]
Specifically whitelist supported recovery locales.

This allows inclusion of localized texts in the source repository
even though the texts don't get built into recovery images.

BUG=None
TEST=run make_images

Change-Id: I0e2755169fcb0b4c59aeaf3e00b7f0cf10ff246d
Reviewed-on: https://gerrit.chromium.org/gerrit/12752
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoUse ply-image --clear instead of a fixed-size background image.
J. Richard Barnette [Tue, 13 Dec 2011 01:05:42 +0000 (17:05 -0800)]
Use ply-image --clear instead of a fixed-size background image.

For systems with large screens, the default 1366x800 background
image can't completely fill the screen.  Switch to using the
ply-image --clear option to fill the screen with a solid color
instead.

BUG=chrome-os-partner:6848
TEST=run recovery on a ZGB

Change-Id: I866305db27d19a1905a1b5d0a9f2761fc3a5a6cc
Reviewed-on: https://gerrit.chromium.org/gerrit/12794
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2 years agoinitramfs now extracts dm-verity options from install kernel.
Gilad Arnold [Thu, 1 Dec 2011 19:58:57 +0000 (11:58 -0800)]
initramfs now extracts dm-verity options from install kernel.

* Replaced 'cat /proc/cmdline' in init with call to dump_kernel_config;
  this will correctly fetch the dm-verity options (including the salt
  argument) from the install kernel, rather than the running recovery
  kernel.  This allows to verify the recovery image, which would
  otherwise fail.

* Must also verify that the install kernel hash matches the current
  kernel hash argument, if not in developer mode (with corresponding
  change to recovery_init).

* Extended the check for a root=/dev/dm-0 kernel argument appropriately.

* On factory installs, keep using the old method.

* See corresponding changes to chromeos-initramfs ebuild (pull
  dump_kernel_config) and mod_image_for_recovery.sh (don't pass verity
  args to build_kernel_image).

BUG=chromium-os:22530
TEST={dev,verified,factory} images tested on x86-{mario,alex} in {dev,verified} mode

Change-Id: I79bfa4d1095c50976af651214162e17012c4ff6d
Reviewed-on: https://gerrit.chromium.org/gerrit/12334
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
2 years agosanity check the date in init for factory installer
David Hendricks [Tue, 22 Nov 2011 19:24:41 +0000 (11:24 -0800)]
sanity check the date in init for factory installer

This adds a sanity check for the date in case CMOS RTC becomes
corrupt.

Related CL: https://gerrit.chromium.org/gerrit/12041

BUG=chromium-os:13200
TEST=Tested on Stumpy w/ a modified firmware image that corrupts RTC

Change-Id: I66df29762b75c4f9c5d5f8428940fb9bf1577605
Reviewed-on: https://gerrit.chromium.org/gerrit/12045
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2 years agoUse new cros_factory_install kernel command line option.
Jon Salz [Tue, 25 Oct 2011 10:29:36 +0000 (18:29 +0800)]
Use new cros_factory_install kernel command line option.

This allows detection to happen earlier, and to succeed even if the factory
install root is corrupted (which results in a confusing error state).

Also disable the framebuffer in factory-install mode, since it doesn't
work in the VM and isn't particularly useful for that mode anyway.

BUG=chrome-os-partner:6396
TEST=Installed on Alex

Change-Id: I73e39fd73fc4bf9e026cd4cc6f18c90675d58fc9
Reviewed-on: https://gerrit.chromium.org/gerrit/10640
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
2 years agoUse ext4 format for stateful partition firmware-kiev-2.112.B firmware-uboot_v2-1299.B
Paul Taysom [Fri, 4 Nov 2011 17:14:35 +0000 (10:14 -0700)]
Use ext4 format for stateful partition

This is final step in ext4 conversion. We have been running with
the ext4 file system (mount -t extr) but ext3 format (mkfs.ext3)
for several weeks. This changes uses the ext4 format (mkfs.ext4)
for the stateful partition.

BUG=chromium-os:20012
TEST=Ran ext4 on all platforms. Used update_engine_client --update
to update from ext3 to ext4 and back.

Change-Id: I7c04d2104323eda6e16e4e6853ad94c606c699f2
Reviewed-on: https://gerrit.chromium.org/gerrit/11215
Commit-Ready: Paul Taysom <taysom@google.com>
Tested-by: Paul Taysom <taysom@google.com>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2 years agoinitramfs: Read VPD only on Chrome systems factory-1235.B factory-1284.B release-R16-1193.B
Hung-Te Lin [Fri, 14 Oct 2011 02:10:40 +0000 (10:10 +0800)]
initramfs: Read VPD only on Chrome systems

The vpd command can only return locale on devices with ChromeOS firmware, and
will take >20 seconds if running on non-chrome system.

Since we may run factory install image on non-chrome (ex, H2O) devices, this CL
helps factory installation to speed up.

BUG=chrome-os-partner:6396
TEST=built factory install image and tried to install on both H2C and H2O system

Change-Id: I119721a265947fffe610eaafe1af58d58cf95f48
Reviewed-on: http://gerrit.chromium.org/gerrit/10069
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
2 years agoCreate a new script for generating message images
J. Richard Barnette [Mon, 17 Oct 2011 21:58:28 +0000 (14:58 -0700)]
Create a new script for generating message images

The new script is in Python, and uses the Pango library for
automatic text layout in multiple scripts.  The output text is
formatted with automatically determined newline breaks, rather than
using the newline breaks in the original text.

Because of the change, the new images are visibly different:  The
text is laid out left justified (at least for left-to-right
scripts), and the images use different fonts.

BUG=chromium-os:20143
TEST=Observe recovery images for various locales
TEST=Review all the .png files online

Change-Id: I68bf751ca833e01958fafd697e9b7645f745e11a
Reviewed-on: http://gerrit.chromium.org/gerrit/10205
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoAdd localized message images for Korean.
J. Richard Barnette [Mon, 17 Oct 2011 22:06:16 +0000 (15:06 -0700)]
Add localized message images for Korean.

BUG=chromium-os:20143
TEST=Images were reviewed by a native speaker in context and online

Change-Id: Ie7fad972595d5c508bc3793aa63ad0d40a0cf851
Reviewed-on: http://gerrit.chromium.org/gerrit/10206
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years agoPrefer the new chromeos-recovery script over chromeos-install
J. Richard Barnette [Fri, 23 Sep 2011 17:40:12 +0000 (10:40 -0700)]
Prefer the new chromeos-recovery script over chromeos-install

BUG=chromium-os:20769
TEST=Boot recovery images both with and without the new chromeos-recovery command

Change-Id: Id5bfc2d8f5d1a6e0609b9e6593c913f6055a15a3
Reviewed-on: http://gerrit.chromium.org/gerrit/8209
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2 years agoinitramfs: quote crossystem commands to prevent shell globbing
Hung-Te Lin [Tue, 27 Sep 2011 00:04:11 +0000 (08:04 +0800)]
initramfs: quote crossystem commands to prevent shell globbing

When using "crossystem A?B", we should always quote it because '?' is special
for shell.

BUG=chromium-os:20861
TEST=emerge-x86-generic chromeos-initramfs

Change-Id: I7bee192ae06d92e582e7296a7f14bf0b5cd731e3
Reviewed-on: http://gerrit.chromium.org/gerrit/8321
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 years agoNoop change to force rev of chromeos-initramfs
Jonathan Kliegman [Thu, 22 Sep 2011 20:00:07 +0000 (16:00 -0400)]
Noop change to force rev of chromeos-initramfs

Noop change to force rev and fix build.

BUG=None
TEST=TBR

Change-Id: I469115d271b38be97cb7624913bce09cea6b38dd
Reviewed-on: http://gerrit.chromium.org/gerrit/8153
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
2 years agoinitramfs: don't use obsolete run_as_root flag
Elly Jones [Fri, 16 Sep 2011 14:18:05 +0000 (10:18 -0400)]
initramfs: don't use obsolete run_as_root flag

BUG=chromium-os:6136
TEST=None

Change-Id: I7cb49a65b657af992b7aa23bc35ec741982bba23
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7853
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
2 years agoAllow overriding "reboot after media removal" after recovery install factory-1020.B factory-980.B release-1011.B test-982.B
J. Richard Barnette [Wed, 24 Aug 2011 20:29:08 +0000 (13:29 -0700)]
Allow overriding "reboot after media removal" after recovery install

If the stateful partition on the recovery media contains a file
named 'non_interactive', then at completion recovery will wait 10
seconds, and then reboot without waiting for media removal.

This change also revives a debug feature that prevents
automatically rebooting in cases where VT1 is not the active
display.

BUG=chromium-os:17869
TEST=boot recovery images with and without the feature selected

Change-Id: Ibb20b0f5c576165ad57a58caa278f544899e35da
Reviewed-on: http://gerrit.chromium.org/gerrit/6625
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
2 years agoAdd localized texts for supported Western European languages.
J. Richard Barnette [Wed, 24 Aug 2011 00:36:20 +0000 (17:36 -0700)]
Add localized texts for supported Western European languages.

The included locales represent all the locales in Western
Europe for which Chromebook units have shipped to date.

BUG=chromium-os:19581
TEST=Boot recovery on a unit for each of the new locales

Change-Id: I411368b6bba95c9b3ae32551f7500a19cd8cc1fb
Reviewed-on: http://gerrit.chromium.org/gerrit/6560
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
3 years agoinitramfs: fix recovery script failure by busybox upgrade
Hung-Te Lin [Wed, 17 Aug 2011 12:01:36 +0000 (20:01 +0800)]
initramfs: fix recovery script failure by busybox upgrade

The "&>" (redirect both stdout and stderr) is supported in C shell, bash, and
some other shells, but not in original Bourne shell.

Latest busybox (introduced by http://gerrit.chromium.org/gerrit/5959) seems not
supporting this syntax anymore - it interprets that as "& >" (fork and execute
in background, then redirect stdout).

The more portable syntax is ">file 2>&1", which works fine on old and new
busybox.

BUG=chromium-os:19172
TEST=mod_image_for_recovery.sh; image_to_usb -i recovery_image.bin
     # verified on x86 devices, and the recovery program successfully finished.

Change-Id: I4f8f396ac163ce8b3c043dd04b60dbd201ee696c
Reviewed-on: http://gerrit.chromium.org/gerrit/6148
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
3 years agoUpdated messages texts per editorial review. firmware-881-u-boot-v1 firmware-u-boot-v1
J. Richard Barnette [Tue, 9 Aug 2011 17:00:06 +0000 (10:00 -0700)]
Updated messages texts per editorial review.

BUG=None
TEST=boot image and observe the messages

Change-Id: I4bce3a2aeddb52eafe6e80ed322bfe4574535dfa
Reviewed-on: http://gerrit.chromium.org/gerrit/5558
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Sumit Gwalani <sumit@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
3 years agochromeos-initramfs: use '=', not '-eq'.
Elly Jones [Tue, 9 Aug 2011 17:58:19 +0000 (13:58 -0400)]
chromeos-initramfs: use '=', not '-eq'.

-eq is only for numbers.

BUG=chromium-os:15772
TEST=Adhoc
Build a recovery image with new-style verity arguments and boot it.

Change-Id: I8e5b9bdb71c2d47cd9dacc4ee087453df0f94793
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5565
Reviewed-by: Chris Masone <cmasone@chromium.org>
3 years agochromeos-initramfs: optionally support key-value verity args.
Elly Jones [Wed, 3 Aug 2011 19:26:03 +0000 (15:26 -0400)]
chromeos-initramfs: optionally support key-value verity args.

BUG=chromium-os:15772
TEST=Adhoc
Build a recovery image (I used Kaen) and boot it. Ensure the recovery process
completes; that will exercise the new logic added here.

Change-Id: I32c49004f77b62c4b99f6ccac311bd672d884963
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5226
Reviewed-by: Will Drewry <wad@chromium.org>
3 years agoProgress bar for verification
J. Richard Barnette [Wed, 20 Jul 2011 22:18:19 +0000 (15:18 -0700)]
Progress bar for verification

BUG=chromium-os:17391
TEST=Boot image with the dev switch off (image keys match firmware keys)
TEST=Boot image with the dev switch on (image keys match firmware keys)
TEST=Boot image with the dev switch on (with 5 minute wait for key change)

Change-Id: I993da325dae64b136b9263f61cb911cd910a7fbb
Reviewed-on: http://gerrit.chromium.org/gerrit/5075
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
3 years agoIn initramfs startup, determine locale from VPD content.
J. Richard Barnette [Mon, 18 Jul 2011 19:15:44 +0000 (12:15 -0700)]
In initramfs startup, determine locale from VPD content.

BUG=chromium-os:13240
TEST=Boot Alex w/ locale=fr; confirmed correct recovery log; system booted in French
TEST=Boot Alex w/ locale=en-US; confirmed correct recovery log; system booted in US English
TEST=Boot Mario; confirmed correct recovery log; system booted in US English

Change-Id: Ib305649fe8bb0168209d8da3047784a61afcbc67
Reviewed-on: http://gerrit.chromium.org/gerrit/5074
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agoRevert "initramfs: use key-value verity args"
Elly Jones [Mon, 1 Aug 2011 21:50:04 +0000 (14:50 -0700)]
Revert "initramfs: use key-value verity args"

This reverts commit eeaea6f2e2bebcabfb3239289e37c7aa20a56bcb

Change-Id: I22389f638845eaee559f9fc7fa97e05042490b19
Reviewed-on: http://gerrit.chromium.org/gerrit/5098
Reviewed-by: Will Drewry <wad@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
3 years agoinitramfs: use key-value verity args
Elly Jones [Fri, 29 Jul 2011 15:33:37 +0000 (11:33 -0400)]
initramfs: use key-value verity args

BUG=chromium-os:15772
TEST=Adhoc
Building for Kaen:
Did recovery from a recovery image. Without this change, you'll see "Bad
argument 5='eio': missing value" and verity will panic if the rootfs fails to
verify (instead of just returning EIO).

Depends-on: http://gerrit.chromium.org/gerrit/3037
Change-Id: I5811a20f91c82d25fc5ab32a068a43d54f2b3b3f
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5002

3 years agoFix LOG_DEV on ARM
Rong Chang [Mon, 25 Jul 2011 16:20:53 +0000 (00:20 +0800)]
Fix LOG_DEV on ARM

Partition number schemes are different between mmcblk device and scsi
device. The first partition on /dev/mmcblk1 should be /dev/mmcblk1p1.
But for /dev/sdb, first partition is /dev/sdb1, without a "p".

For all such devices, we can get first partition by replacing trailing
number(s) with "1".

BUG=chrome-os-partner:4801
TEST=Boot recovery shim, and switch to tty3. Check log:
  Saving log file: /log -> /dev/mmcblk1p1

Change-Id: I61d0ecc63f33a33f5c487d23456220cfe88c43aa
Reviewed-on: http://gerrit.chromium.org/gerrit/4656
Reviewed-by: Micah Catlin <micahc@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
3 years agoClobber the lockbox space at recovery.
Luigi Semenzato [Wed, 20 Jul 2011 21:35:13 +0000 (14:35 -0700)]
Clobber the lockbox space at recovery.

BUG=chromium-os:15304
TEST=check that the lockbox content has been destroyed after a recovery and that cryptohome can recreate it (see bug for details).

Change-Id: I60eaed324f8e39a7ccd0384522e49dfe229daaed
Reviewed-on: http://gerrit.chromium.org/gerrit/4330
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
3 years agoPrevent the screen from blanking after inactivity
J. Richard Barnette [Thu, 21 Jul 2011 20:11:12 +0000 (13:11 -0700)]
Prevent the screen from blanking after inactivity

BUG=chromium-os:17976
TEST=boot a recovery image, and leave it unattended for ~20 min.

Change-Id: I9ea2411932432afcc10988d732f2e6d3ce38c985
Reviewed-on: http://gerrit.chromium.org/gerrit/4504
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
3 years agoinitramfs: fix ARM recovery root device detection
Hung-Te Lin [Wed, 20 Jul 2011 14:23:42 +0000 (22:23 +0800)]
initramfs: fix ARM recovery root device detection

ARM device has two numbers in device name (mmcblk0p1) and the shell script
substitution should use '%' instead of '%%' otherwise the result would be
'mmcblk' (which is supposed to be 'mmcblk0p')

BUG=chromium-os:13155
TEST=none because booting initramfs on ARM is not ready yet

Change-Id: Ic58051466b01dca37600306cf0dc92b7efb0bc5d
Reviewed-on: http://gerrit.chromium.org/gerrit/4400
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
3 years agorecovery: reboot after the user removes the recovery media
J. Richard Barnette [Wed, 20 Jul 2011 00:10:30 +0000 (17:10 -0700)]
recovery: reboot after the user removes the recovery media

BUG=chromium-os:17387
TEST=build and boot a recovery image

Change-Id: Ibcf72a4d32ef0f96feccb5abef80e5729f434a2f
Reviewed-on: http://gerrit.chromium.org/gerrit/4360
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
3 years agoinitramfs/factory_init: log installation source media (USB) into lsb-factory 780.B
Hung-Te Lin [Tue, 12 Jul 2011 12:52:02 +0000 (20:52 +0800)]
initramfs/factory_init: log installation source media (USB) into lsb-factory

To support installing from USB shim itself instead of network, factory installer
needs to know where the source media (USB install shim) is.

This CL logs REAL_USB_DEV into /mnt/stateful_partition/etc/lsb-factory so that
factory_installer/factory_install.sh can use findLSBValue to find out the source
media.

BUG=chrome-os-partner:4108
TEST=build_image --factory_install
     # then boot with new factory shim, seeing REAL_USB_DEV in /mnt/.../etc/lsb-factory.

Change-Id: I75e860ca6478c2dc43783671377c72632d12d225
Reviewed-on: http://gerrit.chromium.org/gerrit/3935
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agorecovery: fix destination name and detect if it's invalid.
Hung-Te Lin [Mon, 11 Jul 2011 07:24:41 +0000 (15:24 +0800)]
recovery: fix destination name and detect if it's invalid.

We should abort the recovery process if source media (USB recovery shim) and
destination (SSD) is the same (i.e., SSD was not detected).

This CL also fixed the generation and usage of destination device for ARM
platform.

BUG=chromium-os:13155,chrome-os-partner:4864
TEST=(1) on zgb, boot recovery shim. works fine. reboot and verify image is installed.
     (2) remove SSD and boot recovery shim again. get failure as expected.

Change-Id: Ic14a88fe8fed44f10e724183e552e3350aada5b6
Reviewed-on: http://gerrit.chromium.org/gerrit/3846
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agoUse PNG image files in place of message text
J. Richard Barnette [Thu, 9 Jun 2011 17:14:23 +0000 (10:14 -0700)]
Use PNG image files in place of message text

The only available message texts are still US English; there are no
localized translations.

BUG=chromium-os:13240
TEST=boot factory image; boot recovery image w/ dev switch on and off

Change-Id: I5b21416bda433995a50e586ec754572fc706fc37
Reviewed-on: http://gerrit.chromium.org/gerrit/3058
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
3 years agoSuppress error message from tpmc startup
Luigi Semenzato [Wed, 29 Jun 2011 00:51:57 +0000 (17:51 -0700)]
Suppress error message from tpmc startup

BUG=chromium-os:12468
TEST=run in recovery mode, note that message about error 0x26 (invalid postinit) has disappeared

Change-Id: Id76267f1fc0105ef6d55be16cc22001a2e976629
Reviewed-on: http://gerrit.chromium.org/gerrit/3195
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
3 years agoUse move_mounts for factory only, and not recovery.
J. Richard Barnette [Thu, 16 Jun 2011 20:51:18 +0000 (13:51 -0700)]
Use move_mounts for factory only, and not recovery.

Move 'move_mounts' into factory_init.sh, and delete 'unmove_mounts'.
For recovery, replace 'move_mounts' and 'unmove_mounts' with new
setup/cleanup functions that use '-o bind' in place of '-o move'.

BUG=chromium-os:13240
TEST=Boot recovery and factory images built from this change

Change-Id: I4730b96e13aadf707387be61ea78ee7831f064d8
Reviewed-on: http://gerrit.chromium.org/gerrit/2785
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
3 years agoEliminate the 2-minute wait after recovery install completion.
J. Richard Barnette [Tue, 21 Jun 2011 00:09:58 +0000 (17:09 -0700)]
Eliminate the 2-minute wait after recovery install completion.

Previously, when recovery installation completed, the system would
reboot after a 2 minute delay.  The two minute delay was used solely
to allow time to examine the debug output on VT2 and VT3, and was
otherwise a waste of valuable user time.  This change reduces the
2-minute delay to 10 seconds, just long enough to let the user know
to expect the reboot.

To allow for debug, if the user is not watching VT1 when recovery
completes (something normally only a developer would do), then
reboot is delayed with a 1-day sleep.

BUG=None
TEST=during recovery, switch to VT2; observe the new behavior
TEST=during recovery, don't switch VT; observe a 10 second delay

Change-Id: Id3ab56e1ff0c2dbd5717d98cbd99db443bbc30e3
Reviewed-on: http://gerrit.chromium.org/gerrit/2911
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
3 years agoMake it easy to provide and save multiple log files
J. Richard Barnette [Thu, 16 Jun 2011 21:18:41 +0000 (14:18 -0700)]
Make it easy to provide and save multiple log files

This change is meant to simplify certain debug use cases

BUG=None
TEST=extract log from recovery install USB disk after successful recovery

Change-Id: I154438af7b904d856c00f7654e836f292dc3ada9
Reviewed-on: http://gerrit.chromium.org/gerrit/2788
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
3 years agoAdd rollback check to recovery install
Gaurav Shah [Fri, 20 May 2011 01:27:29 +0000 (18:27 -0700)]
Add rollback check to recovery install

Check if the kernel version being installed is older than what is stored in the
TPM NVRAM. If older, refuse to install.

BUG=chrome-os-partner:3309
TEST=see below

1) Build ZGB recovery image with v2 keys. Installed image. Tries a ZGB recovery
   image with v1 key signed image. Recovery image succesfully fails. :-)
2) Similar test on a Mario device.
3) Similar test on an Alex device.
4) Recovery works fine on a non-Chrome OS firmware device. (legacy boot path)

Check that while in developer mode, an older image still installs but displays
the 5-second bad recovery image warning message.

Finally, also made sure that a newer recovery image (with higher version keys)
also installs succesfully.

Change-Id: Iab755c79896ddeaa92861a4596aaede484708da8
Reviewed-on: http://gerrit.chromium.org/gerrit/1230
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
3 years agoMount debugfs in initramfs
Nick Sanders [Fri, 3 Jun 2011 08:54:43 +0000 (01:54 -0700)]
Mount debugfs in initramfs

Crossystem references chromeos_arm in debugfs,
so crossystem checks fail without this.

BUG=chromium-os:16102
TEST=run recovery - failure mode changes.

Change-Id: I730a964c316e840bafd1c254d4d5dac3ce03c039
Reviewed-on: http://gerrit.chromium.org/gerrit/2029
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
3 years agoRefactor messages for i18n 0.13.558.B
J. Richard Barnette [Mon, 16 May 2011 21:35:01 +0000 (14:35 -0700)]
Refactor messages for i18n

BUG=chromium-os:13240
TEST=Recovery image with the dev switch off (image keys match firmware keys)
TEST=Recovery image with the dev switch on (image keys match firmware keys)
TEST=Recovery image with the dev switch on (with 5 minute wait for key change)
TEST=Recovery image on non-chrome hardware (Eee PC)
TEST=Factory install shim

Change-Id: Iac0d033eec6a47c5296c226e7e8528113a463ccb
Reviewed-on: http://gerrit.chromium.org/gerrit/1082
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agoSplit initramfs /init script into smaller parts. 0.13.509.B
J. Richard Barnette [Thu, 5 May 2011 23:11:46 +0000 (16:11 -0700)]
Split initramfs /init script into smaller parts.

Functions specific to recovery and factory images are now in their own
separate files.

BUG=chromium-os:13240
TEST=boot recovery and factory install images from USB

Change-Id: I4b1524a2f79fe7fdfb4cce18726a5203cf7c57ac
Reviewed-on: http://gerrit.chromium.org/gerrit/402
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
3 years agouse crossystem for developer mode and nonchrome detection 0.12.362.B 0.12.369.B 0.12.392.B 0.12.433.B 0.12.433.B109 0.12.433.B62 0.13.434.B
Will Drewry [Wed, 23 Mar 2011 18:46:10 +0000 (13:46 -0500)]
use crossystem for developer mode and nonchrome detection

Adds crossystem use for developer mode detection and nonchrome detection.
[This allows systems with missing or damaged TPMs or bad firmware to
 go through recovery as nonchrome systems.]

(testing in progress)
TEST=create a devkeys x86-alex image, boot it and install it in both modes
     same thing for x86-mario
     boot x86-mario, goto a shell, run crossystem mainfw_act to ensure it never says nonchrome
     again for a nonchrome system
BUG=chromium-os:13399,chromium-os:8762

Change-Id: I538fe37fbed29537132da15c844b75ce726634bf

R=gauravsh@chromium.org

Review URL: http://codereview.chromium.org/6724018

3 years agoRemove dev shim support from initramfs.
Gaurav Shah [Mon, 14 Mar 2011 18:38:38 +0000 (11:38 -0700)]
Remove dev shim support from initramfs.

Change-Id: If87096af6007b629d80de41eb2312ed9819da597

BUG=chromium-os:12961
TEST= built a PVT signed recovery image, made sure it installs. Then built a PVT dev install image using the PVT recovery kernel, made sure it installed properly.

Review URL: http://codereview.chromium.org/6658025

3 years agoJust regular mount 0.11.241.B 11.1.241.B
Nick Sanders [Sat, 5 Mar 2011 05:31:25 +0000 (21:31 -0800)]
Just regular mount

* Something in log saving, or buildbot, or image_to_usb
damages the filesystem on /dev/sdb1. So opening it readonly
may fail.

BUG=chrome-os-partner:2422
TEST=run through install shim, success.

Change-Id: I0d90d0f17ba109c53dde4a328ac0acaa04896055

Review URL: http://codereview.chromium.org/6626034

3 years agoBetter error reporting on lsb-factory copy
Nick Sanders [Thu, 3 Mar 2011 19:21:43 +0000 (11:21 -0800)]
Better error reporting on lsb-factory copy

BUG=chrome-os-partner:2242
TEST=ran OK, also reported corrupted sdb1 correctly

Change-Id: Ic546ce6c1b50cc7e25f140c6c8cd1e59d6be979d

Review URL: http://codereview.chromium.org/6596099

3 years agoinit: enable UUID-based official root filesystems
Will Drewry [Mon, 28 Feb 2011 22:28:34 +0000 (16:28 -0600)]
init: enable UUID-based official root filesystems

During setup of an official root filesystem, the dm-verity arguments are
checked to assure the system that it is mounting an authenticated filesystem.
It was doing so by doing a substitution test on the dm="..." kernel argument.
The substition test was against the known USB device and not by the kernel
partition GUID which is now used by the dm argument.

This change adds support for checking for the kernel guid first and then the
USB block device.  In the future, it should only check the UUID and it should
validate the entire argument, UUID+number, using cgpt find.

BUG=chromium-os:12544
TEST=in progress.  Building for a devkeys machine and will see if it finds the correct root.

Change-Id: I8c450c205833d928372b28c1848009a95cc804e7

Review URL: http://codereview.chromium.org/6592046

3 years agoMove initramfs init
Nick Sanders [Sat, 29 Jan 2011 01:39:55 +0000 (17:39 -0800)]
Move initramfs init

* keep cros_workon available for initramfs

BUG=n0
TEST=builds ok

Change-Id: I10f785f422622e085e159747a232c9437880a905

Review URL: http://codereview.chromium.org/6320023

4 years agoinit repo
Colin Chow [Thu, 8 Jul 2010 23:02:56 +0000 (16:02 -0700)]
init repo