chromiumos/platform/factory_installer.git
14 months agofactory_install: Change flashrom target selection parameters. 20/66320/2 master
Hung-Te Lin [Tue, 20 Aug 2013 07:04:21 +0000 (15:04 +0800)]
factory_install: Change flashrom target selection parameters.

The "-p internal:bus=*" is deprecated by "-p host" and "-p ec" syntax,
especially that now EC may by connected by SPI bus.

BUG=none
TEST=Try to reset device and see flashrom results correctly.

Change-Id: Ibc6e83aae1492a7fd3b6df8da406a062192b74a5
Reviewed-on: https://gerrit.chromium.org/gerrit/66320
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>

14 months agoChange firmware update option in release only mode 53/65553/3 release-R30-4537.B
Chun-Yen Ho [Mon, 12 Aug 2013 06:51:44 +0000 (14:51 +0800)]
Change firmware update option in release only mode

In release only mode, we need to run firmware update in --mode=recovery
instead of --nide=factory_install.

BUG=chrome-os-partner:20735
TEST=Script Run Succeed

Change-Id: I026e3ac6c0f65c4adb2cf23b360d42b4b84670ce
Reviewed-on: https://gerrit.chromium.org/gerrit/65553
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
14 months agoTurn off developer switch in release only mode 52/65552/6
Chun-Yen Ho [Mon, 12 Aug 2013 06:42:01 +0000 (14:42 +0800)]
Turn off developer switch in release only mode

In release only mode, we want to leave developer mode after the install
procedure. A function is added for this purpose.

BUG=chrome-os-partner:20735
TEST=Script Run Succeed

Change-Id: I0aeae3024f396a2e9223837016498c11bc9b2871
Reviewed-on: https://gerrit.chromium.org/gerrit/65552
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
14 months agoMake au_downloader runnable without install script 35/64735/12
Chun-Yen Ho [Tue, 6 Aug 2013 06:17:25 +0000 (14:17 +0800)]
Make au_downloader runnable without install script

Add procedure to prepare disk to the au_download program to make it
an individually runnable installation procedure.

BUG=chrome-os-partner:21447
TEST=Run on Link machine succeed.

Change-Id: Ifccdbd17eb64610af5822122d98850582bba5656
Reviewed-on: https://gerrit.chromium.org/gerrit/64735
Commit-Queue: Chun-Yen Ho <chho@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
Reviewed-by: Chun-Yen Ho <chho@chromium.org>
14 months agoAdd a program for install without miniomaha server 96/63696/22
Chun-Yen Ho [Tue, 30 Jul 2013 03:12:17 +0000 (11:12 +0800)]
Add a program for install without miniomaha server

Add a c++ program for automatic download and install recovery image
from recovery image server. This will be later use as an option when
inserting usb with factory install shim.

ebuild will later be changed to move this program to /use/sbin.

BUG=chrome-os-partner:21447
TEST=successfully run on a link machine

Change-Id: I3ebca9f60df88f0e6467c77ac87054f62e284004
Reviewed-on: https://gerrit.chromium.org/gerrit/63696
Reviewed-by: Chun-Yen Ho <chho@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>

14 months agoIgnore the return value from wget 03/65103/2
Chun-Yen Ho [Thu, 8 Aug 2013 02:10:11 +0000 (10:10 +0800)]
Ignore the return value from wget

Ignore the return value from wget so to avoid the incompatible issue of
new install script and old miniomaha server.

BUG=chrome-os-partner:21700
TEST=None

Change-Id: I878769a4dce2d7cb505c9e279a531861502402ea
Reviewed-on: https://gerrit.chromium.org/gerrit/65103
Tested-by: Chun-Yen Ho <chho@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>

14 months agoAdd an empty makefile for ebuild to work correctly 61/64761/3
Chun-Yen Ho [Tue, 6 Aug 2013 08:59:19 +0000 (16:59 +0800)]
Add an empty makefile for ebuild to work correctly

Add an empty makefile so that the new ebuild for factory install could
work correctly.

BUG=chrome-os-partner:21447
TEST=Compile succeed.

Change-Id: I5b00fa7c5ebf94e32c85e377c17a996d59c300b3
Reviewed-on: https://gerrit.chromium.org/gerrit/64761
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@chromium.org>

14 months agoAllow factory install shim run without uuidgen 64/64764/4 stabilize-4512.B
Chun-Yen Ho [Tue, 6 Aug 2013 09:41:21 +0000 (17:41 +0800)]
Allow factory install shim run without uuidgen

Since there are some boards does not have uuidgen, the script is
modified so that uuidgen become optional.

BUG=chrome-os-partner:21700
TEST=None

Change-Id: If7b17ca581f09f4f6524aec8b89e007e973baa1b
Reviewed-on: https://gerrit.chromium.org/gerrit/64764
Commit-Queue: Chun-Yen Ho <chho@chromium.org>
Tested-by: Chun-Yen Ho <chho@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
15 months agoSay hello and goodbye to miniomaha server 52/62452/8 factory-pit-4471.B firmware-pit-4482.B
Chun-Yen Ho [Thu, 18 Jul 2013 06:03:38 +0000 (14:03 +0800)]
Say hello and goodbye to miniomaha server

Send an signal to miniomaha server by wget to indicate the start and the
end of each download session

BUG=chrome-os-partner:20735
TEST=Successfully tested on a link machine

Change-Id: Iec990fa1de66b45efcadaef1b5b5993e6eca6fb4
Reviewed-on: https://gerrit.chromium.org/gerrit/62452
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chun-Yen Ho <chho@google.com>
Commit-Queue: Chun-Yen Ho <chho@google.com>

15 months agoEnable install without factory test image 03/61003/4 factory-pit-4390.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B stabilize-4443.B
ChromeOS Developer [Thu, 4 Jul 2013 08:15:17 +0000 (16:15 +0800)]
Enable install without factory test image

Edit factory_install.sh so that the script will check lsb-factory for
RELEASE_ONLY flag. If the flag is set, the script will skip factory
image, and only install release image.

BUG=chrome-os-partner:20703
TEST=Finished a complete mini-omaha install process

Change-Id: If17484e01333445d9bb52c939036dd0bae1eeed3
Reviewed-on: https://gerrit.chromium.org/gerrit/61003
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Chun-Yen Ho <chho@google.com>
Tested-by: Chun-Yen Ho <chho@google.com>
16 months agoShow ETA and percentage for disk wipe 40/58040/2 factory-4290.B factory-pit-4280.B release-R29-4319.B stabilize-4255.B stabilize-4287.B
Vic Yang [Mon, 10 Jun 2013 03:27:51 +0000 (11:27 +0800)]
Show ETA and percentage for disk wipe

So that the operators know better of when disk wipe will end.

Also, only check for the existence of the disk for disk wipe. Checking
stateful partition would prevent us from wiping a partially wiped disk.

BUG=chrome-os-partner:19916
TEST=Wipe a partially wiped disk and see percentage and ETA.

Change-Id: Iff679eea8247b0df6e7353ef26c9626457fc55a1
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58040
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
16 months agoAdd option to wipe the entire disk with a reset shim 97/57897/7
Vic Yang [Fri, 7 Jun 2013 05:58:47 +0000 (13:58 +0800)]
Add option to wipe the entire disk with a reset shim

When booted with a reset shim, the user can press Ctrl-W and then Ctrl-Y
to wipe the whole disk clean. This will result in the internal disk
overwritten with 0x00.

BUG=chrome-os-partner:19916
TEST=Boot with reset shim, press Ctrl-W, wait for 15 seconds and then
press Ctrl-Y. Nothing happens.
TEST=Boot with reset shim, press Ctrl-R. See factory reset performed.
TEST=Boot with reset shim, press Ctrl-W and then Ctrl-Y. Wait for it to
wipe the disk. Boot with a test image, check the content of /dev/mmcblk0
is all zero.

Change-Id: I5907d3e75542e397a8790a6ed3a68a0c66a2f070
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/57897

17 months agoFix download configuration with comments 51/55751/2
Rong Chang [Mon, 20 May 2013 13:30:18 +0000 (21:30 +0800)]
Fix download configuration with comments

BUG=none
TEST=manual
  setup download conf file with comments '# ...'
  start shopfloord and do network boot, network install

Change-Id: I7b221bcddfc45c1d2af943fb2238e8765025b928
Reviewed-on: https://gerrit.chromium.org/gerrit/55751
Commit-Queue: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
17 months agoCHERRY-PICK: Add sync before umount to ensure lsb-factory is written 63/50763/2 factory-4128.B
Cheng-Yi Chiang [Sun, 31 Mar 2013 03:16:21 +0000 (11:16 +0800)]
CHERRY-PICK: Add sync before umount to ensure lsb-factory is written

BUG=chrome-os-partner:18488
TEST=run install process

Original Change-Id: If1614ba87cb245c4645085a14ca4a9e19883bef4
Original Reviewed-on: https://gerrit.chromium.org/gerrit/46972
Original Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Original Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Original Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
(cherry picked from commit 928c273d6b49dbf8ccfd1ea740afd93699cbe64d)

Change-Id: I8f41a93e6c6bc009a6a3e09827164c2401efadfe
Reviewed-on: https://gerrit.chromium.org/gerrit/50763
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
17 months agoEnable shopfloor install 53/50253/2 release-R28-4100.B stabilize-4100.38.B stabilize-spring-4100.53.B toolchainB
Rong Chang [Sat, 20 Apr 2013 04:57:38 +0000 (12:57 +0800)]
Enable shopfloor install

CQ-DEPEND=CL:50252
BUG=chrome-os-partner:17947
TEST=manual

Original-Change-Id: I804846a815896b60f206d3300657b0bfc23609ea
Reviewed-on: https://gerrit.chromium.org/gerrit/48747
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
(cherry picked from commit 33afe09218b1c33f7db285957a4d8760aa114dc5)

Original-Change-Id: Iaa93360d0dba1a46a704de13375fe68e3f843f55
Reviewed-on: https://gerrit.chromium.org/gerrit/48767
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
(cherry picked from commit 56ed0d757e6e2f81101478baf5cc286e7ddcebfc)

Change-Id: I9a580f3ceba0096f3852bbd107cbb72c7cbe09bf
Reviewed-on: https://gerrit.chromium.org/gerrit/50253
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
18 months agoConfig TTY on startup 94/48194/3 stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B
Vic Yang [Tue, 16 Apr 2013 03:23:45 +0000 (11:23 +0800)]
Config TTY on startup

When a device boots with factory install shim, the default TTY
configuration has output post processing disabled. This results in
missing carriage return.

This change adds a step in factory install script to configure TTY
properly.

BUG=chrome-os-partner:18376
TEST=Boot factory install shim and netboot image, and see screen output
is fine.

Change-Id: I39d7ae0898b2bf3f63df39eee46941aa46bd7f03
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48194
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
18 months agofactory_install: Abort on failure when clearing TPM. 22/47222/2
Hung-Te Lin [Wed, 3 Apr 2013 04:50:18 +0000 (12:50 +0800)]
factory_install: Abort on failure when clearing TPM.

We need to abort factory installation if any TPM clear command fails.
Putting clear_tpm inside "if" clause will prohibit the "set -e" behavior (exit
on failure), so we should invoke clear_tpm directly.

BUG=chrome-os-partner:18525
TEST=build_image factory_install;
     boot image and see "TPM cleared" message correctly.

Change-Id: I6dbe60321e1e160da1a9c48a9554e7674c605ccb
Reviewed-on: https://gerrit.chromium.org/gerrit/47222
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>

20 months agoubershopfloor: ping shopfloor server and fetch channels 99/43699/8 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 toolchainA
Rong Chang [Thu, 21 Feb 2013 04:10:55 +0000 (12:10 +0800)]
ubershopfloor: ping shopfloor server and fetch channels

ping_shopfloor function fetches board configuration from shopfloor
resources folder. The channel info are return through stdout and can be
parsed with shell eval.

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

Change-Id: Ib983acbb4ee54e146caf50e729b93311e5f2e0fd
Reviewed-on: https://gerrit.chromium.org/gerrit/43699
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
20 months agoLoad USB Ethernet drivers 02/42102/5 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 [Mon, 28 Jan 2013 06:26:30 +0000 (14:26 +0800)]
Load USB Ethernet drivers

When bringing up network, try to load kernel modules for USB Ethernet.
To avoid kernel module loading restriction, lsm.module_locking=0 should
be included in kernel command line.

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

Change-Id: I4160a3d5402311e65b9f0907673a0a7fe931f09f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42102
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
20 months agoHandle HWID and firmware updater for initramfs network boot 90/42090/5
Vic Yang [Thu, 24 Jan 2013 16:24:24 +0000 (00:24 +0800)]
Handle HWID and firmware updater for initramfs network boot

For initramfs network boot, the environment is minimal. Thus, we are
going to chroot into the installed environment and run firmware updater
and HWID updater there. This not only provides a full environment for
the updaters, but also makes them independent of initramfs environment.

BUG=chrome-os-partner:17368
TEST=Network boot and install with HWID bundle and firmware updater.

Change-Id: I235f8852737262157bdb7ce08611f65cad96c135
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42090
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
21 months agoModify factory install script to suit initramfs 09/41909/4
Vic Yang [Tue, 22 Jan 2013 09:23:38 +0000 (17:23 +0800)]
Modify factory install script to suit initramfs

The environment in initramfs is a bit different than when booted off USB
or initrd. Some modifications are needed:
  - Bring up network by udhcpc as there is no upstart job
  - Use mktemp without --tmpdir

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

Change-Id: Ida6b1ab2883cb5b1d07bad17dd96adc6283c47ca
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41909
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
21 months agoLoad i2c-dev module before starting factory install 84/40584/2
Vic Yang [Tue, 8 Jan 2013 04:29:47 +0000 (12:29 +0800)]
Load i2c-dev module before starting factory install

On devices with EC on I2C bus, we need i2c-dev to install EC firmware.
Sometimes, the module is not loaded automatically, so let's try to load
the module before starting factory install.

BUG=chrome-os-partner:17123
TEST=Install on Spring.

Change-Id: I311ce06bf83ae48f7fb57660186ced6659ee6dde
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40584
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
22 months agoCheck netboot using kernel cmdline argument 'cros_netboot' 60/39460/3 release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 toolchain-3428.65.B
cychiang [Mon, 8 Oct 2012 08:02:14 +0000 (16:02 +0800)]
Check netboot using kernel cmdline argument 'cros_netboot'

We can check bootarg by checking kernel cmdline for cros_netboot flag.

BUG=chrome-os-partner:16705
TEST=build install shim and run netboot firmware on link with kernel
cmdline argument 'cros_netboot'. Can install factory package properly.

Change-Id: I414baa082303c8af024f2ccfc72b90cb6f0710a6
Reviewed-on: https://gerrit.chromium.org/gerrit/39460
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
23 months agofactory_install: Disable checking WP before clearing TPM. stabilize2
Hung-Te Lin [Mon, 5 Nov 2012 03:57:42 +0000 (11:57 +0800)]
factory_install: Disable checking WP before clearing TPM.

More and more devices won't have physical WP switch that can be easily toggled.
After reviewed in http://crosbug.com/p/15795 , it seems like having physical
presence (i.e, developer switch and recovery button) is enough for clearing TPM.

BUG=chrome-os-partner:15795
TEST=build_image factory_install

Change-Id: Iec7fcbd4fe104833c11e3461a18741e9eb2ba14a
Reviewed-on: https://gerrit.chromium.org/gerrit/37337
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agoChange factory_install to use new partitioning system factory-2993.B
Liam McLoughlin [Wed, 26 Sep 2012 12:20:12 +0000 (12:20 +0000)]
Change factory_install to use new partitioning system

BUG=none
TEST=Run full factory install process

Change-Id: I77fb266b43fb255d7e9465bf35302e3e0e07c162
Reviewed-on: https://gerrit.chromium.org/gerrit/34104
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2 years agofactory_install: Detect virtual developer switches. factory-2846.B factory-2848.B factory-2914.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 release-R22-2723.B release-R23-2913.B stabilize stabilize-daisy stabilize-link stabilize-link-2913.278
Hung-Te Lin [Thu, 26 Jul 2012 08:10:02 +0000 (16:10 +0800)]
factory_install: Detect virtual developer switches.

"crossystem vdat_flags" is the better & portable way to find out developer
switch state.

BUG=chromium-os:32836
TEST=Manual.

Change-Id: I38f4b5bc590e59b1bedb5aa919479e3f09e90e36
Reviewed-on: https://gerrit.chromium.org/gerrit/28480
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 agoAllow hotkey to invoke factory reset.
Chinyue Chen [Tue, 24 Jul 2012 08:57:52 +0000 (16:57 +0800)]
Allow hotkey to invoke factory reset.

Use Ctrl-R on devices without physical developer switch to invoke
factory reset.

BUG=chrome-os-partner:11424
TEST=Manual.

Change-Id: I2ae11a81c4304b9ad58a23b1745c8ea434bf9784
Reviewed-on: https://gerrit.chromium.org/gerrit/28253
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
2 years agofactory_install: Fix RMA installation for new ext4 stateful partition. factory-2368.B factory-2394.B factory-2475.B factory-2569.B firmware-link-2348.B release-R21-2465.B
Hung-Te Lin [Thu, 24 May 2012 06:09:05 +0000 (14:09 +0800)]
factory_install: Fix RMA installation for new ext4 stateful partition.

BUG=chrome-os-partner:9931
TEST=none, RMA flow will validate.

Change-Id: I75f4e03298cdb927669c03c25cef389a4ef6f909
Reviewed-on: https://gerrit.chromium.org/gerrit/23473
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
2 years agofactory_install: Fix sync timing issue on partition reloading. factory-2305.B
Hung-Te Lin [Mon, 14 May 2012 09:04:45 +0000 (17:04 +0800)]
factory_install: Fix sync timing issue on partition reloading.

Calling "sync" may need some extra time to schedule a sync system call.
We should leave some seconds before reloading partition table.

BUG=chrome-os-partner:9610
TEST=(x86) Zero /dev/sda, reboot, restart and completed factory install.

Change-Id: I449e9d62ac9f17850842025a1a210b8ff7c3a74c
Reviewed-on: https://gerrit.chromium.org/gerrit/22568
Tested-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
2 years agoSkip resetting device when network booting release-R20-2268.B
Vic Yang [Mon, 7 May 2012 03:22:35 +0000 (11:22 +0800)]
Skip resetting device when network booting

If we are network booting, we don't have initialized TPM. Skipping
resetting device.

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

Change-Id: Ic965601fa7599ac5d4db8053250f8f2c5d192b1a
Reviewed-on: https://gerrit.chromium.org/gerrit/21948
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2 years ago[factory_installer] add OWNERS
Elly Jones [Fri, 6 Apr 2012 19:10:17 +0000 (15:10 -0400)]
[factory_installer] add OWNERS

TEST=None
BUG=chromium-os:22007

Change-Id: Idedebc610065fcff5d3fdb59eeb8bd3f7e002326
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19768
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2 years agofactory_install: Save Omaha server URL into /usr/local/etc/lsb-factory release-R18-1660.B release-R19-2046.B
Hung-Te Lin [Fri, 30 Dec 2011 14:18:09 +0000 (22:18 +0800)]
factory_install: Save Omaha server URL into /usr/local/etc/lsb-factory

To help integrating shop floor system (and any other system using mini-omaha
server) into factory flow, we should always record Omaha server URL after
factory installation.

BUG=chrome-os-partner:6911
TEST=Manually performed factory installation and found FACTORY_OMAHA_URL in
     /usr/local/etc/lsb-factory on DUT.

Change-Id: I233fddd0e7b8f9a788a5d553bca65e49a7c07052
Reviewed-on: https://gerrit.chromium.org/gerrit/13559
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 years agofactory_install: Clear NVData in factory installtion.
Hung-Te Lin [Fri, 16 Dec 2011 05:00:48 +0000 (13:00 +0800)]
factory_install: Clear NVData in factory installtion.

When running factory setup, we must clear ChromeOS related cookies
stored in NVData (usually part of NVRAM), including recovery_request and other
flags.

BUG=chrome-os-partner:6990
TEST=Install factory shim; see message "Clearing NVData."

Change-Id: I98414999a4c6dd0c3d64a00a5dd921bc03f532af
Reviewed-on: https://gerrit.chromium.org/gerrit/13077
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 years agoUse ext4 format for stateful partition release-R17-1412.B
Paul Taysom [Fri, 4 Nov 2011 17:18:52 +0000 (10:18 -0700)]
Use ext4 format for stateful partition

This is final step in ext4 conversion. We have been running with
the ext4 file system but ext3 format for several weeks. This changes
uses the ext4 format for the stateful partition.

BUG=chromium-os:20012
TEST=Ran ext4 on all platforms

Change-Id: Ib478d9f09641d4ab942f0b326d2d2238131be6e0
Reviewed-on: https://gerrit.chromium.org/gerrit/11219
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Paul Taysom <taysom@google.com>
Commit-Ready: Paul Taysom <taysom@google.com>

2 years agoIf console is a serial port, send output to it rather than tty1.
Jon Salz [Mon, 7 Nov 2011 10:08:01 +0000 (18:08 +0800)]
If console is a serial port, send output to it rather than tty1.

BUG=chrome-os-partner:6534
TEST=Tested by in-progress factory VM tests

Change-Id: I717c2e07d3a3dc1698787fb14ec8e5aa6bb4763d
Reviewed-on: https://gerrit.chromium.org/gerrit/11260
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

2 years agoImprove EC flash presence check
Hung-Te Lin [Wed, 16 Nov 2011 12:05:39 +0000 (20:05 +0800)]
Improve EC flash presence check

Some systems (ex, ARM) do have EC (mosys ec info) without programmable EC flash.
We need to prevent reading EC flash on those systems.

BUG=chrome-os-partner:6783
TEST=(on system without EC) boot factory install shim and seeing "No EC" messages
     (on system with EC) boot factory install shim and see EC presence

Change-Id: I8ab0a5a275e2b4804f32816bb3945afcb2b31ff7
Reviewed-on: https://gerrit.chromium.org/gerrit/11763
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agoAdd check for EC presence
David Hendricks [Wed, 9 Nov 2011 22:31:16 +0000 (14:31 -0800)]
Add check for EC presence

This patch adds a check for EC presence by using the "mosys ec info"
command. If the EC is not present, then skip any operation that
updates EC firmware ROM (e.g. all "flashrom -p internal:bus=lpc" call sites)

BUG=chrome-os-partner:6783
TEST=Tested on stumpy

Change-Id: I1ffbf035d61309e42d7f6687ab910341c372883e
Reviewed-on: https://gerrit.chromium.org/gerrit/11422
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
3 years agofactory_install: Check main/EC write protection consistency only after clearing TPM firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-R16-1193.B
Hung-Te Lin [Fri, 23 Sep 2011 04:42:10 +0000 (12:42 +0800)]
factory_install: Check main/EC write protection consistency only after clearing TPM

For devices that needs clearing TPM and using factory install shim for that,
they may only disabled BIOS write protection and keep EC protected.

BUG=chrome-os-partner:5851
TEST=(1) get an Alex with bios WP=off, ec WP=on
     (2) boot with factory install shim
     (3) Seeing TPM cleared message

Change-Id: I887d6ff56e917349843053c999cace4b9abb525b
Reviewed-on: http://gerrit.chromium.org/gerrit/8187
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agofactory_install: remove run_as_root flag
Elly Jones [Fri, 16 Sep 2011 14:23:35 +0000 (10:23 -0400)]
factory_install: remove run_as_root flag

BUG=chromium-os:6136
TEST=None

Change-Id: I5ac3c10fbeb6ccd4cbafe30931cf29cdd24f8adc
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7854
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
3 years agofactory_install: ensure main(BIOS) and EC write protection status are consistent factory-1020.B release-1011.B
Hung-Te Lin [Mon, 5 Sep 2011 09:21:21 +0000 (17:21 +0800)]
factory_install: ensure main(BIOS) and EC write protection status are consistent

In factory setup / RMA stage with "WP enabled", we must ensure Main(BIOS)/EC WP
status are consist otherwise chromeos-firmwareupdate would fail.

BUG=chrome-os-partner:5851
TEST=(1) disable hardware write protection switch
     (2) sudo flashrom --wp-enable -p internal:bus=lpc
         sudo flashrom --wp-disable -p internal:bus=spi
     (3) enable hardware write protection switch
     (4) start factory installer
     Factory installer stopped with error message:
     ERROR: Inconsist firmware write protection status: main=enabled, ec=disabled.
            Please disable Hardware Write Protection and restart again.

Change-Id: Ia08721f657c558c72b80dca4915beb5150e20d6d
Reviewed-on: http://gerrit.chromium.org/gerrit/7253
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agoPrint overrides from board overlay factory-980.B firmware-881-u-boot-v1 firmware-u-boot-v1 test-982.B
Nick Sanders [Thu, 11 Aug 2011 04:08:58 +0000 (21:08 -0700)]
Print overrides from board overlay

BUG=chrome-os-partner:5416
TEST=run on system, view log and pause

Change-Id: I0c864503ab39397a61d59be8ef891ec19cf8ed2b
Reviewed-on: http://gerrit.chromium.org/gerrit/5708
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
3 years agoAllow overrides set from private overlay
Nick Sanders [Wed, 10 Aug 2011 10:01:03 +0000 (03:01 -0700)]
Allow overrides set from private overlay

* chromeos-bsp-[board] can provide "board_customize_install.sh"

BUG=chrome-os-partner:5416
TEST=not yet

Change-Id: Ib54b4e828908cff14c88be36818419fb128fe9b7
Reviewed-on: http://gerrit.chromium.org/gerrit/5645
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
3 years agofactory_install: force mounting with ext2 before running postinst
Hung-Te Lin [Tue, 9 Aug 2011 18:24:30 +0000 (02:24 +0800)]
factory_install: force mounting with ext2 before running postinst

ext4 mounts on the ext2 fs can cause a superblock write w/ our existing clients.

BUG=chrome-os-partner:3940,chromium-os:11509
TEST=none, next factory bundle will verify

Change-Id: I4cf13c6ba36ee7056c2a79d707149dda3cb5b07d
Reviewed-on: http://gerrit.chromium.org/gerrit/5572
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
3 years agofactory_install: fix RMA (usb-install mode) on ARM platform
Hung-Te Lin [Mon, 8 Aug 2011 10:35:50 +0000 (18:35 +0800)]
factory_install: fix RMA (usb-install mode) on ARM platform

Platforms like ARM does not use initramfs so we need to handle such case.

BUG=chrome-os-partner:4108
TEST=make RMA shim, and boot factory install shim on ARM platform

Change-Id: I40647d64fb17115d91b4c7629533ec401c17fda0
Reviewed-on: http://gerrit.chromium.org/gerrit/5457
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
3 years agoRename omahaserverip to omahaserver 0.14.811.B
Nick Sanders [Mon, 25 Jul 2011 21:54:27 +0000 (14:54 -0700)]
Rename omahaserverip to omahaserver

Refactor time check and URL generation.

BUG=chromium-os:18054
TEST=omaha an image

Change-Id: Ic96e2594a38464c4e15eefbb109d1202c60aaadc
Reviewed-on: http://gerrit.chromium.org/gerrit/4680
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
3 years agofactory_install: support RW firmware updating from stateful partition in USB-mode
Hung-Te Lin [Thu, 21 Jul 2011 17:45:45 +0000 (01:45 +0800)]
factory_install: support RW firmware updating from stateful partition in USB-mode

FACTORY_INSTALL_FIRMWARE in lsb-factory can be used to assign a different source
for firmware updating, instead of release rootfs.

RW-only updating is also supported by running --mode=recovery then --mode=todev.

BUG=chrome-os-partner:4108,chrome-os-partner:5000
TEST=edit dev_image/etc/lsb-factory,
     write FACTORY_INSTALL_FIRMWARE=/mnt/stateful_partition/chromeos-firmwareupdate,
     copy updater into stateful partition,
     start the factory install shim in USB mode (RMA shim)

Change-Id: I09af6fc29ed1d3f90425ca9163a4a91196dd1caf
Reviewed-on: http://gerrit.chromium.org/gerrit/4556
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agoFix set_time and omaha_url with replaced omahaserverip
Rong Chang [Fri, 22 Jul 2011 13:11:07 +0000 (21:11 +0800)]
Fix set_time and omaha_url with replaced omahaserverip

set_time shell fucntion uses SERVERIP:PORT and memento_updater
takes full url.

BUG=chromium-os:18054
TEST=Run tftp factory install on ARM device with legacy_image.bin
modified with --omahaip=LOCAL_DEV_SERVER_IP

Change-Id: If3e6e933e791f265404a6c76dfae8b4b85313a52
Reviewed-on: http://gerrit.chromium.org/gerrit/4574
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
3 years agoAllow omaha, board fetch from u-boot
Nick Sanders [Wed, 13 Jul 2011 04:39:27 +0000 (12:39 +0800)]
Allow omaha, board fetch from u-boot

omahaserverip, cros_board will override
respective install settings.

BUG=chrome-os-partner:4606
TEST=manual test w/ modified cmdline

Change-Id: I5cf5aff0fa6ca7cc3c4778b9222e05046f34fea9
Reviewed-on: http://gerrit.chromium.org/gerrit/4301
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
3 years agofactory_install: fix ARM device name
Hung-Te Lin [Wed, 20 Jul 2011 14:30:23 +0000 (22:30 +0800)]
factory_install: fix ARM device name

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=found from chromium-os:13155
TEST=none because booting initramfs on ARM is not ready yet

Change-Id: Ica2b32ca403e492cb2cd55f480e6c8c0e73524e7
Reviewed-on: http://gerrit.chromium.org/gerrit/4401
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
3 years agofactory_install: support installing from USB source media 780.B
Hung-Te Lin [Wed, 13 Jul 2011 04:39:27 +0000 (12:39 +0800)]
factory_install: support installing from USB source media

This special installation mode is designed for RMA process.

BUG=chrome-os-partner:4108
TEST=1. Create a factory install shim, edit lsb-factory file to add:
        FACTORY_INSTALL_FROM_USB=1
        FACTORY_INSTALL_USB_OFFSET=2
     2. Create an image with following layout:
        [ factory_install | factory_test | release ]
     3. Boot with the image. See installation from USB and firmware updated.

Change-Id: I3f6d082701d78fbb2b6162f7114ad82312c653c0
Reviewed-on: http://gerrit.chromium.org/gerrit/4003
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agofactory_install: refactor for supporting different installation methods
Hung-Te Lin [Tue, 12 Jul 2011 10:03:58 +0000 (18:03 +0800)]
factory_install: refactor for supporting different installation methods

To support RMA, we want factory install shim to support installing from source
media other than network.

This CL is the first step by refining factory installer script development.
We can then define factory_usb_install and decide the procedure by checking LSB
values.

BUG=chrome-os-partner:4108
TEST=build_packages; build_image --factory_install
     # then setup the mini-omaha and test factory installation.
     # seems working fine.

Change-Id: Idcbde50d454344791e490209ed338bfa83857755
Reviewed-on: http://gerrit.chromium.org/gerrit/3929
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agofactory_install: prevent overwriting factory install shim itself.
Hung-Te Lin [Thu, 16 Jun 2011 04:21:47 +0000 (12:21 +0800)]
factory_install: prevent overwriting factory install shim itself.

Do not install when the destination device is removable.

NOTE: rootdev does not work because factory shims will be copied into memory and
get rid of source media (USB).

BUG=chromium-os:16236
TEST=remove SSD, boot with factory install shim; seeing error message.
     factory shim is not destroyed.

Change-Id: I8b574a3b50156ac2a79999f963783897cae465ef
Reviewed-on: http://gerrit.chromium.org/gerrit/2755
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agofactory_install: change HWID updater invocation
Hung-Te Lin [Thu, 16 Jun 2011 13:16:21 +0000 (21:16 +0800)]
factory_install: change HWID updater invocation

The updater can only update it into stateful partition, so the command syntax
should accept stateful partition device file instea of whole disk.

BUG=chrome-os-partner:4276
TEST=make_factory_package.sh --... --hwid updater_HWID.sh
     # (run with factory install shim)
     # seeing HWID files updated in stateful partition

Change-Id: I4168ea38ee10f00c683c9c9661f7a056cefd5f81
Reviewed-on: http://gerrit.chromium.org/gerrit/2761
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agoTurn off htpdate sanity time check in install flow
Rong Chang [Tue, 14 Jun 2011 08:14:14 +0000 (16:14 +0800)]
Turn off htpdate sanity time check in install flow

BUG=None
TEST=With sanity time check off, even the datetime diff between
AUSERVER and device timer > 6 years, htpdate will set server
time to client.

Change-Id: I64cc087c9514802db10073aad1692af9a6512182
Reviewed-on: http://gerrit.chromium.org/gerrit/2600
Reviewed-by: Micah Catlin <micahc@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
3 years agofactory_install: start after boot
Scott James Remnant [Wed, 8 Jun 2011 22:21:12 +0000 (15:21 -0700)]
factory_install: start after boot

udev-addon is going away; the correct place for this job to be started
is "started system-serivces" which means the absolute completion of
boot, with everything this means already implied.

Then we also don't need the madness of avoiding running twice.

BUG=chromium-os:16079
TEST=none

Change-Id: I1fc4c49c42bedbc1dcb6211935d0a44cffc7fd08
Reviewed-on: http://gerrit.chromium.org/gerrit/2321
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
3 years agoSupport "complete-channel" and run it at the last step of factory install
Tom Wai-Hong Tam [Fri, 3 Jun 2011 08:05:15 +0000 (16:05 +0800)]
Support "complete-channel" and run it at the last step of factory install

Between all factory install done and reboot, we run the complete script for
customized last-step execution. It allows ODM customized jobs, like showing
complete screen, updating their log server, or playing a sound.

This CL depends on http://gerrit.chromium.org/gerrit/#change,2026.

BUG=chrome-os-partner:4229
TEST=build the factory install shim and run the install process.
See the "complete-channel" is downloaded and run the complete script.

Change-Id: I7fe04e304df65e69bbe3a3cecdc7395bba651c93
Reviewed-on: http://gerrit.chromium.org/gerrit/2027
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
3 years agofactory_install: provide colorized status feedback
Hung-Te Lin [Thu, 2 Jun 2011 05:53:21 +0000 (13:53 +0800)]
factory_install: provide colorized status feedback

BUG=chrome-os-partner:4307
TEST=Install a factory install shim with error in firmware updater.
     Seeing white message at startup, green when shim is ready for pull out,
     and red when error occurs.

Change-Id: I14f73a59ed42ae957a04c96b9a1ed20be1bab01d
Reviewed-on: http://gerrit.chromium.org/gerrit/1956
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agofactory_install: support "hwid-channel" and improve self-executed channel
Hung-Te Lin [Tue, 31 May 2011 11:20:41 +0000 (19:20 +0800)]
factory_install: support "hwid-channel" and improve self-executed channel

The factory install shim needs to send "HWID channel" request to server.
The logic of handling channels with self-executed content is also moved from
memento_updater to factory_install.sh.

This helps processing channels in a more unified way, and allows passing
arbitrary parameters into the self-executed script.

BUG=chrome-os-partner:4276
TEST=build factory_install image, try to install,
     and see request "hwid-channel" on mini-omaha server log.

Change-Id: I168dcefdd6577d84ed19d48978b323496cadb5b9
Reviewed-on: http://gerrit.chromium.org/gerrit/1827
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
3 years agoAdd option to prompt user if flag is set to true in lsb-factory file. 0.13.558.B 0.13.587.B
Kris Rambish [Tue, 24 May 2011 00:55:01 +0000 (17:55 -0700)]
Add option to prompt user if flag is set to true in lsb-factory file.

BUG=chromium-os:15670
TEST=manual

Change-Id: I3680073daa654bca273edcb57c5fa1096fe8b8ec
Reviewed-on: http://gerrit.chromium.org/gerrit/1415
Tested-by: Dave Tu <dtu@chromium.org>
Reviewed-by: Dave Tu <dtu@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
3 years agofactory_install: refine TPM clearing process
Hung-Te Lin [Mon, 16 May 2011 04:03:15 +0000 (12:03 +0800)]
factory_install: refine TPM clearing process

TPM should only be cleared if write protection is disabled, and boot in recovery
mode. For all other cases, print warning message on screen.

BUG=chrome-os-partner:3182
TEST=disable WP, boot with recovery => see TPM clear message
     disable WP, boot with Ctrl-U => see warning message
     enable WP => see warning message

Change-Id: If69f339248b9970755df57d6c5cf550516346550
Reviewed-on: http://gerrit.chromium.org/gerrit/912
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
3 years agoAssign correct target device to partprobe.
Tom Wai-Hong Tam [Tue, 26 Apr 2011 09:52:00 +0000 (17:52 +0800)]
Assign correct target device to partprobe.

If no device given to partprobe, it will probe all the devices in the system.
But in a scenario on ARM, an USB storage is inserted (/dev/sda) and the internal
disk is in /dev/mmcblkp0, partprobe will think /dev/sda is the target.

Change-Id: If7462772b0877d3ac253e453e6481bc6c1c34ba7

R=nsanders@chromium.org,hungte@chromium.org
BUG=chromium-os:13211
TEST=ran factory install shim and partprobe showed the correct device name

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

3 years agoClear TPM if software firmware WP is disabled 0.12.433.B 0.12.433.B109 0.12.433.B62
Randall Spangler [Wed, 13 Apr 2011 21:35:59 +0000 (14:35 -0700)]
Clear TPM if software firmware WP is disabled

Change-Id: I98d111d70e777b616cb2d09ec7e2b5d982f3a91e

R=bleung@chromium.org
BUG=chrome-os-partner:3317
TEST=manual

Install R12 release with kernel version 0x00020001.
Run `crossystem tpm_kernver` to verify kernel version.
Run `flashrom --p internal:bus=spi --wp-status` to verify software WP disabled
Run R11 factory install shim
After install finishes, boot to root shell
Run `crossystem tpm_kernver` to verify kernel version is now 0x00010001

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

3 years agoFix factory installer for ARM platforms 0.12.362.B 0.12.369.B 0.12.392.B
Che-Liang Chiou [Thu, 31 Mar 2011 03:47:20 +0000 (11:47 +0800)]
Fix factory installer for ARM platforms

R=nsanders@chromium.org
BUG=chromium-os:12192
TEST=run factory install successfully

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

Change-Id: I0295848d95c0c5a53d1c111b97c075562b023141

3 years agoFix typo 0.11.241.B 0.11.257.B 0.11.257.B90 11.1.241.B
Nick Sanders [Mon, 7 Mar 2011 18:01:40 +0000 (10:01 -0800)]
Fix typo

* this may also fix uncleared wp on some systems.

BUG=chrome-os-partner:2251
TEST=on cmdline

Change-Id: Ibb1579102e83f6f475f43c504c39e7c56a313653

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

3 years agoUse crossystem
Nick Sanders [Tue, 8 Feb 2011 22:55:39 +0000 (14:55 -0800)]
Use crossystem

BUG=chrome-os-partner:2251
TEST=works

Change-Id: I44099026b3ca276037fc0d09f2ce35413f97da08

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

3 years agoFix factory reset. (TBR factory branch)
Nick Sanders [Wed, 19 Jan 2011 06:18:29 +0000 (22:18 -0800)]
Fix factory reset. (TBR factory branch)

* allow delay for GPIO initialization.
* better debug output
* invert GPIO sense for this branch.

BUG=chrome-os-partner:1527
TEST=runs successfully

Change-Id: I522c29beab24b95807ce8f22a0043981bae16439

Review URL: http://codereview.chromium.org/6188002
(cherry picked from commit 4dc8dd11e5de01170127c8e21366156d869463b3)

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

3 years agoAdd factory reset to factory install shim flow.
Nick Sanders [Wed, 5 Jan 2011 10:27:17 +0000 (02:27 -0800)]
Add factory reset to factory install shim flow.

Part of:
http://codereview.chromium.org/6030006/
http://codereview.chromium.org/5975003/
http://codereview.chromium.org/5964010/
https://chromereviews.googleplex.com/2175014/

BUG=chrome-os-partner:1527
TEST=reset shim worked as expected.

Change-Id: Ib85dea5ffd86abf7fccb09e35422e6431fff159b

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

3 years agoAdd call to htpdate to set time in install
Nick Sanders [Thu, 16 Dec 2010 03:30:25 +0000 (19:30 -0800)]
Add call to htpdate to set time in install

Requires
 http://codereview.chromium.org/5873001/
 http://codereview.chromium.org/5319007/
BUG=chrom-os-partner:1761
TEST=Install sets time, fails if port or host is wrong.

Change-Id: I3c0952130443265f6aedb4566c6db8484b24b47f

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

3 years agoClear FWWP and TPM on factory install
Nick Sanders [Thu, 18 Nov 2010 01:00:02 +0000 (17:00 -0800)]
Clear FWWP and TPM on factory install

Add TPM clear if the case is open, and FW WP is physically disabled.

BUG=5812
TEST=run w/ w/o H2C, and WP

Change-Id: I43a57ce0fbab0f0d8a5e8601c1eb22f664baec0c

Review URL: http://codereview.chromium.org/4474002
(cherry picked from commit be1ac1c8621bf162439bd48788fa75b6f41bfb8c)

Clear write protect bits if FWWP disabled

BUG=8545
TEST=not yet

Change-Id: I56b5162b9cd700caf610f433b760c1a57ac37011

Review URL: http://codereview.chromium.org/4310005
(cherry picked from commit aae9ef281476885e56283bbb3c1ca42e1bfecd91)

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

4 years agofactory_installer: disable release image until factory validation step
Hung-Te Lin [Wed, 6 Oct 2010 10:20:41 +0000 (18:20 +0800)]
factory_installer: disable release image until factory validation step

Lock release image by setting GPT information to non-bootable mode.
The final step of Wipe (chromeos-setimage) will enable the release image.

BUG=chrome-os-partner:1297
TEST=manually:
1. Created a factory installer shim, install.
2. When the system reboots, insert and boot with a USB image;
   check by command: cgpt show /dev/sda
   The partion 4 (release kernel) does have Attr as P,T,S=0.
3. Boot with SSD and run factory_Wipe.
   The system then correctly started wipe process after reboot,
   and booted release image after that.
   Factory image is also correctly erased.

Change-Id: Idf3ec57a0644d5834b1dc5db54034e8c50186f92

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

4 years agoImprove factory screen brightness
Che-Liang Chiou [Tue, 5 Oct 2010 01:15:34 +0000 (09:15 +0800)]
Improve factory screen brightness

The script lightup_screen is in a separate change list.
See http://codereview.chromium.org/3418029

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

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

Change-Id: Iaa1c2e8754137f4f404414a153d6e2875d7d1733

4 years agochange factory setup to prevent invoking firmware update directly.
Hung-Te Lin [Mon, 6 Sep 2010 13:42:39 +0000 (21:42 +0800)]
change factory setup to prevent invoking firmware update directly.

After clarification with Nick, factory setup should not update firmware
by default, either. Change this back to UpdateEngine -> postinst.

Add IS_FACTORY_INSTALL=1 to pass information for postinst.

BUG=chromium-os:5587
TEST=manually:
1. run a factory installation with default source
2. firmware should not be updated.
3. change $FLAGS_firmware_update to FLAGS_TRUE as default in
   src/platform/chromeos-postinst, and then build a new image
4. build new image and run factory installation
5. firmware should be updated.

Change-Id: Ie47a5241ed2167ad0579a212e7ee192bd5569c12

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

4 years agoadd visible messages in factory install process
Hung-Te Lin [Fri, 3 Sep 2010 01:51:57 +0000 (09:51 +0800)]
add visible messages in factory install process

The error messages were printed using "echo", which is not
visible when running factory installer.

BUG=6374
TEST=manual

Change-Id: I7ba6c21fbe201aa9600601104216ddb1b0e05f42

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

4 years agoUse embedded GPT layout / PMBR code if available
Hung-Te Lin [Thu, 2 Sep 2010 08:38:50 +0000 (16:38 +0800)]
Use embedded GPT layout / PMBR code if available

When the factory installer source media not in same shape of Chrome OS, it would
be better to allow providing GPT layout and PMBR code to chromeos-install
directly, instead of querying from root device.

Ref:
http://codereview.chromium.org/3236002/show
http://codereview.chromium.org/3238009/show

NOTE: this CL depends on following list:
http://codereview.chromium.org/3366002/show

BUG=chromium-os:6157
TEST=manual

Change-Id: Ia7e1fc12ed15d7d7640df4cb04eb6494e73b65b5

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

4 years agoAdd flag to specify firmware update after factory image downloaded.
repo sync [Fri, 13 Aug 2010 05:48:01 +0000 (13:48 +0800)]
Add flag to specify firmware update after factory image downloaded.

This change is together with http://codereview.chromium.org/3170011

Change-Id: I2b470c3de58a4b5f8c960f12f3283e2b0e0289a0

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

4 years agoAdd LICENSE file
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file

4 years agoOnly do postinst for factory image in factory install shim.
Tom Wai-Hong Tam [Sat, 10 Jul 2010 05:40:51 +0000 (13:40 +0800)]
Only do postinst for factory image in factory install shim.

Originally, it did postinst for both factory and release images.
It makes firmware-update do twice. We now do postinst only for factory image.
For release image, we do postinst at the last step of factory tests.

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

4 years agoFix bashisms
Nick Sanders [Fri, 25 Jun 2010 06:32:04 +0000 (23:32 -0700)]
Fix bashisms

BUG=none
TEST=Confirm that AU fails if FACTORY cannot be updated.

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

4 years agoAllow updating of various partition sets
Nick Sanders [Fri, 18 Jun 2010 18:15:37 +0000 (11:15 -0700)]
Allow updating of various partition sets
Allow better timeout, within constraints of installed SW

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

4 years agoPack firmware into an image and do update in factory install (separated git).
Tom Wai-Hong Tam [Mon, 14 Jun 2010 01:56:40 +0000 (09:56 +0800)]
Pack firmware into an image and do update in factory install (separated git).

Since different platforms have different instructions to update their firmware.
In order not to depend on the install shim, we pack all firmware update files
into a single file, i.e. an executable shell script with embedded files.

The original CL (http://codereview.chromium.org/2366001) is reviewed and is
broken down into 5 CLs. This is one of them.

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

4 years agoSetup code review inheritance
Anush Elangovan [Sat, 5 Jun 2010 20:12:30 +0000 (13:12 -0700)]
Setup code review inheritance

Change-Id: Ife0016a7a1f4cee5bdbc6b498afb54006c552692

4 years agoUpdate factory installer, factory test
Nick Sanders [Thu, 20 May 2010 05:17:08 +0000 (22:17 -0700)]
Update factory installer, factory test
* Fix build breaks
* Update to work with EFI bios

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

4 years agoAllow factory install shim to be overlay installed
Nick Sanders [Thu, 6 May 2010 04:21:15 +0000 (21:21 -0700)]
Allow factory install shim to be overlay installed

Make standalone package for factory install, so it can be overlayed on top of an existing image.
Modify mod_image_for_test to do the overlay.

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

4 years agoAllow boot directly into mfg test.
Nick Sanders [Sat, 17 Apr 2010 02:53:55 +0000 (19:53 -0700)]
Allow boot directly into mfg test.

Add feature to mod_image_for_test to patch rootfs.
Change initctl path to get network but no chrome.
./image_to_usb.sh --install_mfg --install_autotest --test_image
which calls ./mod_image_for_test.sh --manuf

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

4 years agofactory installer: install state, oem partitions
Andrew de los Reyes [Mon, 12 Apr 2010 17:40:05 +0000 (10:40 -0700)]
factory installer: install state, oem partitions

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

4 years agoFactory Installer.
Andrew de los Reyes [Thu, 8 Apr 2010 22:58:17 +0000 (15:58 -0700)]
Factory Installer.

Change build_image to support building a factory install image. Also,
a shell script and startup script to run the factory installer.

Change software_update startup script to detect if it's a factory
install and abort if so.

BUG=2378,2379,2380
TEST=Tested factory install worked on device.
Wrapper script to perform factory install at boot.

AU: New arg to install on non-boot device partition. This is used to
install in the factory. Also, switch to shflags for argument parsing.

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