disk_layout_util: Create the partition_script in the image directory.

The partition layout is defined in a json file used during build. Most
of the information there is stored in the GPT, such as partition order,
size, names, etc. The filesystem format is not explicitly stored
anywhere, but the partition is formatted with that format initially. For
squashfs, we not only need to know the filesystem format, but also the
options used to create it in order to modify and re-create it.

This patch stores the partition_script.sh in the output image directory
(src/build/images/$BOARD/$BUILD_NUMBER/) so other scripts like
mount_gpt_image.sh can use it to mount and umount the created image.

BUG=chromium:455814
TEST=./build_image leaves the partition script in the output directory.

Change-Id: If7529fb22126c61bacbfa45ed6a4ae684d0bddd8
Reviewed-on: https://chromium-review.googlesource.com/247333
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
1 file changed