Commit Graph

3 Commits

Author SHA1 Message Date
Hung-Te Lin
d7a3503914 crosutils/make_universal_factory_shim.sh: allow creating images in arbitrary layout
We need more flexible image creation tool for various layout, like "RMA with
multiple release images" which needs 4 images (install, test, release A,
release B).

To make the creation of image more flexible, this CL changes
make_universal_factory_shim to using a "layout file" that can describe any disk
image format we want.

Image creation speed is also improved by aligning partition offsets and
restricting oflag=dsync applied only when being used for block devices so that
make_universal_factory_shim (outputs to a normal temporary file) becomes faster
by utilizing system cache.

For a system with every images already cached:
 - Time for building 3 in 1 factory instal shim:
   Before = 8 seconds, After = 5 seconds.
 - Time for full RMA shim creation:
   Before = 1m25s, After = 40-50 seconds.

BUG=chrome-os-partner:4108
TEST=./make_universal_factory_shim.sh image1 image2 image3 image4
     # boots correctly after being imaged to SD card.
     ./make_factory_package.sh --usbimg RMA ....
     # RMA image can install images and works correctly

Change-Id: I645196d6d6e0a24d3dfa4c413a338279df4c0d5b
Reviewed-on: http://gerrit.chromium.org/gerrit/6893
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-08-31 23:37:55 -07:00
Hung-Te Lin
8d5f0e60de make_universal_factory_shim: support "-m" to assign master (base) image
Some images (especially RMA) need to use stateful or other lagacy stuff from
other image files.

This CL adds "-m" to make_universal_factory_shim so that we can change the
master image (the one for all legacy / stateful partition).

BUG=chrome-os-partner:4108
TEST=./make_universal_factory_shim.sh -m factory_test.bin \
     factory_install.bin factory_test.bin release_image.bin

Change-Id: I6c8e096fd7ae921a4fb157c035f575a7c3b33834
Reviewed-on: http://gerrit.chromium.org/gerrit/4020
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-07-14 19:03:34 -07:00
Hung-Te Lin
cb296ab653 crosutils: rename "merge_shim_image.sh' to 'make_universal_factory_shim.sh"
The "merge_shim_image" does not work for recovery shims; and that makes the name
confusing.

This CL changed its name to a more slef-documenting one,
"make_universal_factory_shim.sh". Also updated the comments in script file to
describe its real behavior.

BUG=chrome-os-partner:2888
TEST=none # no change in code except more comments

Change-Id: I965c93b39021935c12e21e14b63ba04fce2f43e6
Reviewed-on: http://gerrit.chromium.org/gerrit/1035
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-05-18 23:09:38 -07:00