Commit graph

16 commits

Author SHA1 Message Date
jiajia tang
92b6078314 Simplify codes for BuildSuperImage func
Use common function LoadDictionaryFromFile(), instead
of LoadDictionaryFromLines(). Makes these codes conciser.

Change-Id: Ibb6f19744246b3415bcd639bc59dbb2aede725d9
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
2021-04-23 19:58:40 +08:00
David Anderson
117b52f74e releasetools: Pass --virtual-ab to lpmake.
Note that we are currently excluding this flag for retrofit devices,
since it necessitates support for a newer super.img format, which
retrofit devices may not fully support.

Bug: 134949511
Test: m -j, lpdump super_empty.img
Change-Id: Id69a8d755b9f4c4bb5fbd456a416ced1a5f1d135
2019-12-16 22:17:28 +00:00
Treehugger Robot
e24ef86473 Merge "releasetools: build_super_image.py should unpack */build.prop" 2019-11-15 04:34:02 +00:00
Steven Laver
f43fa9dd99 releasetools: build_super_image.py should unpack */build.prop
build_super_image.py attempts to retrieve the "ro.product.device"
property, which requires parsing the */build.prop files from the target
files package. This fixes the following error:
"ExternalError: couldn't resolve ro.product.device"

Test: ./otatools/releasetools/build_super_image.py -p ./otatools
aosp_arm64-target_files.zip super.img

Change-Id: I592524a27b1a4e7544644b1a344071cff9718942
2019-11-14 23:47:31 +00:00
Yifan Hong
201daffa9a Merge changes from topic "dap_size_check" am: 3c4889fc79
am: 27128f4b10

Change-Id: I3bdebdef8a8bcef7c841967ff9562342ed33a60c
2019-04-08 22:19:03 -07:00
Treehugger Robot
3c4889fc79 Merge changes from topic "dap_size_check"
* changes:
  Only assert-max-image-size for static partitions.
  sparse_img.py --get_partition_size return size of partition
  Revert "Fix dynamic partition size check for devices with recovery"
2019-04-09 02:17:36 +00:00
Yifan Hong
ad44636f8b Merge "Build non-sparse super image if necessary." am: 405d3a4ade
am: 28c875581c

Change-Id: Ide57dcc7df9429fe21be750081ce0a7ffda5f589
2019-04-04 16:36:18 -07:00
Yifan Hong
7ad83b634e sparse_img.py --get_partition_size return size of partition
Also, move code from build_super_image.py to sparse_img.py.

Test: sparse_img.py on sparse and non-sparse images
Bug: 122377935
Change-Id: Ie91fdfdbb54298ea27eb20d1b5363aeb1470356e
2019-04-04 12:59:00 -07:00
Yifan Hong
cb35bd9e51 Build non-sparse super image if necessary.
If TARGET_USERIMAGES_SPARSE_EXT_DISABLED is set, don't provide
--sparse to lpmake, so that a non-sparse super image is built.

Test: build with the flag set.
Fixes: 120041578
Change-Id: I5a26e4c793b0e2ddc89e9c38c8828ac21044e78a
2019-04-03 10:58:25 -07:00
Yifan Hong
45a05bc545 Merge "Add supernod build target." am: 691defc4bd am: 5aec484888
am: 2725896bce

Change-Id: I5b83bc2af99d65c43660b3b764c3f7b5f2a0471a
2019-03-18 18:01:46 -07:00
Yifan Hong
69e0d61cbe Add supernod build target.
superimage-nodeps and supernod depends
on images from $(ANDROID_PRODUCT_OUT) (not from
target files package). It doesn't rebuild source
images if they are present.

A typical workflow is:

    m -j
    # change code in system
    m snod -j
    m supernod -j

Test: For non retrofit, run:
      `m snod -j; m supernod -j`
Fixes: 128321505
Change-Id: Ib8c011cadb9c0cd334234aef39f19be6a48fee62
2019-03-13 11:15:21 -07:00
Yifan Hong
b1e9cec952 Merge "Put system_other in super.img" am: 6dc878bd87 am: 59823773b4
am: 2f0ab84cd7

Change-Id: I784bbb26acf70977f27762d9a37146d52e89de6e
2019-01-03 00:23:39 -08:00
Yifan Hong
cc46eae994 Put system_other in super.img
... for launch A/B devices.
Test: build super image and lpdump
Bug: 113182233

Change-Id: I79ad9da2f6852b39b23e862ff00f320b6565db2f
2019-01-02 12:05:10 -08:00
David Anderson
212e5dfb53 Add an extra metadata slot to super[_empty].img.
This change excludes retrofit devices from getting a third metadata
slot, until code is in place to correctly upgrade those devices through
fastbootd/update_engine.

Bug: 121149247
Test: lpdump super_empty.img
Change-Id: Id147c42cee93a1f6d61ee0edc9cddc0c0540a279
2018-12-17 13:59:19 -08:00
Yifan Hong
e98427ac3f Don't build super image if source images are missing
For some internal branches, vendor.img isn't built, so there
is no need to build super image / super split images there.

Test: remove vendor.img and VENDOR/ from target_files_intermediates, then
      run add_img_to_target_files
Fixes: 120634805

Change-Id: I2834a27ce232538f203733c204dd257279c789fc
2018-12-07 11:01:21 -08:00
Yifan Hong
2b891ac024 Build super.img from images in target_files
For non-retrofit (launch) devices, super.img is used for factory, so
source images should be from target_files.

In this change, build-superimage-target procedure is converted to a
more flexible script so that it can be built.

Bug: 119322123
Test: build target files for device launch with dynamic partitions
Change-Id: I6ee0cc3e145357dfc74be248f81f5f8f4e51fc5c
2018-12-03 11:33:44 -08:00