diff options
author | Bo Hu <bohu@google.com> | 2019-05-28 15:33:24 +0000 |
---|---|---|
committer | Luca Stefani <luca.stefani.ge1@gmail.com> | 2019-09-06 13:40:25 +0200 |
commit | e4adeedcf353d50988959cd17ed99ff64746833f (patch) | |
tree | 92e5294dafaecd980328a43441138ff1e2d05229 | |
parent | 8c059810dc9eadf84306cb739d502f1db9cd528b (diff) | |
download | android_device_generic_goldfish-e4adeedcf353d50988959cd17ed99ff64746833f.tar.gz android_device_generic_goldfish-e4adeedcf353d50988959cd17ed99ff64746833f.tar.bz2 android_device_generic_goldfish-e4adeedcf353d50988959cd17ed99ff64746833f.zip |
Revert "goldfish: speed up system-qemu.img packaging"
This reverts commit c7128aff6f75afd51d8acfcd8ae107eadc02d6fa.
Reason for revert: broke build full-eng
Change-Id: I6fb73d634c5e4a5a8b61d999292d58221e4255a3
-rwxr-xr-x | tools/extract_head_tail.sh | 20 | ||||
-rwxr-xr-x | tools/mk_combined_img.py | 24 | ||||
-rw-r--r-- | tools/prebuilt/gpt/1_3080/head.img | bin | 1048576 -> 0 bytes | |||
-rw-r--r-- | tools/prebuilt/gpt/1_3080/tail.img | bin | 1048576 -> 0 bytes |
4 files changed, 1 insertions, 43 deletions
diff --git a/tools/extract_head_tail.sh b/tools/extract_head_tail.sh deleted file mode 100755 index 5941da7..0000000 --- a/tools/extract_head_tail.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e - -if [ "$#" -ne 3 ]; then - echo "$0 src.img head.img tail.img" >&2 - exit 1 -fi - -srcimg=$1 -headimg=$2 -tailimg=$3 - -disksize=$(stat -c %s $srcimg) - -mycount=`expr $disksize \/ 1024 \/ 1024 - 1` - -dd if=$srcimg of=$headimg ibs=1M obs=1M count=1 -dd if=$srcimg of=$tailimg ibs=1M obs=1M count=1 skip=$mycount -#dd if=/dev/zero of=file.txt count=3083 bs=1M diff --git a/tools/mk_combined_img.py b/tools/mk_combined_img.py index 719f305..be19cd7 100755 --- a/tools/mk_combined_img.py +++ b/tools/mk_combined_img.py @@ -16,8 +16,7 @@ def check_sparse(filename): return False def shell_command(comm_list): - command = Popen(comm_list, stdout=PIPE, stderr=PIPE) - command.communicate() + command = Popen(comm_list) execute = command.wait() if command.returncode != 0: sys.exit(1) @@ -42,9 +41,6 @@ def parse_input(input_file): partition_info = dict() partition_info["path"] = line[0] partition_info["label"] = line[1] - # round up by 1M - sizeByMb = str((1024 * 1024 - 1 + os.path.getsize(line[0])) / 1024 / 1024) - partition_info["sizeByMb"] = sizeByMb try: partition_info["num"] = int(line[2]) @@ -141,24 +137,6 @@ def main(): "conv=notrunc,sync", "ibs=1024k", "obs=1024k", "seek=2"]) print "done" sys.exit(0) - else: - gptprefix = partitions[0]["sizeByMb"] + "_" + partitions[1]["sizeByMb"] - prebuilt_gpt_dir = os.path.dirname(os.path.abspath( __file__ )) + "/prebuilt/gpt/" + gptprefix - gpt_head = prebuilt_gpt_dir + "/head.img" - gpt_tail = prebuilt_gpt_dir + "/head.img" - if os.path.exists(gpt_head) and os.path.exists(gpt_tail): - print "found prebuilt gpt header and footer, use it" - shell_command(['dd', "if=" + gpt_head, "of=" + output_filename, "bs=1M", - "conv=notrunc,sync", "count=1"]) - shell_command(['dd', "if=" + partitions[0]["path"], "of=" + output_filename, - "bs=1M", "conv=notrunc,sync", "seek=1"]) - shell_command(['dd', "if=" + partitions[1]["path"], "of=" + output_filename, - "bs=1M", "conv=notrunc,sync", "seek=" + str(1 + int(partitions[0]["sizeByMb"]))]) - shell_command(['dd', "if=" + gpt_tail, "of=" + output_filename, - "bs=1M", "conv=notrunc,sync", - "seek=" + str(1 + int(partitions[0]["sizeByMb"]) + int(partitions[1]["sizeByMb"]))]) - print "done" - sys.exit(0) # combine the images # add padding diff --git a/tools/prebuilt/gpt/1_3080/head.img b/tools/prebuilt/gpt/1_3080/head.img Binary files differdeleted file mode 100644 index f16ea54..0000000 --- a/tools/prebuilt/gpt/1_3080/head.img +++ /dev/null diff --git a/tools/prebuilt/gpt/1_3080/tail.img b/tools/prebuilt/gpt/1_3080/tail.img Binary files differdeleted file mode 100644 index 2f69829..0000000 --- a/tools/prebuilt/gpt/1_3080/tail.img +++ /dev/null |