chromiumos/platform/factory-utils.git
21 months agoMove factory_setup to factory repo. 36/38636/4 factory-3536.B factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-pit-4482.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B firmware-wolf-4389.24.B master release-R25-3428.B release-R26-3701.B release-R27-3912.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-bluetooth-smart stabilize-spring-4100.53.B stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA toolchainB
Jon Salz [Fri, 23 Nov 2012 09:30:32 +0000 (17:30 +0800)]
Move factory_setup to factory repo.

BUG=None
CQ-DEPEND=CL:38634,CL:38635,CL:38636,CL:38638,CL:38639,CL:38641
TEST=buildbot

Change-Id: Ic0e429df4db4a35fd597aa0d5945660ef8c996a2
(cherry picked from commit d8cbbddde48dbc9735480d8efc472d657923fd33)
Reviewed-on: https://gerrit.chromium.org/gerrit/38636
Commit-Ready: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
21 months agopython script to tape our factory tests to an image. 07/37107/5
beeps [Thu, 1 Nov 2012 04:04:27 +0000 (21:04 -0700)]
python script to tape our factory tests to an image.

BUG=chromium-os:35563
TEST=ran the script on an image and checked that test list runs

Change-Id: Id5f3e17a1d266ee9ed8680fbfffe52fcfd755b85
Reviewed-on: https://gerrit.chromium.org/gerrit/37107
Reviewed-by: Craig Harrison <craigdh@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Ready: Prashanth Balasubramanian <beeps@chromium.org>

23 months agofactory_setup: Detect incorrect usage in script syntax.
Hung-Te Lin [Tue, 9 Oct 2012 01:31:39 +0000 (09:31 +0800)]
factory_setup: Detect incorrect usage in script syntax.

When invalid params are provided (ex, "-- firmware PATH" instead of
"--firmware PATH"), scripts should detect and abort.

BUG=chrome-os-partner:15023
TEST=./make_factory_package --factory IMAGE --release IMAGE \
     --hwid none -- firmware PATH  # See usage screen and die as error.

Change-Id: I821adc1ab29db3b533403fdb64a0fab1725cc731
Reviewed-on: https://gerrit.chromium.org/gerrit/34972
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 agoRemove shopfloor server, which is now in factory package. factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B release-R23-2913.B stabilize stabilize-daisy stabilize-link stabilize-link-2913.278
Jon Salz [Thu, 30 Aug 2012 23:37:56 +0000 (07:37 +0800)]
Remove shopfloor server, which is now in factory package.

CQ-DEPEND=CL:32038
BUG=chrome-os-partner:8812
TEST=cbuildbot --remote x86-alex-release

Change-Id: I3bfa105f4d3d4da2bde53e27c932f7f7cfccbce0
Reviewed-on: https://gerrit.chromium.org/gerrit/31978
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

2 years agomake_factory_package: Remove race condition. firmware-stout-2817.B
Shik Chen [Wed, 22 Aug 2012 13:03:07 +0000 (21:03 +0800)]
make_factory_package: Remove race condition.

Remove race condition caused by unneeded temporary file with fixed name.

BUG=chrome-os-partner:12999
TEST=Run two scripts simataneously with same source images, and then netboot
     two devices with two miniomaha servers on different ports.

Change-Id: I3d20b77fc658c26366d7ce0ad2fcaa379e9c2843
Reviewed-on: https://gerrit.chromium.org/gerrit/31110
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Shik Chen <shik@chromium.org>
Tested-by: Shik Chen <shik@chromium.org>
2 years agoDisable reverse DNS lookups in shopfloor server. firmware-butterfly-2788.B
Jon Salz [Fri, 17 Aug 2012 07:42:49 +0000 (15:42 +0800)]
Disable reverse DNS lookups in shopfloor server.

BUG=chrome-os-partner:12723
TEST=strace -f shopfloor_server; confirm that no DNS lookups happen

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

2 years agoAdd dynamic HWID updater support to shopfloor server.
Jon Salz [Fri, 17 Aug 2012 06:03:32 +0000 (14:03 +0800)]
Add dynamic HWID updater support to shopfloor server.

BUG=chrome-os-partner:12568
TEST=shopfloor_unittest.py

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

2 years agoMinor shopfloor server cleanup. factory-2717.B factory-2723.14.B release-R22-2723.B
Jon Salz [Fri, 3 Aug 2012 02:29:03 +0000 (10:29 +0800)]
Minor shopfloor server cleanup.

- Add defaults to usage string
- Use "shopfloor-data" as the default data-dir argument, and create it
  if it doesn't exist (e.g., for the base shopfloor server)
- Rename registration code log to registration_code_log.csv (so it is
  clear that is a log file, not an input file)

BUG=None
TEST=shopfloor_unittest.py

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

2 years agoAdd support for registration codes. firmware-link-2695.2.B firmware-link-2695.B firmware-snow-2695.90.B firmware-snow-2695.B
Jon Salz [Mon, 30 Jul 2012 08:07:40 +0000 (16:07 +0800)]
Add support for registration codes.

BUG=chrome-os-partner:11912
TEST=shopfloor_unittest.py, manual end-to-end test

Change-Id: I14c58e7fc7a546f619155c1cb98709a8559892ec
Reviewed-on: https://gerrit.chromium.org/gerrit/28685
Commit-Ready: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
2 years agoAdd GetTime. firmware-parrot-2685.B
Jon Salz [Mon, 16 Jul 2012 03:05:46 +0000 (11:05 +0800)]
Add GetTime.

BUG=None
TEST=Manual

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

2 years agoSet a default events_dir in the superclass. factory-2569.B
Jon Salz [Tue, 3 Jul 2012 05:34:30 +0000 (13:34 +0800)]
Set a default events_dir in the superclass.

BUG=None
TEST=Manual

Change-Id: I21e563f903deece687e15b4da9759be65133b81a
Reviewed-on: https://gerrit.chromium.org/gerrit/26655
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
2 years agoChange updater to handle both autotest and factory dirs.
Jon Salz [Mon, 2 Jul 2012 08:27:09 +0000 (16:27 +0800)]
Change updater to handle both autotest and factory dirs.

BUG=None
TEST=factory_update_server_unittest.py, manual

Change-Id: Ied00c874c8910a8be612ae8e0b9ee4f99257cee9
Reviewed-on: https://gerrit.chromium.org/gerrit/26559
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

2 years agoSet default value for miniomaha server config file factory-2460.B factory-2475.B release-R21-2465.B
Vic Yang [Wed, 13 Jun 2012 02:15:42 +0000 (10:15 +0800)]
Set default value for miniomaha server config file

For most cases, we use miniomaha.conf as miniOmaha server configuration file.
Let's set this as the default value.

BUG=chrome-os-partner:10457
TEST=Start miniomaha.py from two different working directories without config
     file specified.

Change-Id: I75bf8cc36908902686b9899d418c6970d524291c
Reviewed-on: https://gerrit.chromium.org/gerrit/25159
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2 years agoChanges to update server for robustness/testability.
Jon Salz [Tue, 12 Jun 2012 03:49:23 +0000 (11:49 +0800)]
Changes to update server for robustness/testability.

- Add non-threaded mode to avoid sleeping in tests.
- Make things work if autotest.tar.bz2 is already present on startup.
- Remove dependency on pyinotify since we're already polling in the
  event loop anyway (and this doesn't work with symlinks, mv operations,
  etc.)
- Try harder to kill rsync server, since the first SIGTERM doesn't
  always work.

BUG=chrome-os-partner:10405
TEST=factory_update_server_unittest.py

Change-Id: I31be7c4c07798e17200827cb375ac77c1ccf432b
Reviewed-on: https://gerrit.chromium.org/gerrit/25067
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
2 years agoMove all update/event-logs functionality to ShopFloorBase.
Jon Salz [Thu, 7 Jun 2012 05:49:35 +0000 (13:49 +0800)]
Move all update/event-logs functionality to ShopFloorBase.

BUG=None
TEST=Manual

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

2 years agoDefault to INFO logging. factory-2394.B
Jon Salz [Wed, 30 May 2012 08:16:37 +0000 (16:16 +0800)]
Default to INFO logging.

BUG=None
TEST=Manual

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

2 years agoFix behavior if no update directory is available.
Jon Salz [Tue, 29 May 2012 11:29:10 +0000 (19:29 +0800)]
Fix behavior if no update directory is available.

BUG=None
TEST=Manual

Change-Id: Id60b11858f76378261298f01f05b473ab9a22c48
Reviewed-on: https://gerrit.chromium.org/gerrit/23884
Commit-Ready: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2 years agoSupport binary log chunks.
Jon Salz [Mon, 28 May 2012 10:31:54 +0000 (18:31 +0800)]
Support binary log chunks.

BUG=None
TEST=Manual

Change-Id: I1e7b4dd6ab69aa4bbe04a0d1e46c84203b685df8
Reviewed-on: https://gerrit.chromium.org/gerrit/23830
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

2 years agoExpect top-level 'autotest' directory in tarball.
Jon Salz [Fri, 25 May 2012 10:12:32 +0000 (18:12 +0800)]
Expect top-level 'autotest' directory in tarball.

BUG=None
TEST=Manual

Change-Id: I0e0038881187e39fe930eb9dec885774062493e5
Reviewed-on: https://gerrit.chromium.org/gerrit/23635
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
2 years agoChanges to get server working with real updater in goofy.
Jon Salz [Fri, 25 May 2012 07:32:27 +0000 (15:32 +0800)]
Changes to get server working with real updater in goofy.

BUG=None
TEST=Manual with goofy

Change-Id: Ieb215a49f54e94ace6f97662205cd85ca7c074de
Reviewed-on: https://gerrit.chromium.org/gerrit/23624
Tested-by: Jon Salz <jsalz@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

2 years agofactory-utils: Server-side implementation of event uploading. firmware-link-2348.B
Chinyue Chen [Wed, 16 May 2012 08:13:47 +0000 (16:13 +0800)]
factory-utils: Server-side implementation of event uploading.

Add a new UploadEvent RPC command to shopfloor server and save events
uploaded in events sub-folder under where shopfloor config file exists.

BUG=chrome-os-partner:8810
TEST=python shopfloor_unittest.py

Change-Id: I9e0eb50a2bfd48127dd61b7e4304aa07a0bffa4d
Reviewed-on: https://gerrit.chromium.org/gerrit/22798
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Commit-Ready: Chinyue Chen <chinyue@chromium.org>

2 years agofactory-utils: Factory update server. factory-2305.B factory-2338.B
Chinyue Chen [Fri, 27 Apr 2012 11:35:01 +0000 (19:35 +0800)]
factory-utils: Factory update server.

To allow dynamic update of test list and autotests in factory.  The
factory update server is implemented as a thread to be started by shop
floor server.

BUG=chrome-os-partner:9169
TEST=python factory_update_server_unittest.py

Change-Id: I38ef07be79062b7eecc8108c6383257cb263f2da
Reviewed-on: https://gerrit.chromium.org/gerrit/21312
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
2 years agoCheck FMAP when updating firmware environment variables factory-2268.16.B release-R20-2268.B
Vic Yang [Wed, 9 May 2012 03:30:46 +0000 (11:30 +0800)]
Check FMAP when updating firmware environment variables

Environment variables are not always stored at the end of firmware
image. Let's check for RW_ENVIRONMENT section in FMAP before updating
environment variables.

BUG=chrome-os-partner:9570
TEST=Successfully updated variables for x86 firmware image.

Change-Id: Ifc8e3c4a7ded98ce8803f90a17bdfb9f07c9ff5e
Reviewed-on: https://gerrit.chromium.org/gerrit/22199
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2 years agofactory-utils: server-side implementation of dynamic test RPC protocol.
Chinyue Chen [Fri, 20 Apr 2012 10:38:38 +0000 (18:38 +0800)]
factory-utils: server-side implementation of dynamic test RPC protocol.

Add an option for specifying dynamic test working directory.  The
latest md5sum of autotest tarball is read from latest.md5sum file in the
working directory.

BUG=chrome-os-partner:9169
TEST=python shopfloor_unittest.py

Change-Id: I64bbe1c205c4eba045dc97d9df8c10c239501f95
Reviewed-on: https://gerrit.chromium.org/gerrit/20681
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
2 years ago[factory-utils] add OWNERS
Hung-Te Lin [Mon, 9 Apr 2012 04:33:00 +0000 (12:33 +0800)]
[factory-utils] add OWNERS

BUG=chromium-os:22007
TEST=None

Change-Id: I11a8091ba7a5efee88d8f1fe433fdf285761f4c8
Reviewed-on: https://gerrit.chromium.org/gerrit/19807
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agofactory-utils: Fix typo in script.
Hung-Te Lin [Tue, 27 Mar 2012 13:16:46 +0000 (21:16 +0800)]
factory-utils: Fix typo in script.

BUG=None
TEST=./make_factory_package.sh --usbimg RMA.bin \
     --release RELEASE.bin --factory FACTORY.bin --install INSTALL.bin
     --hwid none  # pass, image bootable.

Change-Id: I6c55994882f9cd7101bacfb6579ad1c6ec31cfa3
Reviewed-on: https://gerrit.chromium.org/gerrit/19157
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agofactory: add "mount_partition.sh" to mount from an cros image file.
Hung-Te Lin [Thu, 22 Mar 2012 10:20:28 +0000 (18:20 +0800)]
factory: add "mount_partition.sh" to mount from an cros image file.

The mount_partition provides quick access to partition inside image files, in
syntax:

 mount_partition.sh IMAGE_FILE PARTITION_NO MOUNT_POINT.

BUG=chrome-os-partner:8601
TEST=./mount_partition chromiumos_image.bin 1 /media # success, mounted as RW
     sudo umount /media
     ./mount_partition chromiumos_image.bin 3 /media # success, mounted as RO
     sudo umount /media

Change-Id: Ia623d35191b4e952b4b225a025117561e8e252d8
Reviewed-on: https://gerrit.chromium.org/gerrit/18821
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Rajesh Chenna <rchenna@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
2 years agoshopfloor: Add more testing data. factory-1987.B release-R19-2046.B
Hung-Te Lin [Thu, 8 Mar 2012 11:57:26 +0000 (19:57 +0800)]
shopfloor: Add more testing data.

To help testing with sample shop floor server, we should include
ro_vpd_serial_number.

Also added a sample "link" entry to demonstrate how to make devices using
different serial numbers for bar-code input & VPD results.

BUG=chrome-os-partner:6911
TEST=./shopfloor_server_unittest.py

Change-Id: I1393677d157b6078a8a93345b38dd97047e56555
Reviewed-on: https://gerrit.chromium.org/gerrit/17583
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agoshopfloor: change module name from "sample" to "simple"
Hung-Te Lin [Fri, 24 Feb 2012 03:10:08 +0000 (11:10 +0800)]
shopfloor: change module name from "sample" to "simple"

The CSV module can be used in real production, so we want to change the name.

BUG=chrome-os-partner:6911
TEST=unittest: ./shopfloor_unittest.py

Change-Id: I7c73e3844531fe97fad6405c38f3f3a5bb26da8e
Reviewed-on: https://gerrit.chromium.org/gerrit/16599
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 agoshopfloor: Replace sample by CSV-based server implementation.
Hung-Te Lin [Mon, 20 Feb 2012 08:13:32 +0000 (16:13 +0800)]
shopfloor: Replace sample by CSV-based server implementation.

This new sample module reads a CSV table containing all serial number, HWID, VPD
data and serve as our shop floor system module.  For partners do not want to
write complex shopfloor system integration code, this implementation may be
ready for use once they've exported serial number data into CSV format.

Some shop floor APIs were also change/fixed during CSV sample development,
including:
 - UploadReport: A "report_name" param should be supported.
 - UploadReport: Blob should be prepared by shopfloor.Binary.
 - Ping: New API for client to check if server is ready.

BUG=chrome-os-partner:6911
TEST=unittest: ./shopfloor_unittest.py # Pass.
     manually: shopfloor_server.py -m shopfloor.sample.ShopFloor \
                 -c testdata/shopfloor/sample.csv
     # And then verified following simple commands:
     # (python) import xmlrpclib
     #          svr = xmlrpclib.ServerProxy("http://localhost:8082/")
     #          svr.GetHWID('CR001001') # success
     #          svr.GetVPD('CR001001') # success
     #          svr.UploadReport('CR001001', 'test blob')

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

2 years agofactory-utils: Prevent double-free looping device in umount
Hung-Te Lin [Thu, 16 Feb 2012 02:33:09 +0000 (10:33 +0800)]
factory-utils: Prevent double-free looping device in umount

When using "mount -o loop", the loop device will free on unmount automatically,
so "umount -d" is not required.  Doing that (-d) may cause race condition issue.

BUG=chromium-os:24975
TEST=Manually:
     ls /tmp  # see how many files are there before running scripts
     extract_firmware_updater.sh -i chromiumos_image.bin
     make_factory_pacakge --factory FACTORY.bin --release RECOVERY.bin \
       --hwid HWID_UPDATER.sh --diskimg OUTPUT.bin
     ls /tmp  # no new temporary folders left

Change-Id: I1dc281c667540347e12b1c91c03406a9960948cd
Reviewed-on: https://gerrit.chromium.org/gerrit/16002
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 years agofactory-utils: add script to extract firmware updater from CrOS image.
Hung-Te Lin [Fri, 3 Feb 2012 14:41:10 +0000 (22:41 +0800)]
factory-utils: add script to extract firmware updater from CrOS image.

An easier and safer script to extract firmware updater.

BUG=chrome-os-partner:5979
TEST=./extract_firmware_updater.sh -i chromiumos_image.bin # got chromeos-firmwareupdate

Change-Id: I067a43115212ea3919f0707a662407ced9aeda5f
Reviewed-on: https://gerrit.chromium.org/gerrit/15228
Reviewed-by: Dave Parker <dparker@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 years agofactory-utils: add a sample shop floor server.
Hung-Te Lin [Thu, 29 Dec 2011 12:12:15 +0000 (20:12 +0800)]
factory-utils: add a sample shop floor server.

To complete a full factory flow, we need a sample shop floor system.
This is a sample implementation that allows devices using serial number
"0100"~"0199" to get HWID and VPD data, upload reports, and mark as finalized.

BUG=chrome-os-partner:6911
TEST=python shopfloor_unittest.py
     python shopfloor_server.py -v -v -m shopfloor.sample.SampleShopFloor

Change-Id: I6f5c051bd4e24cf9535cc65b159d42344786dbd0
Reviewed-on: https://gerrit.chromium.org/gerrit/13530
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agoEnhance factory bundle script to support Stumpy builds firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-R17-1412.B
Tan Gao [Wed, 2 Nov 2011 20:24:56 +0000 (13:24 -0700)]
Enhance factory bundle script to support Stumpy builds

1. replaced regex pattern matching for url matching with simpler token
   matching scheme using fnmatch
2. update firmware content logic to skip EC checks for stumpy
3. update firmware content logic to copy out chromeos-firmwareupdate shellball
4. support export of factory shim, if --shim option is specified on CLI
5. add unit tests for new code

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

Change-Id: I0fc26678466ff26e5557017eb4fbc70a091cc37d
Reviewed-on: https://gerrit.chromium.org/gerrit/11071
Reviewed-by: Ang Pan <oscarpan@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
2 years agofactory-utils: move factory-related scripts from crosutils
Hung-Te Lin [Wed, 26 Oct 2011 11:07:50 +0000 (19:07 +0800)]
factory-utils: move factory-related scripts from crosutils

To allow creating standalone factory bundles, we should move all the
factory-related scripts to a dedicated folder, and not relying any other files
in cros source tree.

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

./make_factory_config --config PATH_TO_CONFIG --run
 # starts omaha server correctly

Change-Id: I86c95bfdca8850c0e4bfcdd9d69030c6727646b1
Reviewed-on: https://gerrit.chromium.org/gerrit/11190
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agofactory-utils: change mini_omaha program file name from "devserver" to "miniomaha" factory-1284.B
Hung-Te Lin [Fri, 28 Oct 2011 10:51:21 +0000 (18:51 +0800)]
factory-utils: change mini_omaha program file name from "devserver" to "miniomaha"

To prevent confusion from original devserver. we should rename the
"devserver.py" to "miniomaha.py"; "autoupdate.py" is also renamed since it does
not server auto-updates anymore.

BUG=chromium-os:22142
TEST=(unittest) ./devserver_test.py # pass

Change-Id: Ib16c5c552543e46ec1ca12e39d6f63b555d4aa86
Reviewed-on: https://gerrit.chromium.org/gerrit/11035
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agofactory-utils: refactor and cleanup devserver for factory setup
Hung-Te Lin [Fri, 28 Oct 2011 10:41:58 +0000 (18:41 +0800)]
factory-utils: refactor and cleanup devserver for factory setup

The devserver for factory installation needs very limited commands.
This CL removed unnecessary commands.

BUG=chrome-os-partner:5979
TEST=(unittest) ./devserver_test.py # pass
     (manual test) ./devserver.py --factory_config=miniomaha.conf
     # starts successfully, and passed whole factory installation.

Change-Id: I5602978053fe7bb7b4139ae6130a799fe13c28c3
Reviewed-on: https://gerrit.chromium.org/gerrit/10709
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agofactory-utils: fork devserver.py for factory
Hung-Te Lin [Wed, 26 Oct 2011 09:21:26 +0000 (17:21 +0800)]
factory-utils: fork devserver.py for factory

Factory process is very different from original devserver.py, so forking a new
dedicated branch for serving factory would be better.

autoupdate.py and buildutil.py are temporary copied into same folder to ease
migration now and will be refactored/removed in other CL.

BUG=chromium-os:22142,chrome-os-partner:5979
TEST=(in chroot) mkdir static;./devserver_test.py # pass unit tests
     ./devserver.py --factory_config=miniomaha.conf  # starts successfully

Change-Id: I998dc0449fae5c54e981d256828c56074234a0b0
Reviewed-on: https://gerrit.chromium.org/gerrit/10708
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>

2 years agofactory-utils: move bundle automation to cros_bundle folder factory-1235.B
Hung-Te Lin [Wed, 26 Oct 2011 04:08:09 +0000 (12:08 +0800)]
factory-utils: move bundle automation to cros_bundle folder

factory-utils wil contain all factory-related scripts and programs in future, so
we should move cros_bundle stuff into its own directory.

Also removed deprecated files not used by anyone.

BUG=chrome-os-partner:5979
TEST=none, moving files that are always invoked manually.

Change-Id: Iaa2f6ae7ea153bb28d25cd5364cc13a254818b45
Reviewed-on: https://gerrit.chromium.org/gerrit/10705
Reviewed-by: Tan Gao <tgao@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 years agoAdd unit tests for src/platform/factory-utils/cros_bundle_lib.py
Tan Gao [Thu, 13 Oct 2011 21:30:38 +0000 (14:30 -0700)]
Add unit tests for src/platform/factory-utils/cros_bundle_lib.py

BUG=chromium-os:21651
TEST=manual

Change-Id: Id5cc8813d62c92e1de3f46d752d910abc1d97a0b
Reviewed-on: http://gerrit.chromium.org/gerrit/10045
Reviewed-by: Ang Pan <oscarpan@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>

2 years agoEnhance factory bundle script to download Bigstore images using Gsutil release-R16-1193.B
Tan Gao [Wed, 12 Oct 2011 20:35:26 +0000 (13:35 -0700)]
Enhance factory bundle script to download Bigstore images using Gsutil

1. investigated alternatives (which would not work here)
a.) OAuth 2.0 Python API for Google Storage for Developers (BigStore)
b.) corporate SSO
2. user is required to download/install/configure "gsutil" in order to
   take advantage of this enhancement
a.) this is one-time set-up and gsutil will handle access token
    acquisition/refresh
3. refactored existing code to be more concise/readable
4. remove unusable functional test for cros_bundle.py
5. update unit tests to provide coverage for new code

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

Change-Id: I5ab2fb0c3906c7920a7a2b26b091c6590315e31f
Reviewed-on: http://gerrit.chromium.org/gerrit/9960
Reviewed-by: Ang Pan <oscarpan@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>

2 years agoFix a bundle script error
Tan Gao [Wed, 12 Oct 2011 18:05:11 +0000 (11:05 -0700)]
Fix a bundle script error

BUG=None
TEST=manual

Change-Id: I7407402a67ea5ca755e4202120116b3f49da0384
Reviewed-on: http://gerrit.chromium.org/gerrit/9950
Reviewed-by: Ang Pan <oscarpan@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>

3 years agoFactory Bundle Script - update unit test to support second EC
Tan Gao [Fri, 16 Sep 2011 00:43:44 +0000 (17:43 -0700)]
Factory Bundle Script - update unit test to support second EC

BUG=chrome-os-partner:5929
TEST=manual (python *_unittest.py and make sure all tests pass)

Change-Id: Iaf96264c6bd32651fbd5bbdc7523479eef490ec4
Reviewed-on: http://gerrit.chromium.org/gerrit/7836
Reviewed-by: Ang Pan <oscarpan@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFix broken factory bundle script unit tests
Tan Gao [Wed, 14 Sep 2011 21:38:01 +0000 (14:38 -0700)]
Fix broken factory bundle script unit tests

BUG=chromium-os:20420
TEST=manual (tested each *_unittest.py for factory-util individually)

Change-Id: I7fb2eaa2acd1e52064cf147609ce1d404d928fa8
Reviewed-on: http://gerrit.chromium.org/gerrit/7771
Reviewed-by: Ang Pan <oscarpan@chromium.org>
Reviewed-by: Stephen Lin <stephenlin%chromium.org@gtempaccount.com>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFactory Bundle scrip - support extraction of second EC firmware
Tan Gao [Wed, 14 Sep 2011 17:21:21 +0000 (10:21 -0700)]
Factory Bundle scrip - support extraction of second EC firmware

* Extract second EC firmware (Alex_EC_VFA616M.bin)
* Fixed a minor bug in invoking RunCommand()
* Unit tests will be updated in a separate CL (need to fix existing breakages first)

BUG=chrome-os-partner:5929
TEST=manual (created an Alex factory bundle and verified 2 EC firmwares are extracted)

Change-Id: I655ff8918a68b129906f446bf2240847affa11a0
Reviewed-on: http://gerrit.chromium.org/gerrit/7718
Reviewed-by: Stephen Lin <stephenlin@google.com>
Tested-by: Tan Gao <tgao@chromium.org>
Reviewed-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - added readme, tidied up install shim option factory-1020.B factory-980.B release-1011.B test-982.B
Bennett Wineholt [Fri, 19 Aug 2011 16:58:00 +0000 (09:58 -0700)]
FBPA - added readme, tidied up install shim option

Change depends on change # 6276
Please note unit testing needs revision.

BUG=chromium-os:19084
TEST=Revised functional testing, test passes.

Change-Id: I2e22a3ca18f81871cd73b670e201ea32fda6bd71
Reviewed-on: http://gerrit.chromium.org/gerrit/6311
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoReplace enter_chroot with cros_sdk.
Zdenek Behan [Fri, 19 Aug 2011 00:52:17 +0000 (02:52 +0200)]
Replace enter_chroot with cros_sdk.

This change reflects the same change to serve_factory_packages in crosutils:
http://gerrit.chromium.org/gerrit/6273

Change the call in cb_command_lib to -- cmd instead of --enter cmd.

BUG=chromium-os:18750
TEST=none

Change-Id: Ifc3f251351c5d164bb5c3f071a61db57377310dc
Reviewed-on: http://gerrit.chromium.org/gerrit/6276
Tested-by: Bennett Wineholt <benwin@chromium.org>
Reviewed-by: Bennett Wineholt <benwin@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
3 years agoFBPA - Added install shim
Bennett Wineholt [Mon, 8 Aug 2011 23:23:55 +0000 (16:23 -0700)]
FBPA - Added install shim

Now supports non-fsi Alex factory bundles.
Added standard recovery to ssd image conversion using chroot.
Next CL to address all unit testing in related libraries.

BUG=chromium-os:19084
TEST=Added functional test, all functional tests pass.

Change-Id: I45e5f6bf6c58143c1abee1b44c808d3013b89214
Reviewed-on: http://gerrit.chromium.org/gerrit/6124
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - Baseline functional testing and MD5 checksums added.
Bennett Wineholt [Mon, 8 Aug 2011 23:23:55 +0000 (16:23 -0700)]
FBPA - Baseline functional testing and MD5 checksums added.

Refactoring in cb_name_lib to concentrate alternative URL naming logic.
MD5 checksums added for all binary files in the bundle.
Added additional alternative naming handling.
Amended bundle directory structure.
Fixed some miscellaneous bugs.

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: Ife20ca1533350d74b1399501aba8613e4a63e213
Reviewed-on: http://gerrit.chromium.org/gerrit/5518
Reviewed-by: Micah Catlin <micahc@google.com>
Reviewed-by: Micah Catlin <micahc@chromium.org>
Tested-by: Micah Catlin <micahc@chromium.org>
3 years agoFixed error reporting when you don't specify an input image. 0.15.877.B firmware-881-u-boot-v1 firmware-u-boot-v1
Doug Anderson [Mon, 8 Aug 2011 23:30:49 +0000 (16:30 -0700)]
Fixed error reporting when you don't specify an input image.

One of the recent comments to update_firmware_vars.py made it
give bad error messages when you didn't specify an input image.
This restores the proper error message (and fixes some typos).

BUG=none
TEST=Ran update_firmware_vars.py with no args.
TEST=Ran update_firmware_vars.py with a bogus -i.
TEST=Ran update_firmware_vars.py --test

Change-Id: I4643cb382742f07f6db167f91d66364b4ebc8639
Reviewed-on: http://gerrit.chromium.org/gerrit/5511
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agoFBPA - Finished unit testing for cb_command_lib module.
Bennett Wineholt [Fri, 5 Aug 2011 20:07:46 +0000 (13:07 -0700)]
FBPA - Finished unit testing for cb_command_lib module.

Refactored cb_command_lib ConvertRecoveryToSsd
Fixed bug in cros_bundle_lib

BUG=chromium-os:17511
TEST=Manual testing using sample usage commands, existing unit tests

Change-Id: I162cc80a8b017f1e168192294048c4bc666fe33c
Reviewed-on: http://gerrit.chromium.org/gerrit/5412
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - Even more unit testing for cb_command_lib
Bennett Wineholt [Thu, 4 Aug 2011 19:08:27 +0000 (12:08 -0700)]
FBPA - Even more unit testing for cb_command_lib

Testing for ExtractFiles
Testing for ExtractFirmware

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: I4a56dd8e8770658005541aead828cfce1d1f45e6
Reviewed-on: http://gerrit.chromium.org/gerrit/5311
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - fixed cgpt privilege bug and uudecode error
Bennett Wineholt [Wed, 3 Aug 2011 01:30:00 +0000 (18:30 -0700)]
FBPA - fixed cgpt privilege bug and uudecode error

BUG=chromium-os:18609
TEST=Manual testing using sample usage commands; existing unit tests

Change-Id: Iecec5553096fadf99985857d406a2e7156c3149e
Reviewed-on: http://gerrit.chromium.org/gerrit/5194
Tested-by: Tan Gao <tgao@chromium.org>
Reviewed-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - More testing for cb_command_lib module.
Bennett Wineholt [Tue, 2 Aug 2011 17:38:42 +0000 (10:38 -0700)]
FBPA - More testing for cb_command_lib module.

Testing for UploadToGsd
Testing for ListFirmware

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: If9738d0d48b4c7f77cfa7839a83f30349f0c408c
Reviewed-on: http://gerrit.chromium.org/gerrit/5154
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - Begun unit testing of cb_command_lib module.
Bennett Wineholt [Mon, 1 Aug 2011 22:03:36 +0000 (15:03 -0700)]
FBPA - Begun unit testing of cb_command_lib module.

Testing for CheckEnvironment

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: If1aa655012d2ad88701af2ea932acb3dad0b276b
Reviewed-on: http://gerrit.chromium.org/gerrit/5114
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - Begun unit testing of cb_util_lib module
Bennett Wineholt [Fri, 29 Jul 2011 21:30:38 +0000 (14:30 -0700)]
FBPA - Begun unit testing of cb_util_lib module

Testing for CheckMd5
Testing for MakeMd5
Testing for ZipExtract
Testing for MakeTar
Testing of cb_util_lib module complete.

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: Ifc36e969717085c90a0eaf90a84371406d1e8dc8
Reviewed-on: http://gerrit.chromium.org/gerrit/5028
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - fixed bug where clean would not run; improved user confirmation for ops.
Bennett Wineholt [Thu, 28 Jul 2011 05:00:17 +0000 (22:00 -0700)]
FBPA - fixed bug where clean would not run; improved user confirmation for ops.

File download bug fixed.

BUG=chromium-os:18340
TEST=Manual testing using sample usage commands; also existing unit tests

Change-Id: I585fbc48f5bfc8ee0e15db69ee89f65102dbb1fa
Reviewed-on: http://gerrit.chromium.org/gerrit/4905
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - Finished unit testing of cb_url_lib module.
Bennett Wineholt [Wed, 27 Jul 2011 00:27:17 +0000 (17:27 -0700)]
FBPA - Finished unit testing of cb_url_lib module.

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: I949291361152e5f153a6521a40f3352699145717
Reviewed-on: http://gerrit.chromium.org/gerrit/4775
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFBPA - Begun unit testing of cb_url_lib module.
Bennett Wineholt [Fri, 22 Jul 2011 17:58:17 +0000 (10:58 -0700)]
FBPA - Begun unit testing of cb_url_lib module.

Unit testing for UrlLister class.

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: I1dc407f0767a6aea3f0b91c37e5b662b9e711c3e
Reviewed-on: http://gerrit.chromium.org/gerrit/4587
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoAdd --board option to update_firmware_vars.py; update omahaserver arg. 0.14.811.B
Doug Anderson [Fri, 22 Jul 2011 18:11:33 +0000 (11:11 -0700)]
Add --board option to update_firmware_vars.py; update omahaserver arg.

BUG=chromium-os:17861
TEST=Run '../platform/factory-utils/update_firmware_vars.py --test'
TEST=Ran with:
  --var="zztesting=b2" --omahaserver=1.2.3.4 --arg=xyz --arg=yyy --board=test_board
...and saw:
  zztesting=b2
  extra_bootargs=xyz yyy omahaserver=1.2.3.4 cros_board=test_board

Change-Id: I2e53582e1a9be93bf5ab2dc38f0480723112d445
Reviewed-on: http://gerrit.chromium.org/gerrit/4590
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agoAdd the ability to set kernel cmdline args to update_firmware_vars.py
Doug Anderson [Fri, 22 Jul 2011 17:56:20 +0000 (10:56 -0700)]
Add the ability to set kernel cmdline args to update_firmware_vars.py

BUG=chromium-os:17860
TEST=Run '../platform/factory-utils/update_firmware_vars.py --test'
TEST=Ran with:
  --var="zztesting=b2" --omahaip=1.2.3.4 --arg=xyz --arg=yyy
...and saw:
  zztesting=b2
  extra_bootargs=xyz yyy omahaserverip=1.2.3.4
...and tried booting with that and saw the kernel cmdline arguments.

Change-Id: I24466b8267043d2000ba3af25083639c0838c089
Reviewed-on: http://gerrit.chromium.org/gerrit/4586
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agoBegun unit testing starting with cb_name_lib.
Bennett Wineholt [Wed, 20 Jul 2011 21:41:27 +0000 (14:41 -0700)]
Begun unit testing starting with cb_name_lib.

Developing automated tests for factory bundle process automation.
Completed unit testing for module cb_name_lib.

BUG=chromium-os:17511
TEST=Developing tests

Change-Id: I5af40b4a100c2761ef34e460b1ea3190f041448b
Reviewed-on: http://gerrit.chromium.org/gerrit/4429
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoRemove duplicate files
Nick Sanders [Wed, 20 Jul 2011 03:40:48 +0000 (20:40 -0700)]
Remove duplicate files

These files have diverged from the currently used
master copies. Let's remove them here until thiss repo
is ready to replace src/scripts.

BUG=chromium-os:11168
TEST=files are not there

Change-Id: I7d91b4520236bbfd6a30b59f58ba9251dd49a802
Reviewed-on: http://gerrit.chromium.org/gerrit/4368
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
3 years agoRefactoring of factory bundle script methods.
Bennett Wineholt [Mon, 18 Jul 2011 23:59:58 +0000 (16:59 -0700)]
Refactoring of factory bundle script methods.

Split functionality into specialized modules.

BUG=chromium-os:17756
TEST=Manual testing using sample usage command in cros_bundle.py

Change-Id: I4d1bef9faa24752fd6002be6179fe224ecea5af3
Reviewed-on: http://gerrit.chromium.org/gerrit/4280
Tested-by: Tan Gao <tgao@chromium.org>
Reviewed-by: Tan Gao <tgao@chromium.org>
3 years agoConversion of recovery to SSD image automatically. 780.B
Bennett Wineholt [Tue, 12 Jul 2011 20:17:33 +0000 (13:17 -0700)]
Conversion of recovery to SSD image automatically.

Now uses HTMLParser.
Some refactoring.
Merge with handling multiple images.

BUG=chromium-os:17373
TEST=Manual testing using sample usage command in script.

Change-Id: I6a66081702d3687beccac8bbbd5b94ef30db7815
Reviewed-on: http://gerrit.chromium.org/gerrit/4229
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFixed bug in ./update_firmware_vars.py if no output size was specified.
Doug Anderson [Fri, 15 Jul 2011 18:12:51 +0000 (11:12 -0700)]
Fixed bug in ./update_firmware_vars.py if no output size was specified.

BUG=chromium-os:17196
TEST=All doctests pass with "./update_firmware_vars.py --test -v"
TEST=Ran:
  ./update_firmware_vars.py \
    -i /build/${BOARD}/u-boot/legacy_image.bin \
    -o /tmp/${BOARD}_image.bin

Change-Id: Ibc16bd129b16b993c8c865d33d20be6d0e609cb9
Reviewed-on: http://gerrit.chromium.org/gerrit/4185
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
3 years agoHandle multiple release and recovery images in factory bundle process.
Bennett Wineholt [Tue, 12 Jul 2011 20:17:33 +0000 (13:17 -0700)]
Handle multiple release and recovery images in factory bundle process.

Revised exceptions thrown, handled some build image naming variation.
Refactored fetch and cleaned up method parameters.
Cleaned up some logging messages.

BUG=chromium-os:17374
TEST=Manual testing using sample usage command in script.

Change-Id: I9b7903789499e08ae55ccd9c8be922cffe918241
Reviewed-on: http://gerrit.chromium.org/gerrit/3978
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoAdd support for G/M/K suffix for params in update_firmware_vars.
Doug Anderson [Thu, 14 Jul 2011 23:54:10 +0000 (16:54 -0700)]
Add support for G/M/K suffix for params in update_firmware_vars.

BUG=chromium-os:17196
TEST=All doctests pass with "./update_firmware_vars.py --test -v"
TEST=Tried running like this and saw the right size get output.
  update_firmware_vars.py -i /tmp/foo.bin --fw-size=4M

Change-Id: I8b2efd12ff13c42349435b0d56bb3eb2fa422553
Reviewed-on: http://gerrit.chromium.org/gerrit/4176
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
3 years agoFactory tool to set environment variables in legacy_image.bin
Doug Anderson [Thu, 14 Jul 2011 21:17:31 +0000 (14:17 -0700)]
Factory tool to set environment variables in legacy_image.bin

BUG=chromium-os:17196
TEST=All doctests pass with "./update_firmware_vars.py --test -v"
TEST=Modified a u-boot legacy_image.bin on Kaen and saw my env vars:
  update_firmware_vars.py \
    -i /tmp/foo.bin \
    --fw-size=0x00400000 \
    --tftpserverip=1.2.3.4 \
    --omahaip=3.4.5.6 \
    --var="a=b" \
    --var="c=d"
Also booted and saw the "omahaserverip=3.4.5.6" on the kernel command
line.

Change-Id: I6b20b585930f90057f74741b74ea0138a4577104
Reviewed-on: http://gerrit.chromium.org/gerrit/4112
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
3 years agoFactory bundle automation upload to GSD.
Bennett Wineholt [Fri, 8 Jul 2011 21:16:20 +0000 (14:16 -0700)]
Factory bundle automation upload to GSD.

Script can now upload to a test GSD bucket.
Refactored option parsing and made style change when logging.

BUG=chromium-os:9338
TEST=Manual testing using sample usage command in script.

Change-Id: Ie0257f1d5a40ff6f4ef6dbc384e45e57244a7716
Reviewed-on: http://gerrit.chromium.org/gerrit/3809
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoFactory bundle automation script produces a basic factory bundle.
Bennett Wineholt [Fri, 24 Jun 2011 23:10:03 +0000 (16:10 -0700)]
Factory bundle automation script produces a basic factory bundle.

Script now extracts firmware and repackages binaries into tarfile.
Will restart from partial download, checking md5 checksums.
Includes options to clear state and save in alternate location.

BUG=chromium-os:9338
TEST=Manual testing using sample usage command in script.

Change-Id: I4479db35f100dedd31d9a91182a221bf09e890c2
Reviewed-on: http://gerrit.chromium.org/gerrit/3211
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agoStarted factory bundle automation script.
Bennett Wineholt [Mon, 13 Jun 2011 23:39:34 +0000 (16:39 -0700)]
Started factory bundle automation script.

So far the script downloads images and checks md5 checksums.
It also verifies the presence of the factory binary in the factory zip.

BUG=chromium-os:9338
TEST=Manual testing using sample usage command in script

Change-Id: Ie81b472f628c236ebd27ffde3864b44eb1e7a178
Reviewed-on: http://gerrit.chromium.org/gerrit/2566
Reviewed-by: Tan Gao <tgao@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 years agofactory-utils: add factory scripts from crosutils (copy only) 0.11.241.B 0.11.257.B 0.11.257.B90 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 0.13.509.B 0.13.558.B 0.13.587.B 11.1.241.B
Zdenek Behan [Sun, 6 Feb 2011 19:08:14 +0000 (20:08 +0100)]
factory-utils: add factory scripts from crosutils (copy only)

BUG=n0ne
TEST=

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

3 years agoAdd licence and inherit-review-settings-ok
Zdenek Behan [Thu, 3 Feb 2011 05:54:04 +0000 (06:54 +0100)]
Add licence and inherit-review-settings-ok

BUG=n0ne
TEST=

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

3 years agoInitial commit
Zdenek Behan [Thu, 3 Feb 2011 02:31:01 +0000 (03:31 +0100)]
Initial commit