Commit graph

2422 commits

Author SHA1 Message Date
Treehugger Robot
1623ec97f1 Merge "add vendor_boot image support" 2019-09-27 21:07:24 +00:00
Steve Muckle
e1b1086ef3 add vendor_boot image support
The vendor_boot partition is generated by mkbootimg and contains all the
device-specific information that used to reside in the boot partition.

Bug: 137297791
Change-Id: I5b005097b73f59857c3a2f92d693b3e67ee8424e
2019-09-27 10:26:00 -07:00
Daniel Mentz
f846914c9f Don't package mke2fs.conf in otatools.zip
mke2fs.conf is now packaged into the Python executable mkuserimg_mke2fs
and no longer needs to be packaged directly into otatools.zip.

Change-Id: I06216ccd60f834747f9302e30397a7f0bae53726
2019-09-18 18:24:41 -07:00
Bowgo Tsai
06533fef4a Moving GSI-specific properties to /system_ext
We're now adding a core CSI system.img that is common across different
targets. So GSI-specific things should be moved to /system_ext.

Also renaming various generic*/system.prop to generic*/system_ext.prop.
This is to put the customization into /system_ext/build.prop instead of
/system/build.prop.

Bug: 137711197
Test: boot a GSI on crosshatch, and checks the value of those properties
Change-Id: Id344124280d5f4a6c10d390a9e8a4a50cc7f28fb
2019-09-10 21:55:32 +08:00
Colin Cross
114e8dfa3e Dist proguard dictionaries for platform builds
Proguard dictionaries are useful for platform builds as well as
unbundled builds, produce them for both.

Bug: 140585949
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/${TARGET_PRODUCT}-proguard-dict-eng.ccross.zip
Change-Id: I63b826be35cfbfc9661b5be7de5bea285bd3d3fc
2019-09-05 21:08:38 -07:00
Yifan Hong
92bad9c73d Merge "Partially Revert "Check VINTF compatibility at OTA generation time.""
am: 66d73717b5

Change-Id: I6629fdc810730ad8db28867d8d9912982cd4f6ff
2019-08-30 17:42:32 -07:00
Yifan Hong
948b259b52 Partially Revert "Check VINTF compatibility at OTA generation time."
This partially reverts commit 9276cf0226.

Reason for revert: broke mixed build

Put META/{system,vendor}_{manifest,matrix}.xml back because mixed builds
needs this.

Bug: 140217956
Test: mainline builds

Change-Id: I80898a17d6b86b17114b729d905dd9ab10bc927a
2019-08-30 12:54:09 -07:00
Tao Bao
bce0264348 Merge "releasetools: img_from_target_files uses zip2zip."
am: f833a75283

Change-Id: I1731934e5585185167db9638c7b6652871fbf913
2019-08-30 12:29:42 -07:00
Yifan Hong
a592de9c61 Check VINTF compatibility at OTA generation time.
am: 9276cf0226

Change-Id: Iee0efa785ccbf2aaadb1be7b3dc106f805242adb
2019-08-28 17:21:27 -07:00
Yifan Hong
d14a6110c5 Add a script to check VINTF compat of target files package.
am: e3ba82cff2

Change-Id: Iccf4b7afa93749f441f48a3270f3d4beac8a0f06
2019-08-28 17:20:52 -07:00
Tao Bao
57f8ed6b5e releasetools: img_from_target_files uses zip2zip.
Test: Build the following targets and check the built image archive.
      bonito-userdebug (contains flashable images);
      cf_x86_phone-userdebug (contains super.img);
      aosp_arm64-eng (contains VerifiedBootParams.textproto)
Test: m -j otatools-package; Check that zip2zip is included; Use
      bin/img_from_target_files to generate image archive.
Change-Id: I9f28765bd702849f0df309faebd6aa3072920536
2019-08-28 16:36:25 -07:00
Yifan Hong
9276cf0226 Check VINTF compatibility at OTA generation time.
Instead of relying on META/{system,vendor}_{manifest,matrix}.xml
and blindly copy compatibility.zip from target files package to
OTA package, do a static check on the input target files package
before generating the OTA package.

META/{system,vendor}_{manifest,matrix} does not contain ODM manifest
fragments, which is incorrect.

Also, the on-device check of compatibility.zip uses a old libvintf
binary on the device, which may not understand the incoming VINTF
metadata. This change removes the on-device check. Hence, it removes
the requirement of forwards compatibility of libvintf.

This behavior can be skipped with --skip-compatibility-check.

Test: build OTA package
Bug: 139300422
Bug: 131425279
Change-Id: I7fb93be9eb73f578fc05a182c6c9d1f073db2800
2019-08-28 11:02:26 -07:00
Yifan Hong
e3ba82cff2 Add a script to check VINTF compat of target files package.
Instead of checking META/{system,vendor}_{manifest,matrix}.xml (which
is error-prone because ODM SKU-specific manifests are not checked),
this script read the target files package, remaps its directory
structure so that checkvintf understands it, and check VINTF
compatibility.

Also, put it in otatools.zip.

Test: run it on an extracted target files package
Bug: 131425279
Change-Id: I06036f9a8d7242d4bc11524028be40e780c508e8
2019-08-28 11:02:26 -07:00
Isaac Chen
5c40e0b628 Merge "Include misc_info.txt for super.img in dist"
am: da8bf47e68

Change-Id: I2982e396ffbf01c5cbed949773a68afa2b65c090
2019-08-23 00:58:36 -07:00
Isaac Chen
da8bf47e68 Merge "Include misc_info.txt for super.img in dist" 2019-08-23 07:35:52 +00:00
Dan Willemsen
86be07669f Merge "Remove package-stats.txt"
am: 1211130c92

Change-Id: I6be259692a3a25934f30595b7f23177c4f6b62bb
2019-08-21 23:51:21 -07:00
Isaac Chen
52cc60ca15 Include misc_info.txt for super.img in dist
Include the misc_info.txt in "dist_files" so we can recreate a new
mixed super image (system and vendor images from different builds)
later in the test pipeline.

The misc_info.txt for products with BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE
set to true is removed from their update packages (essentially, reverts
aosp/976069) since the super_misc_info.txt created here can be used.

Bug: 139404128
Test: $ lunch aosp_x86-userdebug
      $ m dist
      $ diff $OUT_DIR/dist/super_misc_info.txt $OUT/misc_info.txt

Change-Id: Iad1ff981124a19933b0b575bc99941e0fc3813a7
2019-08-22 13:22:06 +08:00
Dan Willemsen
d7994816c1 Remove package-stats.txt
I can't find any remaining users of this functionality.

Test: codesearch; treehugger
Change-Id: I63b079b381211b743baa293267c992d9b2eadcf9
2019-08-21 12:36:14 -07:00
Paul Trautrim
bb78e6bfb8 Merge "Add PRODUCT_BUILD_VBMETA_IMAGE to control vbmeta generation"
am: 23b46e54ac

Change-Id: Idc47cbfa3c54faa3656d2df156fef55ba5546ebd
2019-08-19 17:43:39 -07:00
Paul Trautrim
23b46e54ac Merge "Add PRODUCT_BUILD_VBMETA_IMAGE to control vbmeta generation" 2019-08-20 00:07:35 +00:00
Tao Bao
22fa2f20ae Merge "Stop packing system/update_engine/scripts."
am: d994b4c062

Change-Id: Iaa3633d3c087d3962d3408c4aefe33037f68f430
2019-08-15 16:44:43 -07:00
Tao Bao
07997f1bb4 Stop packing system/update_engine/scripts.
We once attempted to use them (by importing from releasetools scripts)
to parse payload. Due to the dependency on google.protobuf, we have
switched to delta_generator instead (commit 750385e4).

Bug: 65261072
Test: `m -j otatools-package`; and check the related scripts are not
      included.
Change-Id: Iaa8bcb0e2792e48512e1b8db29869db875ba8dc9
2019-08-15 12:10:05 -07:00
Tao Bao
c1966a8bdd Makefile uses add_img_to_target_files module.
Also pack additional tools into otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: `m -j otatools-package`; Check the packed tools.
Change-Id: Ia21d143ca42b1cae8f04b5f0e0cdf6b719312117
(cherry picked from commit 1cf8bf0c14)
2019-08-14 10:44:53 -07:00
Tao Bao
1cf8bf0c14 Makefile uses add_img_to_target_files module.
Also pack additional tools into otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: `m -j otatools-package`; Check the packed tools.
Change-Id: Ia21d143ca42b1cae8f04b5f0e0cdf6b719312117
Merged-In: Ia21d143ca42b1cae8f04b5f0e0cdf6b719312117
2019-08-14 10:34:59 -07:00
Paul Trautrim
4e14323a31 Add PRODUCT_BUILD_VBMETA_IMAGE to control vbmeta generation
In line with the existing PRODUCT_BUILD_*_IMAGE variables, add a flag to
control whether vbmeta is generated.

Bug: 139328573
Test: manual
Change-Id: Id71026f9b0de9019e82e8ef594e718a4b0f3628f
2019-08-13 16:43:39 +09:00
Tao Bao
f882684d85 Merge "Move make_recovery_path and sparse_img to modules."
am: 4c9527b314

Change-Id: I13a67cfe58450696c37a0e7e4ecc3261d8bd7d5a
2019-08-07 13:15:15 -07:00
Tao Bao
e11a46000c Move make_recovery_path and sparse_img to modules.
These two tools are only used within build system, so not adding them
to otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: Build a non-A/B target that calls make_recovery_patch.
Change-Id: Iaeddc98a2c4a27c6b49d91047500029e460db9e3
2019-08-06 23:27:48 -07:00
Tao Bao
93d52312d3 Merge "Build and use ota_from_target_files as a module."
am: b7957f112b

Change-Id: I2c2d6d17f0b52c83a591ebe28b31076741b3e967
2019-08-06 11:00:19 -07:00
Tao Bao
b7957f112b Merge "Build and use ota_from_target_files as a module." 2019-08-06 17:31:21 +00:00
Dan Willemsen
1c5edce761 Merge "Support m dist updatepackage"
am: 554245e73c

Change-Id: I76ae9d44e31d75a802e2f7ad9aa83be6e9696db8
2019-08-05 21:36:08 -07:00
Dan Willemsen
9ae6495d91 Support m dist updatepackage
If you want the `dist` behavior, but only want to build the
updatepackage (you only need to be able to flash the device).

Test: m dist updatepackage
Change-Id: I921f9d96ab3f7df180601dac3fff2ff24185792d
2019-08-05 14:45:11 -07:00
Tao Bao
8821d64481 Build and use ota_from_target_files as a module.
Bug: 63866463
Test: TreeHugger
Test: m -j otapackage
Test: `m -j otatools-package`. Check bin/ota_from_target_files is
      available. Build an OTA package with standalone otatools.
Change-Id: I533dee1c6997d233601e7f4eae637ff5743ed637
2019-08-05 12:57:41 -07:00
Dan Willemsen
58be946140 Merge changes from topic "rm_ONE_SHOT_MAKEFILE"
am: 8b8b9b6bf8

Change-Id: I5764b2ce848710584d2d837e9e33fb9fb71c8d33
2019-08-01 14:31:32 -07:00
Dan Willemsen
5c3fc2a792 Remove support for ONE_SHOT_MAKEFILE
Test: treehugger
Change-Id: Ie73418c186ec4c0e1c91078c133de8f8113295bf
2019-07-31 18:08:47 -07:00
Chris Gross
9300d27562 Merge "Clean-up CL for CL985267."
am: 04bc250d88

Change-Id: I9005b48c374811a207bcf6a0ff0edd50128da380
2019-07-31 09:43:49 -07:00
Chris Gross
04bc250d88 Merge "Clean-up CL for CL985267." 2019-07-31 16:11:23 +00:00
Isaac Chen
7c7387f16f Merge "Add misc_info.txt needed to build super.img"
am: c864fe9054

Change-Id: Icc6760b1c78075401c6bb647022601cba7a22f21
2019-07-30 19:30:29 -07:00
Isaac Chen
c864fe9054 Merge "Add misc_info.txt needed to build super.img" 2019-07-31 01:56:35 +00:00
Chris Gross
e5d4a9e7ff Clean-up CL for CL985267.
CL985267 was merged with one comment left unresolved. This CL resolves
that comment.

Test: Built with a pre-built vendor image and ensured additional
licenses were placed in NOTICE.xml
Test: Built with a vendor image and ensured additional licenses were
placed into NOTICE_VENDOR.xml

Change-Id: I927f09b4b501c38447702ee2fd8fdbdd5934ad20
2019-07-30 16:06:29 -07:00
Chris Gross
4cff1f80f2 Merge "Include extra licenses in vendor image NOTICE file"
am: bb039794d6

Change-Id: I1260e92b1cefae5a1c22ae936498157d3b7141d0
2019-07-30 12:34:02 -07:00
Isaac Chen
3a8cc17654 Add misc_info.txt needed to build super.img
Previously, misc_info.txt is included only when super.img is included
in the update package. This CL adds it to the update package so
Goldfish-based products for emulator can use it to create a new super.img
later in TF pipeline so mixed-image tests can be performed.

A typical example for such mixed-image tests is GSI (aosp_x86) on
sdk_gphone_x86 or older aosp_x86 vendor images.

Bug: 138545354
Test: $ lunch aosp_x86-userdebug; m - j
      $ unzip -l $OUT/aosp*.zip | grep misc
      526  2019-07-22 14:50   misc_info.txt

Change-Id: I111716f499b031c03f2896299b7436a7611841b8
2019-07-30 19:40:56 +08:00
Chris Gross
aad39b3281 Include extra licenses in vendor image NOTICE file
If building with a vendor image, ensure that the licenses from
extra partitions are included in the vendor NOTICE file (possibly in
addition to having them in the system NOTICE file) since they could come
from disperate source trees. This change does not affect existing NOTICE
files outside of the system partition. (e.g. product and system_ext).

Bug: 134679603
Test: Built a vendor image enabled target and ensured the notices were in the
proper file
Change-Id: Ib17c7d7f84805734de09e686a4835b9b680b4192
2019-07-25 16:10:05 -07:00
Pangyen Chen
98da247220 Merge "Inject boot patch level into boot-debug.img"
am: 5f42d56a24

Change-Id: I792e31ca36b287e2b597a1bbcf3205cbea51ce7a
2019-07-23 00:15:32 -07:00
Treehugger Robot
5f42d56a24 Merge "Inject boot patch level into boot-debug.img" 2019-07-23 06:40:58 +00:00
Tao Bao
fe2a6389be Merge "Switch to aapt2 for getting minSdkVersion" into stage-aosp-master 2019-07-22 21:32:46 +00:00
Chris Gross
5c7ed33fc0 Merge "Create ODM partition NOTICE file"
am: 79da9010d5

Change-Id: If14ff4693db60f860332f51e179955010f3ca021
2019-07-22 10:05:15 -07:00
Chris Gross
79da9010d5 Merge "Create ODM partition NOTICE file" 2019-07-22 16:32:40 +00:00
Pangyen Chen
b994524ea6 Inject boot patch level into boot-debug.img
When /boot partition is AVB chained, boot patch level will be
included into the AVB metadata appended to boot.img. We should
also do the same for boot-debug.img to pass keymaster v4 VTS
tests, whichs checks per-partition security patch levels are
indicated in AVB properties.

Bug: 136980825
Test: avbtool info_image --image $OUT/boot-debug.img, checks
      com.android.build.boot.security_patch is there

Change-Id: I2ea1ebfa6abbbbc95639817c208a90642fc3d068
2019-07-22 18:04:03 +08:00
changho.shin
0f12536e6b Switch to aapt2 for getting minSdkVersion
aapt does not support parsing some referencing attributes.
Switch to latest tool, aapt2, which works better.

Test: aapt2 dump badging test.apk and returned 0.
Test: Run check_target_files_signatures.py with a target_files.zip.
Test: Run sign_target_files_apks.py with a target_files.zip.
Change-Id: Ib3a4740506f29ebab6930767f2aa8a0b5c4ba053
2019-07-19 20:26:42 +00:00
Tao Bao
a8ef9264a3 Merge "Removed an obsolete TODO."
am: 7c9ea2b881

Change-Id: I82d3ffa022e7b62d2a244ecb07f5e91be8602962
2019-07-19 07:42:14 -07:00