crosutils/make_universal_factory_shim: allow images in arbitrary layout (for factory branch)
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
Original Reviewed-on: http://gerrit.chromium.org/gerrit/6893
Original Tested-by: Hung-Te Lin <hungte@chromium.org>
Original Reviewed-by: Nick Sanders <nsanders@chromium.org>
Change-Id: I2bf8519d8fc48252aa3df8e3ffacb9feede69f51
Reviewed-on: http://gerrit.chromium.org/gerrit/7320
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 files changed