Commit Graph

2935 Commits

Author SHA1 Message Date
Ram Muthiah 41a03d3aee Add prebuilt bootloader var and add bootloader to img zip
Needed to enable a prebuilt bootloader to make it to the dist and img
directories.

Added a flag to ensure only devices that request will have the update
package populated with a bootloader

Bug: 164917252
Test: local build and Treehugger build
Change-Id: Id67b7bddda14b51a523f794976591c6de04d71ca
2020-08-25 22:12:27 +00:00
Treehugger Robot 09a0958457 Merge "Merged and dist lists of unused methods from R8" 2020-08-21 00:28:24 +00:00
Treehugger Robot 68ec133934 Merge changes I03bb00b0,I1cf9a0ef,I1c1b7d25
* changes:
  add support to non-A/B for multiple kernels, boot images
  add BOARD_GKI_NONAB_COMPAT for non-A/B compatability with GKI
  fix recoveryimage-nodeps
2020-08-20 22:21:45 +00:00
Colin Cross a9b9e6e5ff Merged and dist lists of unused methods from R8
Merge all the proguard_usage.zip files produced by the R8 rules and
dist the result.

Bug: 151857441
Test: m TARGET_BUILD_APPS=DocumentsUI dist
Change-Id: I7e6d73241478016093a203dc7bd86407ab86a4ac
2020-08-17 19:31:22 +00:00
Dan Willemsen a3f6632de9 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Test: treehugger
Change-Id: Iea6caf3c08252a560155e095135c5ddaad712991
Merged-In: Iea6caf3c08252a560155e095135c5ddaad712991
2020-08-11 01:12:01 +00:00
Steve Muckle 04b6f05f31 add support to non-A/B for multiple kernels, boot images
Bug: 162777091
Change-Id: I03bb00b0a02a3dc048b7a83eff08f790d2f4d17e
2020-08-09 18:42:40 -07:00
Steve Muckle a21b44a736 fix recoveryimage-nodeps
Change-Id: I1c1b7d25cd7e6254c9edf12dd1bf5c9f7b56e26d
2020-08-09 15:30:25 -07:00
Jaegeuk Kim d9d2dff22d Merge "support make_f2fs with casefolding" 2020-08-04 04:18:07 +00:00
Jaegeuk Kim 8ba4bab89f support make_f2fs with casefolding
Bug: 159672232
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I4ac22a989010c747502d97e76faabf6cfdd9bf04
2020-07-20 17:52:41 -07:00
Bob Badour 5e9e1fbe83 Add support for combining the notices from 2 roots.
Apparently needed for cts tests due to apks putting intermediate files under
TARGET_OUT even when going to HOST_OUT.

Test: m with and without change verified no differences in notice files

Change-Id: Iea50b6bd9af9452a2600c97e2f7cb89218b9be7f
2020-07-20 17:32:14 +00:00
Yifan Hong 7c970b4b4c Merge changes from topic "odm_dlkm" am: 997d227648 am: a3145919f0
Original change: https://android-review.googlesource.com/c/platform/build/+/1363863

Change-Id: I3d653c3ba350ca9d4b44ee0e5aa5e2bf69bb0241
2020-07-17 22:52:29 +00:00
Yifan Hong 895e8bb1e9 Install ODM dlkm to appropriate place and symlink am: 3d5e2c210a am: 1ce4a837be
Original change: https://android-review.googlesource.com/c/platform/build/+/1363861

Change-Id: Ie4d1560d2b04fc647c5a784df1d8abe9012f4ab2
2020-07-17 22:52:23 +00:00
Yifan Hong 2b60d6ddbf Add notice files for odm_dlkm am: c83f9e922b am: 2c3f849f65
Original change: https://android-review.googlesource.com/c/platform/build/+/1363860

Change-Id: I913270bc0b5582d7222e07991e1992a2d964920c
2020-07-17 22:52:19 +00:00
Yifan Hong 76a337f65e Add odm_dlkm partition. am: f496f1b94f am: 4f2ea25d5f
Original change: https://android-review.googlesource.com/c/platform/build/+/1363859

Change-Id: I4aaa3967e889923f0958afaa3227474176e36ea9
2020-07-17 22:52:14 +00:00
Yifan Hong 1ce4a837be Install ODM dlkm to appropriate place and symlink am: 3d5e2c210a
Original change: https://android-review.googlesource.com/c/platform/build/+/1363861

Change-Id: Ibfad2e508fba2dbfa4bf6da0bd3e7392178cf59d
2020-07-17 22:27:21 +00:00
Yifan Hong 2c3f849f65 Add notice files for odm_dlkm am: c83f9e922b
Original change: https://android-review.googlesource.com/c/platform/build/+/1363860

Change-Id: I2e28658d235829c55e80edc93c3a4ec8ca0b9434
2020-07-17 22:27:18 +00:00
Yifan Hong 4f2ea25d5f Add odm_dlkm partition. am: f496f1b94f
Original change: https://android-review.googlesource.com/c/platform/build/+/1363859

Change-Id: I8c7af808f72de5611cb52f34c0138bc97ceb6254
2020-07-17 22:27:15 +00:00
Yifan Hong 997d227648 Merge changes from topic "odm_dlkm"
* changes:
  Create $OUT/{vendor,odm}/lib before symlink modules
  Add odm_dlkm/etc/build.prop
  Install ODM dlkm to appropriate place and symlink
  Add notice files for odm_dlkm
  Add odm_dlkm partition.
2020-07-17 22:05:26 +00:00
Treehugger Robot 29e347e4be Merge changes Iacfe74ae,I7c380b60 am: ce13163827 am: 5771787ccb
Original change: https://android-review.googlesource.com/c/platform/build/+/1365306

Change-Id: I81debee224374fd8f60d1cad12a4e7ac6c0591ab
2020-07-17 04:59:48 +00:00
Joe Onorato 02fb89a4d7 Add mk2bp_catalog.py that outputs more data about makefiles to be converted to soong.
- Adds makefile and which files are installed to the SOONG_CONV CSV file
- Updates soong_to_convert.py to be able to parse that
- Adds new script that is more detailed.
- Outputs that file as part of the droidcore build to
  $(OUT_DIR)/target/product/$(TARGET_DEVICE)/mk2bp_remaining.html

Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html
Change-Id: I7c380b6070754f4329bf3965595751e4dac794a0
2020-07-16 18:19:15 -07:00
Yifan Hong 3d5e2c210a Install ODM dlkm to appropriate place and symlink
Test: builds
Bug: 156020364
Change-Id: Ib0e44fe827397d0d1ec6d7edfceba1e9a43c76a3
2020-07-16 12:34:30 -07:00
Yifan Hong c83f9e922b Add notice files for odm_dlkm
Test: pass
Bug: 156020364
Change-Id: Ia7e562cb96b9f14fa7ab0b74c253bf75fb699f0b
2020-07-16 12:34:30 -07:00
Yifan Hong 1e6d21787a Create $OUT/{vendor,odm}/lib before symlink modules
Before creating symlinks $OUT/{vendor,odm}/lib/modules, make sure
parent directory exists first.

Test: build CF
Bug: 156020364
Change-Id: Id2a9e5273aae75944c1b31553fad3703540bf2f4
2020-07-16 12:34:30 -07:00
Yifan Hong f496f1b94f Add odm_dlkm partition.
Test: define odm_dlkm in CF.
Bug: 156020364
Change-Id: I5593d09a1cdf13e651a13e951336555a7475865e
2020-07-16 12:34:29 -07:00
Yifan Hong c11bec7696 Install dlkm to appropriate place and symlink am: e51dff25ec am: 9a599be8df
Original change: https://android-review.googlesource.com/c/platform/build/+/1316439

Change-Id: I208c1fb5d1450442de4bbbe5d9134ec9033e3441
2020-07-14 19:47:24 +00:00
Yifan Hong 74034b6d64 Add notice files for vendor_dlkm am: 3d3f030c27 am: 271621a5d4
Original change: https://android-review.googlesource.com/c/platform/build/+/1312394

Change-Id: Ic676be5985440b82c9747fd6f725d6b026a2f15b
2020-07-14 19:47:21 +00:00
Yifan Hong 9fce02b625 Add vendor_dlkm partition. am: cfb917a1c7 am: 58af66905e
Original change: https://android-review.googlesource.com/c/platform/build/+/1316438

Change-Id: I84a4ffc60242ba92ade09dba87ba53a15394fe9f
2020-07-14 19:47:16 +00:00
Yifan Hong e51dff25ec Install dlkm to appropriate place and symlink
Test: builds
Bug: 156020364
Change-Id: I5958021ab54a2f99140796c3ef915b5329808ce3
2020-07-13 14:20:56 -07:00
Yifan Hong 3d3f030c27 Add notice files for vendor_dlkm
Test: pass
Bug: 156020364
Change-Id: I87e8b57a7a7f212071de4e530424740103a29434
2020-07-13 14:20:56 -07:00
Yifan Hong cfb917a1c7 Add vendor_dlkm partition.
Test: define vendor_dlkm for CF.
Bug: 156020364

Change-Id: I459059e1c20df7a285a377b8b3bbc8decc60b124
2020-07-13 14:20:56 -07:00
Colin Cross 31ebad0968 Merge "Use unzip -DD" am: 3227fc587c am: 7090c900e2
Original change: https://android-review.googlesource.com/c/platform/build/+/1360910

Change-Id: Ia28e7582b3e5ffa86ddd6674b843001763601512
2020-07-13 06:21:01 +00:00
Colin Cross c27d795b63 Use unzip -DD
We put reproducible timestamps in zip files so that the artifacts
are consistent, but that leads to old timestamps in the output
directory if they are unzipped as part of the build.  Use
unzip -DD when unzipping to update the timestamps.

Bug: 161015009
Test: touch -d 2020-01-01 ref; find $OUT/system -not -newer ref
Change-Id: I6f08ba8695d90a8225cfc04e679755e6296deed0
2020-07-12 05:38:03 +00:00
Jaewoong Jung 704b454ca1 Add LOCAL_APKCERTS_FILE support.
This is used when Soong and Make don't know the full output file list,
and so use a tool to generate a per-module apkcerts.txt file instead.

Fixes: 160119159
Test: m apkcerts-list
Merged-In: I48183bc8cbf9dcc521f791812734205ed3f28f4c
Change-Id: I48183bc8cbf9dcc521f791812734205ed3f28f4c
2020-07-01 10:01:16 -07:00
Jaewoong Jung 3222c83189 Merge "Add LOCAL_APKCERTS_FILE support." into rvc-dev am: d1198b74b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/12039309

Change-Id: I63b291937de6db49f8add8262e2eed149f739c5f
2020-07-01 00:24:08 +00:00
Jaewoong Jung b46b86c1f7 Merge "Add LOCAL_APKCERTS_FILE support." into rvc-dev am: d1198b74b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/12039309

Change-Id: I8a2fce4420e8b5cfdc320e45af002fe12fee74d7
2020-07-01 00:23:47 +00:00
Treehugger Robot 2dc8f68e46 Merge "use first kernel when generating kernel configs file" am: 6c9441a924 am: e68d12bad2
Original change: https://android-review.googlesource.com/c/platform/build/+/1351284

Change-Id: Ia94583456eabca2b23554fd8b5f1c44e50181178
2020-06-30 18:07:25 +00:00
Treehugger Robot 6c9441a924 Merge "use first kernel when generating kernel configs file" 2020-06-30 17:36:01 +00:00
Jaewoong Jung 29714ecda6 Add LOCAL_APKCERTS_FILE support.
This is used when Soong and Make don't know the full output file list,
and so use a tool to generate a per-module apkcerts.txt file instead.

Fixes: 160119159
Test: m apkcerts-list
Change-Id: I48183bc8cbf9dcc521f791812734205ed3f28f4c
2020-06-29 19:47:21 -07:00
Dan Willemsen 0280e7879e Merge "Remove empty new-space in dynamic_partition_list and super_$(group)_partition_list" am: 4d1284c0b7 am: 55917b89a6
Original change: https://android-review.googlesource.com/c/platform/build/+/1309873

Change-Id: I7c17fccc69ba52fac67aa8975125a54da4cafb8a
2020-06-27 22:34:39 +00:00
Steve Muckle bbdfbdad50 use first kernel when generating kernel configs file
If multiple kernels are defined for a build, use the first one when
generating the kernel config file.

Bug: 159975506
Change-Id: Ia136264eb0d0b544bf0685bc22e600de187a9a9b
2020-06-26 16:39:34 -07:00
Luca Stefani c158e421ec Remove empty new-space in dynamic_partition_list and super_$(group)_partition_list
* As a side product .strip() calls in releasetools are redunant,
  but since these scripts are also used out of tree we can't
  remove them to guarantee compatibility

Test: m dist
Change-Id: I5c513a4654e293c3d4eab98c8759ea094015fab1
2020-06-26 19:52:52 +02:00
Treehugger Robot 07031bc150 Merge "depmod: pair in a modules.load.charger on BOARD_VENDOR_CHARGER_KERNEL_MODULES_LOAD" am: bfe947b5ce am: f9bd377168
Original change: https://android-review.googlesource.com/c/platform/build/+/1348976

Change-Id: I9a2204315556706c3728c43eb30ce98e7a5fa4ea
2020-06-25 19:43:54 +00:00
Mark Salyzyn 46a9c028b8 depmod: pair in a modules.load.charger on BOARD_VENDOR_CHARGER_KERNEL_MODULES_LOAD
If the BoardConfig defined BOARD_VENDOR_KERNEL_MODULES_LOAD and
BOARD_VENDOR_CHARGER_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.charger respectively on
/vendor/lib/modules.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 159424228
Bug: 151950334
Test: build, confirm, change to charger mode, confirm set of modules loads
Change-Id: I55677ed74d80ff3909fe8cbe26e6766f9b5283d5
2020-06-25 08:57:36 -07:00
Tianjie Xu 893c553804 Merge "Add lz4 to otatools" into rvc-dev am: c35ea185b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11992672

Change-Id: I99ddc5c9e666441ce8167408f2bd880c34950f17
2020-06-25 02:39:40 +00:00
Tianjie Xu c35ea185b0 Merge "Add lz4 to otatools" into rvc-dev 2020-06-25 02:25:02 +00:00
Tianjie Xu 0b1791510a Merge "Add lz4 to otatools" am: be46f482e0 am: 387907b462
Original change: https://android-review.googlesource.com/c/platform/build/+/1348968

Change-Id: I7e0e1734264558a80af53ab5869d3247c4b1f56a
2020-06-25 00:10:49 +00:00
Tianjie e6369cec6b Add lz4 to otatools
A call to lz4 was added in http://go/aog/1329115. But the binary
isn't added to otatools, leading to a signing failure.

Bug: 159656873
Test: build otatools
Change-Id: I9cab00f36ce3c39cc174b4c9feffdf360f0364ef
(cherry picked from commit 3031c29905)
2020-06-24 16:50:18 -07:00
Tianjie Xu be46f482e0 Merge "Add lz4 to otatools" 2020-06-24 23:38:49 +00:00
Tianjie 3031c29905 Add lz4 to otatools
A call to lz4 was added in http://go/aog/1329115. But the binary
isn't added to otatools, leading to a signing failure.

Bug: 159656873
Test: build otatools
Change-Id: I9cab00f36ce3c39cc174b4c9feffdf360f0364ef
2020-06-24 11:20:36 -07:00
TreeHugger Robot 3f4d3a06be Merge "Switch to using llvm-strip for modules" into rvc-dev am: 30d5c93f47
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11935858

Change-Id: If66e43579849b5d460a5214ad6974003aa06ca24
2020-06-23 20:33:56 +00:00
J. Avila fb5d223ea0 Merge "Switch to using llvm-strip for modules" am: dbbd970d18 am: 422a1aec8a
Original change: https://android-review.googlesource.com/c/platform/build/+/1344918

Change-Id: Id0af7c1be1d0c8c1ca30b66fd276c15bd33671df
2020-06-22 15:53:09 +00:00
J. Avila 74d50ccb69 Switch to using llvm-strip for modules
The gcc tools are deprecated; replace with the llvm equivalent.

Bug: 158484106
Merged-In: I9c3717bde281667eec82cc21dc63dc7fd5592a46
Change-Id: I9c3717bde281667eec82cc21dc63dc7fd5592a46
2020-06-22 15:31:27 +00:00
J. Avila dbbd970d18 Merge "Switch to using llvm-strip for modules" 2020-06-22 15:19:26 +00:00
Chris Gross 84b32c2ded Merge "Use BUILD_*_IMAGE flags in add_img_to_target_files." am: e08e40947b am: d169a3fcad
Original change: https://android-review.googlesource.com/c/platform/build/+/1321954

Change-Id: Id29c2ab31d3a64146d601dee437adf2773b84466
2020-06-19 23:07:13 +00:00
Chris Gross e08e40947b Merge "Use BUILD_*_IMAGE flags in add_img_to_target_files." 2020-06-19 22:32:37 +00:00
J. Avila f7586025a2 Switch to using llvm-strip for modules
The gcc tools are deprecated; replace with the llvm equivalent.

Bug: 158484106
Change-Id: I9c3717bde281667eec82cc21dc63dc7fd5592a46
2020-06-19 21:32:45 +00:00
Treehugger Robot 8403ae3c95 Merge "adjust vendor ramdisk file extension based on compression" am: 5dda5caeb9 am: cd9ebd46ab
Original change: https://android-review.googlesource.com/c/platform/build/+/1344080

Change-Id: I72cea6daa02264241f851844ca7c0f30d82a3ca1
2020-06-19 07:01:33 +00:00
Steve Muckle 414dbe15ab adjust vendor ramdisk file extension based on compression
The extension for the generated vendor ramdisk should be updated based
on the compression scheme used.

Bug: 158433703
Change-Id: I25fff0b8a7879f6aa6d6fe2fce9f5a53f90eb636
2020-06-18 21:38:35 -07:00
TreeHugger Robot 17fe0782fc Merge "notice files in system_other becomes included in system's one" into rvc-dev am: 22f98f1885
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11910080

Change-Id: I277b0e177fb222f489d33d587f085fdf1aa820f4
2020-06-19 01:41:07 +00:00
TreeHugger Robot 3e48036c15 Merge "notice files in system_other becomes included in system's one" into rvc-dev am: 22f98f1885
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11910080

Change-Id: I1c20546b4b937b13333d3256a7f8aacc5ef8161b
2020-06-19 01:40:58 +00:00
TreeHugger Robot 22f98f1885 Merge "notice files in system_other becomes included in system's one" into rvc-dev 2020-06-19 01:23:26 +00:00
Jeongik Cha 9917520fc2 notice files in system_other becomes included in system's one
system_other is relevant partition to system over vendor.
so move notice files from system_other from vendor to system

Bug: 159189171
Test: m nothing && check ninja dependency
Change-Id: Ib69bd3faae03f174671d5db8366a59b7d28a9d9d
2020-06-18 20:44:51 +09:00
TreeHugger Robot 1819860264 Merge "Include image descriptor of only the first boot image in vbmeta" into rvc-dev am: 6df396f96f
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11875347

Change-Id: I4a16cbba024263e0cd9f4b57c99adcd0f0287770
2020-06-17 01:00:22 +00:00
Treehugger Robot 623bea86e1 Merge "Include image descriptor of only the first boot image in vbmeta" am: 397972fa6a am: 765d9a7e00
Original change: https://android-review.googlesource.com/c/platform/build/+/1328118

Change-Id: I7338d991ac9d6a51e29b1c1f94dd6088bb0238a4
2020-06-16 00:34:54 +00:00
Roopesh Nataraja 1908f97319 Include image descriptor of only the first boot image in vbmeta
Multiple boot images can be generated based on BOARD_KERNEL_BINARIES
but vbmeta would capture the image descriptor of only the first boot
image specified in BUILT_BOOTIMAGE_TARGET.

Bug : 158213759
Test: Compile multiple boot images and check if vbmeta.img
      includes image descriptor of only the first boot image
      specified in BUILT_BOOTIMAGE_TARGET

Change-Id: Ib70f65d98546a436da82656bc5c911d437618bb5
Merged-In: Ib70f65d98546a436da82656bc5c911d437618bb5
2020-06-15 17:10:56 -07:00
Treehugger Robot 397972fa6a Merge "Include image descriptor of only the first boot image in vbmeta" 2020-06-16 00:05:28 +00:00
Dan Willemsen 5f5012fc10 Fix dependencies on INSTALLED_RECOVERYIMAGE_TARGET am: 458af2daa1
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11853804

Change-Id: Ieedc7f24af80a28f90f5c765b74de66550c5de10
2020-06-13 03:47:36 +00:00
Treehugger Robot e37255eefa Merge "Fix dependencies on INSTALLED_RECOVERYIMAGE_TARGET" am: 9d54fbebcb am: 31508fb715
Original change: https://android-review.googlesource.com/c/platform/build/+/1332834

Change-Id: Id8f1151f329fea0d7aa8e3c25de8af3dbba1f8e9
2020-06-13 02:51:33 +00:00
Dan Willemsen 458af2daa1 Fix dependencies on INSTALLED_RECOVERYIMAGE_TARGET
Instead of copying the logic (which led to divergences), use the
same list of dependencies for both users of build-recoveryimage-target

Bug: 158774198
Test: treehugger
Test: build-coral.ninja is the same before/after
Change-Id: I8f8c006432f3b8120df1f39c98009155fdff32ad
Merged-In: I8f8c006432f3b8120df1f39c98009155fdff32ad
(cherry picked from commit d120ac68fa)
2020-06-12 12:26:37 -07:00
Dan Willemsen d120ac68fa Fix dependencies on INSTALLED_RECOVERYIMAGE_TARGET
Instead of copying the logic (which led to divergences), use the
same list of dependencies for both users of build-recoveryimage-target

Change-Id: I8f8c006432f3b8120df1f39c98009155fdff32ad
Test: treehugger
2020-06-12 02:39:38 +00:00
TreeHugger Robot 03498c1e31 Merge "Add LZ4 support to the release tools" into rvc-dev am: 1455b76f9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11822828

Change-Id: I46f7fbdb63cfbcdc9242dc5e5aabc42f02984a50
2020-06-11 19:00:41 +00:00
TreeHugger Robot 1455b76f9f Merge "Add LZ4 support to the release tools" into rvc-dev 2020-06-11 18:41:19 +00:00
J. Avila d30b751838 Add LZ4 support to the release tools
The core android build platform has changed to add support for LZ4
compression for ramdisks, but the release tools were not. Fix this.

Bug: 156129966
Merged-In: I39680b91930d2d3cbd0cd565beb78e1ee699397e
Change-Id: I39680b91930d2d3cbd0cd565beb78e1ee699397e
2020-06-11 15:22:04 +00:00
J. Avila 7d9f715f29 Merge "Add LZ4 support to the release tools" am: b8d67f3722 am: d2cbd57b33
Original change: https://android-review.googlesource.com/c/platform/build/+/1329115

Change-Id: I91a65d982169c81409532561f6dae3ddb17b7398
2020-06-11 15:20:29 +00:00
J. Avila b8d67f3722 Merge "Add LZ4 support to the release tools" 2020-06-11 14:56:38 +00:00
Martin Stjernholm b3fc54e824 Introduce TARGET_BUILD_UNBUNDLED. am: 7a430fd4c8 am: 6c1aae726f
Original change: https://android-review.googlesource.com/c/platform/build/+/1324512

Change-Id: I8777dd8241790686f32dd03319f88c0c7815da71
2020-06-11 10:43:13 +00:00
Martin Stjernholm 7a430fd4c8 Introduce TARGET_BUILD_UNBUNDLED.
Setting this flag enables unbundled building, i.e. without support for
building the system image and other platform targets. This
functionality was previously enabled by TARGET_BUILD_APPS, and setting
that still implies TARGET_BUILD_UNBUNDLED.

This helps unbundled builds that aren't apps, e.g. ART runtest builds.
Specifically, with the topic of the child CL
https://r.android.com/1324517 TARGET_BUILD_UNBUNDLED does not imply
disabling dexpreopting, unlike TARGET_BUILD_APPS.

TODO: There may still be app-specific conditions that are incorrectly
controlled by TARGET_BUILD_UNBUNDLED, in particular on the Soong side
through config.UnbundledBuild().

Test: Flash & boot
Test: TH, in particular builds green on ub-launcher3-master
Bug: 157549171
Change-Id: Ic09fc879117ee06cab5444edfc280ed2b52d2870
2020-06-11 01:09:07 +01:00
J. Avila 98cd4cc7a3 Add LZ4 support to the release tools
The core android build platform has changed to add support for LZ4
compression for ramdisks, but the release tools were not. Fix this.

Bug: 156129966
Change-Id: I39680b91930d2d3cbd0cd565beb78e1ee699397e
2020-06-10 21:51:19 +00:00
Elliott Hughes 71e9c32390 Merge "Remove TARGET_PREFER_32_BIT." am: 9df45f6ec2 am: 534b035e29
Original change: https://android-review.googlesource.com/c/platform/build/+/1288989

Change-Id: Ib72e06fd5b674606403bee352d3ddbd93d7430c7
2020-06-10 18:36:54 +00:00
Roopesh Nataraja 3e15f6edb1 Include image descriptor of only the first boot image in vbmeta
Multiple boot images can be generated based on BOARD_KERNEL_BINARIES
but vbmeta would capture the image descriptor of only the first boot
image specified in BUILT_BOOTIMAGE_TARGET.

Bug : 158213759
Test: Compile multiple boot images and check if vbmeta.img
      includes image descriptor of only the first boot image
      specified in BUILT_BOOTIMAGE_TARGET

Change-Id: Ib70f65d98546a436da82656bc5c911d437618bb5
2020-06-10 07:44:12 -07:00
Elliott Hughes 9b824d5ceb Remove TARGET_PREFER_32_BIT.
Bug: https://issuetracker.google.com/138812821
Test: builds
Change-Id: I2ff7793c8b1eb56f6be63375cc7b70aa44254443
2020-06-08 16:36:52 -07:00
Steve Muckle b19441a284 fix spurious / on toplevel kernel module installations am: d03ec51f38
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11764809

Change-Id: Id357eee8495cfe258eda9ffb01e0c408e23acb81
2020-06-08 21:10:10 +00:00
Treehugger Robot 05048d976c Merge changes I53c05800,Ic218283b am: 470cfbe8d7 am: 21805afbc6
Original change: https://android-review.googlesource.com/c/platform/build/+/1317599

Change-Id: I7c7f317cca241af3f8822617d1367a5a2acb25b5
2020-06-08 16:21:45 +00:00
Treehugger Robot 6fd21ab0e9 Merge "fix spurious / on toplevel kernel module installations" am: 208689cca8 am: 3957e09d24
Original change: https://android-review.googlesource.com/c/platform/build/+/1324842

Change-Id: I54b61290b5072a7311898c13cb4d60a2974413e9
2020-06-08 16:20:24 +00:00
Jiyong Park bb26c6f2bf Rule for system/build.prop is also from macro
Like other <partition>/build.prop files, the build rule for
system/build.prop is also created using the build-properties macro.

system/build.prop has a few number of auto-generate properties that the
macro doesn't create. Those properties are emitted to intermediate files
using manually crafted rules, the paths to the files are fed to the
macro, where their contents are copied to system/build.prop.

This change also refactors the code fragment that defines BUILD_*
variables that identifes the given build.

Bug: 117892318
Test: m

Change-Id: Ic218283b40fedeaddacb3fda93167edbec86094c
2020-06-08 10:09:12 +09:00
Steve Muckle d03ec51f38 fix spurious / on toplevel kernel module installations
When kernel modules are being put directly into lib/modules/ (as opposed
to lib/modules/<subdir>/), the empty part of the destination path causes
a target containing a redundant /. If the target is also added elsewhere
in the build without the redundant /, then rule merging will miss it,
and a build error will occur.

Bug: 158158635
Change-Id: I797addce760f4886166efa283302a53783581625
Merged-In: I797addce760f4886166efa283302a53783581625
2020-06-05 18:56:41 -07:00
Steve Muckle 950d723b9d fix spurious / on toplevel kernel module installations
When kernel modules are being put directly into lib/modules/ (as opposed
to lib/modules/<subdir>/), the empty part of the destination path causes
a target containing a redundant /. If the target is also added elsewhere
in the build without the redundant /, then rule merging will miss it,
and a build error will occur.

Bug: 158158635
Change-Id: I797addce760f4886166efa283302a53783581625
2020-06-05 12:10:56 -07:00
Pierre Couillaud d4620668af Strip debug symbols from modules (fixup) am: bb726614db
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11720591

Change-Id: Ic4e8ee438317784f822d49d242738c9330a23d17
2020-06-05 03:35:56 +00:00
Pierre Couillaud 74df52f11f Strip debug symbols from modules (fixup) am: bb726614db
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11720591

Change-Id: I75cd2ff2dbcbf6465a7097c5b65dcb7116927bf2
2020-06-05 03:35:12 +00:00
Chris Gross 203191b5be Use BUILD_*_IMAGE flags in add_img_to_target_files.
Modify add_img_to_target_files.py to use the BUILDING_*_IMAGE flags when
deciding whether to create and add a given image to a target files
archive.

To do this, the BUILDING_*_IMAGE flags are now dumped to misc_info.txt.

The origin of this change was to use the BUILDING_USERDATA_IMAGE and
BUILDING_CACHE_IMAGE flags in add_img_to_target_files.py so that we
could reliably turn off the generation of the userdata and cache images.
The other image flags were added for symmetry.

Bug: 130307439
Test: m -j out/target/product/bonito/misc_info.txt
Test: m -j droid dist
Change-Id: I32d5a8d6c9ebb5f329d856030084d698ee8d271d
2020-06-04 17:53:04 +00:00
Pierre Couillaud d99da8fa17 Strip debug symbols from modules (fixup)
allow to also skip the stripping of the modules present in vendor
ramdisk when the BOARD configuration is set to skip the strip step.

there is also a shortcoming of this functionality: it currently assumes
the modules to strip are all created equal against the same arch in
particular, however this does not work for kernel modules which are
for mixed mode platforms, as example {kernel,android} == {aarch64,armv7}
because it will select the "android" mode strip which is unaware of the
kernel mode architecture.

Bug: 156395749
Bug: 155193290
Change-Id: I35ef51845224e94e3e253acdeb6bb14b990a401b
2020-06-04 00:17:58 +00:00
Pierre Couillaud bb726614db Strip debug symbols from modules (fixup)
allow to also skip the stripping of the modules present in vendor
ramdisk when the BOARD configuration is set to skip the strip step.

there is also a shortcoming of this functionality: it currently assumes
the modules to strip are all created equal against the same arch in
particular, however this does not work for kernel modules which are
for mixed mode platforms, as example {kernel,android} == {aarch64,armv7}
because it will select the "android" mode strip which is unaware of the
kernel mode architecture.

Bug: 156395749
Bug: 155193290
Change-Id: I35ef51845224e94e3e253acdeb6bb14b990a401b
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
2020-06-03 23:44:37 +00:00
Steve Muckle 16a714512b refactor kernel module build, add version support am: f6ce461f1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712421

Change-Id: I74af6ae8b8cec28c99324c569eb9e22f1c1c63ed
2020-06-03 21:12:47 +00:00
Steve Muckle c1e13a0c17 move BOARD_RECOVERY_KERNEL_MODULES_LOAD default am: 7576d5e131
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712420

Change-Id: I2798509d3783814bf1750843ed59de055e78a3a4
2020-06-03 21:12:45 +00:00
Steve Muckle 4f896eb316 move module list creation outside conditionals am: 2319129a88
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712419

Change-Id: Ie24174afaee97fded24cc866e53af98b8caf6bfd
2020-06-03 21:12:42 +00:00
Steve Muckle 7bdda3e64f fix reference to BOARD_ODM_MODULES_LOAD am: 708435b557
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712418

Change-Id: Ice6671a88e21e40cb4e3204e1826f4504486294b
2020-06-03 21:12:40 +00:00
Treehugger Robot 76fbe68b37 Merge "refactor kernel module build, add version support" am: 8c6c2cd3de am: 59f09ba05c
Original change: https://android-review.googlesource.com/c/platform/build/+/1320314

Change-Id: I1098a9421c5c935d5655da59f52c7eb5aad815de
2020-06-03 18:40:00 +00:00
Treehugger Robot 23ddab0418 Merge changes Ia1392b7d,I199788d4,I9c8ac0e6 am: aa62df07cf am: 2027f6bf85
Original change: https://android-review.googlesource.com/c/platform/build/+/1318773

Change-Id: Ic31d722a2b9d74937fa1bd32268d3f30ac6feb71
2020-06-03 18:39:49 +00:00
Steve Muckle f6ce461f1f refactor kernel module build, add version support
Refactor the build support for kernel modules. This refactoring is
leveraged to add support for directories of kernel modules in each
partition. To add a directory of kernel modules, define
BOARD_KERNEL_MODULE_DIRS to include the directory name, for example:

BOARD_KERNEL_MODULE_DIRS := 5.4

The build will then check all the usual kernel module related macros
with an extension of _5.4, for example you can define

BOARD_VENDOR_KERNEL_MODULES_5.4 := <modules to copy>
BOARD_VENDOR_KERNEL_MODULES_ARCHIVE_5.4 = <path to archive file>
BOARD_VENDOR_KERNEL_MODULES_LOAD_5.4 := <modules for load list>

Bug: 157645635
Change-Id: I1687d0ec85c1dcf21350350623b4689aba3f6717
Merged-In: I1687d0ec85c1dcf21350350623b4689aba3f6717
2020-06-03 11:18:10 -07:00
Steve Muckle 7576d5e131 move BOARD_RECOVERY_KERNEL_MODULES_LOAD default
Moving this makes each of the partition's kernel module Makefile
generation more similar, enabling a forthcoming cleanup/refactoring.

If recovery-is-boot and there are kernel modules defined in
BOARD_GENERIC_RAMDISK_KERNEL_MODULES, those kernel modules will
now be included in the default assignment to
BOARD_RECOVERY_KERNEL_MODULES_LOAD. If this is not desired then
BOARD_RECOVERY_KERNEL_MODULES_LOAD may simply be set to
BOARD_RECOVERY_KERNEL_MODULES (or a custom list of recovery kernel
modules to load).

Bug: 157645635
Change-Id: Ia1392b7d20d07cee75420edd95dcee1dc825516e
Merged-In: Ia1392b7d20d07cee75420edd95dcee1dc825516e
2020-06-03 11:17:32 -07:00
Steve Muckle 2319129a88 move module list creation outside conditionals
Currently the two special-case calls to create just a module load list
(as opposed to copying a set of modules and creating a module load list)
are inside checks that the related board macro for the module set is not
empty.

While it would be incorrect to create a non-empty module load list with
an empty set of modules, this error would quickly surface at runtime.
More importantly, moving these out will permit refactoring this code to
clean it up.

Bug: 157645635
Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36
Merged-In: I199788d49072d4c59737b3ef2c75546852cf3e36
2020-06-03 11:16:31 -07:00
Steve Muckle 708435b557 fix reference to BOARD_ODM_MODULES_LOAD
This check is meant to initialize BOARD_ODM_KERNEL_MODULES_LOAD to
BOARD_ODM_KERNEL_MODULES if BOARD_ODM_KERNEL_MODULES_LOAD is empty.

Bug: 157645635
Change-Id: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
Merged-In: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
2020-06-03 11:15:52 -07:00
Steve Muckle 2335d76ada refactor kernel module build, add version support
Refactor the build support for kernel modules. This refactoring is
leveraged to add support for directories of kernel modules in each
partition. To add a directory of kernel modules, define
BOARD_KERNEL_MODULE_DIRS to include the directory name, for example:

BOARD_KERNEL_MODULE_DIRS := 5.4

The build will then check all the usual kernel module related macros
with an extension of _5.4, for example you can define

BOARD_VENDOR_KERNEL_MODULES_5.4 := <modules to copy>
BOARD_VENDOR_KERNEL_MODULES_ARCHIVE_5.4 = <path to archive file>
BOARD_VENDOR_KERNEL_MODULES_LOAD_5.4 := <modules for load list>

Bug: 157645635
Change-Id: I1687d0ec85c1dcf21350350623b4689aba3f6717
2020-06-02 15:17:26 -07:00
Steve Muckle c88a8c88e4 move BOARD_RECOVERY_KERNEL_MODULES_LOAD default
Moving this makes each of the partition's kernel module Makefile
generation more similar, enabling a forthcoming cleanup/refactoring.

If recovery-is-boot and there are kernel modules defined in
BOARD_GENERIC_RAMDISK_KERNEL_MODULES, those kernel modules will
now be included in the default assignment to
BOARD_RECOVERY_KERNEL_MODULES_LOAD. If this is not desired then
BOARD_RECOVERY_KERNEL_MODULES_LOAD may simply be set to
BOARD_RECOVERY_KERNEL_MODULES (or a custom list of recovery kernel
modules to load).

Bug: 157645635
Change-Id: Ia1392b7d20d07cee75420edd95dcee1dc825516e
2020-06-02 15:17:15 -07:00
Steve Muckle 1013d789de move module list creation outside conditionals
Currently the two special-case calls to create just a module load list
(as opposed to copying a set of modules and creating a module load list)
are inside checks that the related board macro for the module set is not
empty.

While it would be incorrect to create a non-empty module load list with
an empty set of modules, this error would quickly surface at runtime.
More importantly, moving these out will permit refactoring this code to
clean it up.

Bug: 157645635
Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36
2020-06-02 15:17:04 -07:00
Steve Muckle f291097221 fix reference to BOARD_ODM_MODULES_LOAD
This check is meant to initialize BOARD_ODM_KERNEL_MODULES_LOAD to
BOARD_ODM_KERNEL_MODULES if BOARD_ODM_KERNEL_MODULES_LOAD is empty.

Bug: 157645635
Change-Id: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
2020-06-02 15:16:54 -07:00
J. Avila d25813d072 Merge "Add build support for LZ4 ramdisks" into rvc-dev am: 5ea1cf103f
Change-Id: I4dc97dfc9c356fa02a7854df90b89caffe3f1422
2020-05-31 16:04:52 +00:00
J. Avila 5ea1cf103f Merge "Add build support for LZ4 ramdisks" into rvc-dev 2020-05-31 15:55:08 +00:00
Baligh Uddin a5bc1ecacd Add apksigner to otatools.zip am: 1325034c81
Change-Id: I21a1e23dfd701e89b9b0608d2e1c1697ecd338dd
2020-05-30 05:54:48 +00:00
J. Avila 9600ace371 Add build support for LZ4 ramdisks
Ramdisks are currently compressed using gzip, which is generally
smaller, but slower to decompress than lz4. Provide an option for an
lz4 scheme to reduce the time taken to unpack initramfs during boot.

Bug: 156129966
Signed-off-by: J. Avila <elavila@google.com>
Merged-In: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
Change-Id: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
2020-05-29 22:46:31 +00:00
Treehugger Robot 6be7b57ce7 Merge "remove spurious comma from module-load-list-copy-paths call" 2020-05-29 22:08:11 +00:00
Treehugger Robot e6772e5e53 Merge "Add apksigner to otatools.zip" am: d6eb072c9f am: 558cc4bd0d
Change-Id: I87af6d0f4cf113e411472e9a930196918aca6c03
2020-05-29 21:52:48 +00:00
J. Avila e947fe92ae Merge "Add build support for LZ4 ramdisks" am: bc4d5bdb87 am: bfc7440c43
Change-Id: I3e8c09105cf9173b7f9a448598ac2d6c87cc2729
2020-05-29 21:52:27 +00:00
Baligh Uddin 1325034c81 Add apksigner to otatools.zip
BUG: 157735036
Test: Local build.
Change-Id: I3778021f94236b0ac09a33149f2872fb5f740be2
Merged-In: I95c7001ad520d6b4a415d21ffdef55152b0e82b2
2020-05-29 21:49:39 +00:00
Steve Muckle 06b48162f4 remove spurious comma from module-load-list-copy-paths call
The module-load-list-copy-paths fn takes five parameters.

Merged-In: I7d1736da1599e265793173a741053d8a09f1622f
Change-Id: I9286c9e4ca81caf5392bc804dead718bd028b193
2020-05-29 13:54:49 -07:00
Baligh Uddin ab25b2dcfa Add apksigner to otatools.zip
BUG: 157735036
Test: Local build.
Change-Id: I95c7001ad520d6b4a415d21ffdef55152b0e82b2
2020-05-29 19:01:32 +00:00
J. Avila 8177ae20f3 Strip debug symbols from modules
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.

Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: I7d1736da1599e265793173a741053d8a09f1622f
2020-05-29 09:30:13 -07:00
J. Avila bc4d5bdb87 Merge "Add build support for LZ4 ramdisks" 2020-05-29 16:28:47 +00:00
Treehugger Robot b9408ab697 Merge "Fix up recovery_text_res" am: 9e424a5a60 am: 08095b3301
Change-Id: I509f05b54014e1636f38c116e74c9514ec09581e
2020-05-28 08:44:00 +00:00
Dan Willemsen 9767223dc5 Fix up recovery_text_res
First, make it safer for incremental builds. We used to just be
depending on the bootable/recovery/tools/recovery_l10n/res dir as a
dependency, but that would only trigger a rebuild if a direct child
file/directory was added or removed (so essentially, when a translation
was addded or removed). If a translation was updated, it wouldn't
re-trigger recovery_text_res.

So instead of depending on the directory, depend on the results from
running `find` to list all of the contents in that directory.

Next, move it out of PACKAGING. `m installclean`, which runs in between
incremental builds on our build servers, deletes the obj/PACKAGING
directory. So when recovery_text_res used that directory, we were having
to rebuild it on every incremental build, which isn't optimal when it
takes nearly 90s to build.

So with:
 $ lunch aosp_coral-eng
 $ m bootimage
 $ m installclean
 $ m bootimage

The second `m bootimage` went from executing 666 actions in 93s to
executing 658 actions in 6s.

Finally, remove the last uses of $(call include-path-for,recovery),
since they were all in this file (and they weren't using it for include
paths...). We'd like to remove all of these and switch them to header
libraries or other use cases, but in this case, it's just shorter to use
the real path.

Test: treehugger
Test: m bootimage;
      touch bootable/recovery/tools/recovery_l10n/res/values/strings.xml
      m bootimage
Test: m bootimage; m installclean; m bootimage

Change-Id: I005592e49443aab45ed039a2f0c63f7a69035565
2020-05-27 19:37:03 -07:00
J. Avila 3f6560e626 Add build support for LZ4 ramdisks
Ramdisks are currently compressed using gzip, which is generally
smaller, but slower to decompress than lz4. Provide an option for an
lz4 scheme to reduce the time taken to unpack initramfs during boot.

Bug: 156129966
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
2020-05-27 23:44:33 +00:00
Mark Salyzyn 6ded8f2c8e depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD am: d702af1ef1
Change-Id: I15144046efd3c81694d369e2f41f4758ab9b1736
2020-05-27 18:05:45 +00:00
Mark Salyzyn d702af1ef1 depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD
If the BoardConfig defined BOARD_VENDOR_RAMDISK_MODULES_LOAD and
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.recovery respectively on the vendor
ramdisk.  BOARD_VENDOR_RAMDISK_MODULES must be the set, or super set,
of all the modules represented in both of *_LOAD BOARD variables.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: build, confirm, fastboot flashall, boot with split.
Merged-In: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
Change-Id: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
2020-05-27 13:26:00 +00:00
TreeHugger Robot 91ffe41134 Merge "Generate product build props always" into rvc-dev am: 0e5c584ba8
Change-Id: I08cf28a1048dcf8841ba8f7c031d025e023b098b
2020-05-27 04:59:21 +00:00
TreeHugger Robot 0e5c584ba8 Merge "Generate product build props always" into rvc-dev 2020-05-27 04:46:06 +00:00
J. Avila a2ceec665d Strip debug symbols from modules
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.

Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Merged-In: I248d4e2097992f00975b344b5da41aa5d8016812
Change-Id: I248d4e2097992f00975b344b5da41aa5d8016812
2020-05-26 23:35:26 +00:00
J. Avila 8aa3efe2ca Strip debug symbols from modules am: 43872f0eb7
Change-Id: I9d849158e6f8d2c448d03e85e53d95d123af98b3
2020-05-26 21:56:26 +00:00
Treehugger Robot 8e8993ebd9 Merge "depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD" am: a74d425017 am: 267a1bf446
Change-Id: Icd430bb2874ef086e359b8e237ada1e5fdde882c
2020-05-26 21:34:55 +00:00
Treehugger Robot a74d425017 Merge "depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD" 2020-05-26 21:10:54 +00:00
J. Avila 43872f0eb7 Strip debug symbols from modules
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.

Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: I248d4e2097992f00975b344b5da41aa5d8016812
2020-05-26 14:38:43 +00:00
SzuWei Lin 509cd70f42 Generate product build props always
GSI do not build product partition, and contains the product
contents under /system/product/. Original logic do not generate
the product build props on this case.

The patch fixes the logic for product build props generation to
align the other partitions.

Bug: 157191627
Test: build aosp_arm64-userdebug
Test: check /system/product/build.prop in out folder
Change-Id: I350bbf8c024f747c86c6c54065d690f6b46f30c6
Merged-In: Ia88c8efecb18db9c27baa466e492bfd898b581d3
2020-05-25 05:46:53 +00:00
Hongguang Chen da5d0463b0 Add options to sign the prebuilt custom images. am: d9edddd64d
Change-Id: I0fb400a0997d84a9e599ece52d5073fdb84132d0
2020-05-21 23:43:22 +00:00
Hongguang Chen d9edddd64d Add options to sign the prebuilt custom images.
The custom images are any images owned by OEMs and SoCs, oem images
mounted on /oem is an example. The oem images can be used to customize
devices for different carriers, like wallpaper, ringtones, and
carrier-specific apks. OEMs can generate multiple oem images, like
oem.img, oem-carrier1.img and oem-carrier2.img and flash different oem
images for different carriers. The oem images are only one case, OEMs
and SoCs can add more custom images and mount them to custom partitions.

This change enables custom images to be vbmeta.img chained partitions.
The following configuration in BoardConfig.mk is an exmaple. It has two
custom partitions: oem and test. They will be signed by different keys.
And they will be chained by vbmeta.img. The custom images here are
prebuilts, which can be built by `make custom_images` separately.
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST should include all custom images
to apply AVB signing. And to every custom partition, one image whose
name is partition name must be added in its
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST.

BOARD_CUSTOMIMAGES_PARTITION_LIST := oem test

BOARD_AVB_OEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_OEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_OEM_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_OEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_OEM_PARTITION_SIZE := 5242880
BOARD_AVB_OEM_IMAGE_LIST := \
    device/xxxx/yyyy/oem/oem.img \
    device/xxxx/yyyy/oem/oem1.img

BOARD_AVB_TEST_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_TEST_ALGORITHM := SHA256_RSA2048
BOARD_AVB_TEST_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_TEST_ROLLBACK_INDEX_LOCATION := 2
BOARD_AVB_TEST_PARTITION_SIZE := 10485760
BOARD_AVB_TEST_IMAGE_LIST := \
    device/xxxx/yyyy/test/test.img \
    device/xxxx/yyyy/test/test1.img

To resign the custom images in the target zip file, the
avb_extra_custom_image_key, avb_extra_custom_image_algorithms and
avb_extra_custom_image_extra_args options are added to the
sign_target_files_apks tool too. The following test cases list some
examples about how to use them.

BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
  2) Build images by 'make dist', sign and validate target files.
   a) Test on dist w/ chained vbmeta_system and ome custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the oem images and vbmeta images in OUT and target zips by
   avbtool.

   b) Test on dist w/ chained vbmeta_system and oem and test custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     --avb_extra_custom_image_extra_args oem=--do_not_generate_fec \
     --avb_extra_custom_image_key test=test_rsa4096.pem \
     --avb_extra_custom_image_algorithm test=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Verify the oem, test images and vbmeta images in OUT and target zips
   by avbtool.

   c) Test on dist w/o chained partition.
   sign_target_files_apks -d certs xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the vbmeta images in OUT and target zips by avbtool.

Change-Id: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
Merged-In: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
2020-05-21 22:22:19 +00:00
Treehugger Robot 9e55d3d282 Merge "Add options to sign the prebuilt custom images." am: 8a87dae43b am: 1c23d3ce54
Change-Id: Ife592f30393e0411cb9ca94a34409aa9f111e8ec
2020-05-21 17:10:36 +00:00
Treehugger Robot 8a87dae43b Merge "Add options to sign the prebuilt custom images." 2020-05-21 16:34:13 +00:00
Mark Salyzyn 4e20965769 depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD
If the BoardConfig defined BOARD_VENDOR_RAMDISK_MODULES_LOAD and
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.recovery respectively on the vendor
ramdisk.  BOARD_VENDOR_RAMDISK_MODULES must be the set, or super set,
of all the modules represented in both of *_LOAD BOARD variables.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: build, confirm, fastboot flashall, boot with split.
Change-Id: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
2020-05-20 14:44:01 -07:00
Yo Chiang 7644587bcc Merge "Resolve module bitness for PRODUCT_PACKAGES" am: 7c147f7e29 am: b5e015fa9e
Change-Id: If01ecd77e857d826f085cdcab18dd1c4c7506ff2
2020-05-20 05:38:34 +00:00
Yo Chiang 7c147f7e29 Merge "Resolve module bitness for PRODUCT_PACKAGES" 2020-05-20 04:55:22 +00:00
Treehugger Robot 26a01be6bc Merge changes I80341c2e,I0935f611,Ia805cb47 am: 3dbbfde296 am: 68e66200f2
Change-Id: I0bd92a44d7507ef2f695a342878a37859b69fc82
2020-05-20 04:20:18 +00:00
Hongguang Chen f23364d280 Add options to sign the prebuilt custom images.
The custom images are any images owned by OEMs and SoCs, oem images
mounted on /oem is an example. The oem images can be used to customize
devices for different carriers, like wallpaper, ringtones, and
carrier-specific apks. OEMs can generate multiple oem images, like
oem.img, oem-carrier1.img and oem-carrier2.img and flash different oem
images for different carriers. The oem images are only one case, OEMs
and SoCs can add more custom images and mount them to custom partitions.

This change enables custom images to be vbmeta.img chained partitions.
The following configuration in BoardConfig.mk is an exmaple. It has two
custom partitions: oem and test. They will be signed by different keys.
And they will be chained by vbmeta.img. The custom images here are
prebuilts, which can be built by `make custom_images` separately.
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST should include all custom images
to apply AVB signing. And to every custom partition, one image whose
name is partition name must be added in its
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST.

BOARD_CUSTOMIMAGES_PARTITION_LIST := oem test

BOARD_AVB_OEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_OEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_OEM_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_OEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_OEM_PARTITION_SIZE := 5242880
BOARD_AVB_OEM_IMAGE_LIST := \
    device/xxxx/yyyy/oem/oem.img \
    device/xxxx/yyyy/oem/oem1.img

BOARD_AVB_TEST_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_TEST_ALGORITHM := SHA256_RSA2048
BOARD_AVB_TEST_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_TEST_ROLLBACK_INDEX_LOCATION := 2
BOARD_AVB_TEST_PARTITION_SIZE := 10485760
BOARD_AVB_TEST_IMAGE_LIST := \
    device/xxxx/yyyy/test/test.img \
    device/xxxx/yyyy/test/test1.img

To resign the custom images in the target zip file, the
avb_extra_custom_image_key, avb_extra_custom_image_algorithms and
avb_extra_custom_image_extra_args options are added to the
sign_target_files_apks tool too. The following test cases list some
examples about how to use them.

BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
  2) Build images by 'make dist', sign and validate target files.
   a) Test on dist w/ chained vbmeta_system and ome custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the oem images and vbmeta images in OUT and target zips by
   avbtool.

   b) Test on dist w/ chained vbmeta_system and oem and test custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     --avb_extra_custom_image_extra_args oem=--do_not_generate_fec \
     --avb_extra_custom_image_key test=test_rsa4096.pem \
     --avb_extra_custom_image_algorithm test=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Verify the oem, test images and vbmeta images in OUT and target zips
   by avbtool.

   c) Test on dist w/o chained partition.
   sign_target_files_apks -d certs xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the vbmeta images in OUT and target zips by avbtool.

Change-Id: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
2020-05-20 04:10:00 +00:00
TreeHugger Robot 411dc700fd Merge "support different boot partition sizes in aosp_arm64" into rvc-dev am: 27e8474d57
Change-Id: I66ad0cdcdb2c2eb29009439fb27c0b9e73d7dab4
2020-05-20 03:49:47 +00:00
Treehugger Robot 3dbbfde296 Merge changes I80341c2e,I0935f611,Ia805cb47
* changes:
  Deprecate ADDITIONAL_DEFAULT_PROPERTIES
  Move most of the sysprop generation rules to sysprop.mk
  Add PLATFORM_VERSION_LAST_STABLE
2020-05-20 03:49:26 +00:00
Yifan Hong 65afc07f9d Support forcefully generating non-AB packages.
Force generate a non-A/B update package when requested.

Bug: 154344887
Test: ota_from_target_files.py --force_non_ab ...
Test: apply it as well

Change-Id: I5e81eb161722e07ef50081b6a16685cbc9963ae2
(cherry picked from commit 7169f754cc)
Merged-In: I5e81eb161722e07ef50081b6a16685cbc9963ae2
2020-05-19 15:23:27 -07:00
Treehugger Robot c7d65744c4 Merge "support different boot partition sizes in aosp_arm64" am: def74b4c2b am: 3bfb87b96b
Change-Id: Iff0c4a70c7a3ed43d2f96a72a0dd16c4301386f0
2020-05-19 22:02:28 +00:00
Steve Muckle 53226684b9 support different boot partition sizes in aosp_arm64
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.

This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.

A previous version of this change did not update the boot-debug image
AVB logic with the required macro for multiple boot partition size
support. This is now required because the aosp-arm64 boot.img is
configured as a chained AVB partition.

Bug: 156036850
Bug: 155049180
Change-Id: I66b57de91042bfd56ba54a3659843d8cf7873955
Merged-In: I66b57de91042bfd56ba54a3659843d8cf7873955
2020-05-19 14:37:40 -07:00
Treehugger Robot def74b4c2b Merge "support different boot partition sizes in aosp_arm64" 2020-05-19 21:30:07 +00:00
Jiyong Park e134686bca Move most of the sysprop generation rules to sysprop.mk
There is no change in functionality. This change just changes the
location of the code.

Bug: 117892318
Test: m
Change-Id: I0935f611069aeae867edefe8ca61bddb2aae4c78
2020-05-18 17:00:57 +09:00
Jiyong Park c969779a05 Add PLATFORM_VERSION_LAST_STABLE
This is a partial cherry-pick of Iaeefb35137de01c6ea57115d8830dd9bc30eccba
to prevent merge conflicts that are expected with the upcoming major
refactoring around sysprops.

The addition of the variable here doesn't cause any side effect because
it is simply ignored by the buildinfo.sh tool.

Bug: 117892318
Test: m
Change-Id: Ia805cb47ae07c40e91ede16bb6e5c4291de619b4
Merged-In: Iaeefb35137de01c6ea57115d8830dd9bc30eccba
2020-05-18 16:54:42 +09:00
TreeHugger Robot e5766f75a2 Merge "Enables signing for generic boot images" into rvc-dev am: 2fc5a393e0
Change-Id: I03be62b74631c13d75d014a3d20117bc1ec58dc0
2020-05-18 05:56:41 +00:00
Treehugger Robot b95ba0c9e4 Merge "Remove /default.prop" am: 3528db55f3 am: c7f65d7c5f
Change-Id: I9f603141ac5a9fa0b046eaabd60dc965c8f7bdfd
2020-05-16 09:11:34 +00:00
Treehugger Robot 3528db55f3 Merge "Remove /default.prop" 2020-05-16 08:39:56 +00:00
Treehugger Robot 43a1f47168 Merge "vendor_boot: remove INTERNAL_MKBOOTIMG_VERSION_ARGS from mkbootimg args" am: ff58fe4874 am: 3e7dadb73b
Change-Id: Iedc7d3106ef877936075731d6559a6b0fc0fbfb0
2020-05-16 00:46:11 +00:00
Treehugger Robot ff58fe4874 Merge "vendor_boot: remove INTERNAL_MKBOOTIMG_VERSION_ARGS from mkbootimg args" 2020-05-16 00:17:20 +00:00
Steve Muckle 903a1ca7e1 support different boot partition sizes in aosp_arm64
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.

This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.

A previous version of this change did not update the boot-debug image
AVB logic with the required macro for multiple boot partition size
support. This is now required because the aosp-arm64 boot.img is
configured as a chained AVB partition.

Bug: 156036850
Bug: 155049180
Change-Id: I66b57de91042bfd56ba54a3659843d8cf7873955
2020-05-15 10:16:17 -07:00
TreeHugger Robot 72824dfd27 Merge "package llvm-profdata in mainline_module_x86_coverage build target." into mainline-prod 2020-05-15 15:29:48 +00:00
Treehugger Robot 8e8444d4fe Merge changes from topic "remove_default_prop" am: 4e0bce688c am: 09dd92a862
Change-Id: If12633a2be57ffbb42d0306193a226164e77e2d4
2020-05-15 02:51:58 +00:00
Kun Niu d322d8d817 package llvm-profdata in mainline_module_x86_coverage build target.
Test: local build succeed.
Bug: 156165375
Change-Id: I903ca33a839ea25c39bef96f949ded78aacf5609
2020-05-14 16:32:29 -07:00
Paul Duffin 00f6a090c2 Merge "Revert "support different boot partition sizes in aosp_arm64"" am: 29beb858ef am: 61b3971e66
Change-Id: I9bfa60c9d39199735676b776cde921d9628c7209
2020-05-14 09:57:56 +00:00
Paul Duffin 29beb858ef Merge "Revert "support different boot partition sizes in aosp_arm64"" 2020-05-14 09:23:49 +00:00
Paul Duffin b5a334d0b3 Revert "support different boot partition sizes in aosp_arm64"
This reverts commit 11c4bcf406.

Reason for revert: Broke build b/156569314

Bug: 156569314
Change-Id: I384740320acf48d09b0544e45b5a13ff0a6a163d
2020-05-14 08:40:52 +00:00
Treehugger Robot 50639bd4cb Merge "support different boot partition sizes in aosp_arm64" am: ade028ea9e am: 6f978c6b7f
Change-Id: Icaf368a8bb753eff980bc053395ad09033dfd47d
2020-05-14 07:52:31 +00:00
Jiyong Park c47b4ee74b Remove /default.prop
It was kept for non-Treble devices, but now /system/build.prop is used
instead by having both system-configured sysprops and vendor-configured
sysprops. To summarize:

* For Treble compliant devices
- /system/build.prop has
  ADDITIONAL_DEFAULT_PROPERTIES
  PRODUCT_SYSTEM_DEFAULT_PROPERTIES
  props generated from buildinfo_common.sh
  props generated from buildinfo.sh
  props read from TARGET_SYSTEM_PROP file
  ADDITIONAL_BUILD_PROPERTIES

- /vendor/build.prop has
  PRODUCT_DEFAULT_PROPERTY_OVERRIDES
  props generated from buildinfo_common.sh
  props read from TARGET_VENDOR_PROP
  PRODUCT_PROPERTY_OVERRIDES

* For non-Treble devices,
PRODUCT_DEFAULT_PROPERTY_OVERRIDES moves from /vendor/build.prop to
/system/build.prop (just after PRODUCT_SYSTEM_DEFAULT_PROPERTIES).

Other props in /vendor/build.prop remain there but they are not used
because it's a symlink for /system/vendor/build.prop and init does not
follow symlink. Especially, PRODUCT_PROPERTY_OVERRIDES is ignored.
Someone might think this as a bug, which actually is, but this change
doesn't attempt to fix that, because 1) that's out of scope of this
change, and 2) we will anyway merge PRODUCT_PROPERTY_OVERRIDES and
PRODUCT_DEFAULT_PROPERTY_OVERRIDES into one.

Bug: 117892318
Test: TH passes

Change-Id: I867f3615ef8c06650ab2ee96642bac4f6d8ca820
2020-05-14 16:46:26 +09:00
Jiyong Park 09153e244e Remove /system/etc/prop.default
Contents that were in /system/etc/prop.default are now in
/system/build.prop.

The content is placed at the top of build.prop to keep the existing
order between the two files.

Caveat: /prop.default still remains for non-Treble devices.

Bug: 117892318
Test: TH passes
Test: inspect  /system/build.prop and check if it has contents from
the old /system/etc/prop.default file

Change-Id: Ibc74edb88904f953a1e5e6ceef44c461f381c9cf
2020-05-14 16:28:19 +09:00
Jiyong Park b894d4bb68 Remove /vendor/default.prop
Contents that were in /vendor/default.prop are now in /vendor/build.prop

The content is placed at the top of build.prop to keep the existing
order between default.prop and builld.prop.

Bug: 117892318
Test: TH passes
Test: inspect  /vendor/build.prop and check if it has contents from
the old /vendor/default.prop file

Change-Id: Ifa1f1dca3b4f4a5fa87d26b8ee058ee706dc54bb
2020-05-14 16:19:32 +09:00
Treehugger Robot ade028ea9e Merge "support different boot partition sizes in aosp_arm64" 2020-05-14 07:05:31 +00:00
Bowgo Tsai d55fbd365a Enables signing for generic boot images
Enables signing for them so we can verify that the boot partition
contains a valid generic boot image during the compliance test.

This change also adds the chained partition descriptor of
boot partition into vbmeta.img, which contains the corresponding
public key used to verify the boot partition.

Bug: 151094943
Test: lunch aosp_arm64-user, `make` and use `avbtool info_image`
      to check that GKI images are properly signed.
Test: `make dist` and checks that GKI images in the image zip file
      are properly signed.
Change-Id: I2fd69964f9dc62526a813875fa9193913aa4935b
Merged-In: I2fd69964f9dc62526a813875fa9193913aa4935b
(cherry picked from commit 0f95ac7e8c)
2020-05-14 13:01:37 +08:00
Yo Chiang 5e85bfe3a3 Resolve module bitness for PRODUCT_PACKAGES
PRODUCT_PACKAGES contains "simple module name" and "bitness suffix".
Call `resolve-bitness-for-modules` to resolve module bitness before
using PRODUCT_PACKAGES.

Bug: 155869107
Test: TH presubmit build_test
Test: check the value of event_log_tags_src
Change-Id: I95fcd833990b3401892c2f7859c83acd90f9e920
2020-05-14 04:07:56 +00:00
Steve Muckle a9241f6d51 Merge "Enables signing for generic boot images" am: 70ef6fd4f2 am: 0d121f4d2e
Change-Id: I8bcd054148f76c4d065cd8526327d91f04411689
2020-05-13 20:11:49 +00:00
Steve Muckle 70ef6fd4f2 Merge "Enables signing for generic boot images" 2020-05-13 19:36:56 +00:00
Yifan Hong 010d320848 resolve merge conflicts of 7169f754cc to rvc-dev-plus-aosp
Change-Id: Ic1a44cfe929707e2fb76282dcd06f839a8159735
2020-05-13 17:44:04 +00:00
TreeHugger Robot 4d8e9cc847 Merge changes from topic "nonab_on_vab_r" into rvc-dev
* changes:
  Use add_slot_suffix function in edify script
  Support forcefully generating non-AB packages.
2020-05-13 17:26:44 +00:00
Steve Muckle 11c4bcf406 support different boot partition sizes in aosp_arm64
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.

This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.

Bug: 156036850
Bug: 155049180
Change-Id: I73b70a4d52c2662c3015899632bb8a2b424108d5
2020-05-12 16:51:45 -07:00
cfig 125efba2bf
vendor_boot: remove INTERNAL_MKBOOTIMG_VERSION_ARGS from mkbootimg args
'os_version' and 'os_patch_level' are not defined in vendor boot image header,
so remove INTERNAL_MKBOOTIMG_VERSION_ARGS to avoid confusion

Test: lunch aosp_cf_x86_64_phone-userdebug; m vendorbootimage

Change-Id: I19c82846c9669bbd5475605e8b2457744040390d
2020-05-11 15:01:53 +08:00
Yo Chiang 9aa6f2ac0d Merge "Ban ELF prebuilts in PRODUCT_COPY_FILES" am: 6190f6910f am: 62353ad6cc
Change-Id: Iaab5fa62f64a83ceca7563aec38c6c4042d36702
2020-05-11 05:42:24 +00:00
Yo Chiang 6190f6910f Merge "Ban ELF prebuilts in PRODUCT_COPY_FILES" 2020-05-11 05:14:29 +00:00
Bowgo Tsai 0f95ac7e8c Enables signing for generic boot images
Enables signing for them so we can verify that the boot partition
contains a valid generic boot image during the compliance test.

This change also adds the chained partition descriptor of
boot partition into vbmeta.img, which contains the corresponding
public key used to verify the boot partition.

Bug: 151094943
Test: lunch aosp_arm64-user, `make` and use `avbtool info_image`
      to check that GKI images are properly signed.
Test: `make dist` and checks that GKI images in the image zip file
      are properly signed.
Change-Id: I2fd69964f9dc62526a813875fa9193913aa4935b
2020-05-08 08:16:25 +00:00
Yifan Hong 7169f754cc Support forcefully generating non-AB packages.
Force generate a non-A/B update package when requested.

Bug: 154344887
Test: ota_from_target_files.py --force_non_ab ...
Test: apply it as well

Change-Id: I5e81eb161722e07ef50081b6a16685cbc9963ae2
2020-05-07 12:48:17 -07:00
Jiyong Park 7b96c59751 Stem names are used in apkcerts.txt
_apkcerts_write_line has assumed that the stem name of a package is the
same as the module of it. That assumption however breaks for
APK-in-APEX, in which case the stem name is Foo while the module name is
Foo.com.android.bar (where com.android.bar is the name of the APEX where
the APK is in).

Fixing the issue by recording the stem name and use it.

Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generat4ed apkcerts txt file to see that it has
Tethering.apk instead of Tethering.com.android.tethering.apex

Exempt-From-Owner-Approval: cherry-pick from AOSP

Merged-In: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
(cherry picked from commit f58fd52b14)
Change-Id: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
2020-05-02 18:29:24 +09:00
Bo Hu 4d6f4f6c9e emulator: enable vendor boot image
BUG: 149826779
Test: Build x86, x86_64, armv7 and arm64
make sure x86/64 boot to home screen;
armv7/arm64 can pass disk mounting stage

Change-Id: I258b69bd0cdc4fb0a99b1a04567051e8d32c389a
Merged-In: I258b69bd0cdc4fb0a99b1a04567051e8d32c389a
2020-05-01 20:01:40 +00:00
Jiyong Park 01a29d7f5e Stem names are used in apkcerts.txt am: f58fd52b14
Change-Id: I218ba6d6ce5859ce0c7927189d1301d7b84f81d2
2020-05-01 18:08:44 +00:00
Jiyong Park f58fd52b14 Stem names are used in apkcerts.txt
_apkcerts_write_line has assumed that the stem name of a package is the
same as the module of it. That assumption however breaks for
APK-in-APEX, in which case the stem name is Foo while the module name is
Foo.com.android.bar (where com.android.bar is the name of the APEX where
the APK is in).

Fixing the issue by recording the stem name and use it.

Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generat4ed apkcerts txt file to see that it has
Tethering.apk instead of Tethering.com.android.tethering.apex

Change-Id: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
2020-05-01 13:13:13 +00:00
Yifan Hong d2b683e19f Merge "Adjust partition size checks for recovery resources" am: 50ea3f49c5 am: 63dcb01eb3
Change-Id: I856a0589d2fa5529e00e9d7fb188e508a8bbb1c3
2020-04-30 00:00:14 +00:00
Yifan Hong 8ea29213e2 Adjust partition size checks for recovery resources
RECOVERY_FROM_BOOT_PATCH has been moved to vendor as per b/68319577. Hence,
the reserved size should be moved from system to vendor as well.

Bug: 68319577
Bug: 153581609
Test: m target-files-package for non-A/B devices

Change-Id: I2fd3fea10ec6dd06f19c5be753d63ddff1ec01f7
(cherry picked from commit 9a3cad95a9)
Merged-In: I2fd3fea10ec6dd06f19c5be753d63ddff1ec01f7
2020-04-29 16:34:35 -07:00
Yifan Hong 50ea3f49c5 Merge "Adjust partition size checks for recovery resources" 2020-04-29 23:34:06 +00:00
Treehugger Robot b50843c57f Merge changes I17671ca2,I4e6d9d93,Ia43cbbd0 am: 8bd7c4f3cc am: ccb927b9c4
Change-Id: Iffdd112cdabe367b74c9855d77e0760574e49eef
2020-04-29 02:13:58 +00:00
Yifan Hong 9a3cad95a9 Adjust partition size checks for recovery resources
RECOVERY_FROM_BOOT_PATCH has been moved to vendor as per b/68319577. Hence,
the reserved size should be moved from system to vendor as well.

Bug: 68319577
Bug: 153581609
Test: m target-files-package for non-A/B devices

Change-Id: I2fd3fea10ec6dd06f19c5be753d63ddff1ec01f7
2020-04-28 16:27:24 -07:00
Dan Willemsen f4cbafa724 Use .KATI_IMPLICIT_OUTPUTS in build/make/core/Makefile
There were still two places where we weren't using it. There may be
more, but these are the ones that come up with aosp_cf_x86_phone.

Test: m out/target/product/vsoc_x86/root/default.prop
Test: m out/target/product/vsoc_x86/obj/NOTICE_VENDOR.txt
Change-Id: I17671ca2ed60332aed2bf76aa00e42a92661b58a
2020-04-28 15:57:32 -07:00
TreeHugger Robot 04735a8ef2 Merge changes I465ea6c9,I57b77d7c,I536a286d,Ie16a7bf7 into rvc-dev
* changes:
  generate multiple boot.img files in aosp_arm64
  create emulator_arm64 device for sdk_phone_arm64 to use
  support multiple boot.img files in release tools
  multi boot.img support cleanups
2020-04-23 23:20:16 +00:00
Steve Muckle 4b6b2003a9 generate multiple boot.img files in aosp_arm64
Generate boot.img variants with different schemes for kernel compression
(gzip, lz4, none).

The boot image is removed from vbmeta for aosp_arm64 since it is
not possible currently to store the hashes of multiple variants of a
particular image. The GKI will be verified via VTS anyway.

Also remove some emulator-specific stuff from aosp_arm64.

Bug: 151094943
Change-Id: I465ea6c98d52e839284d51b246203f6b8dfb5566
Merged-In: I465ea6c98d52e839284d51b246203f6b8dfb5566
2020-04-22 11:48:52 -07:00
Steve Muckle f83e3c3c3f support multiple boot.img files in release tools
Support for generating multiple boot.img files is required in the
release tools to enable GKI distribution/signing.

Bug: 151094943
Change-Id: I536a286d3123f35918106a52c49b1148d746370f
Merged-In: I536a286d3123f35918106a52c49b1148d746370f
2020-04-22 11:14:05 -07:00
Steve Muckle 8f670ebae7 multi boot.img support cleanups
The kernel should not be specified in INTERNAL_RECOVERYIMAGE_ARGS, since
it is already given to mkbootimg directly.

The MKBOOTIMG_KERNEL_ARG macro is unused.

Bug: 151094943
Change-Id: Ie16a7bf7d77c0436d933abbb02c6dcb9202d5fe7
Merged-In: Ie16a7bf7d77c0436d933abbb02c6dcb9202d5fe7
2020-04-22 11:13:43 -07:00
Oliver Nguyen 389cd00ca0 Export llvm-profdata for Clang coverage builds.
This tool must match the one used to compile the source code for
compatibility.

Bug: 143977934
Test: m CLANG_COVERAGE=true dist
Merged-In: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
Change-Id: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
(cherry picked from commit b02f7dbaa4)
2020-04-22 10:20:55 -07:00
Treehugger Robot b1923eabc0 Merge changes I465ea6c9,I57b77d7c am: be01cf841e am: 85ec063adf
Change-Id: I27699d706b0b4717c7687f38d838295848f0f768
2020-04-22 04:16:57 +00:00
Treehugger Robot be01cf841e Merge changes I465ea6c9,I57b77d7c
* changes:
  generate multiple boot.img files in aosp_arm64
  create emulator_arm64 device for sdk_phone_arm64 to use
2020-04-22 03:45:49 +00:00
Treehugger Robot 958f84ba06 Merge "support multiple boot.img files in release tools" am: dd9690162f am: cb1cefee02
Change-Id: I79f9e6753e2d950442c7c14233e163b82fb4d645
2020-04-20 08:49:10 +00:00
Treehugger Robot dd9690162f Merge "support multiple boot.img files in release tools" 2020-04-20 08:13:36 +00:00
Steve Muckle 0959fbfd2e generate multiple boot.img files in aosp_arm64
Generate boot.img variants with different schemes for kernel compression
(gzip, lz4, none).

The boot image is removed from vbmeta for aosp_arm64 since it is
not possible currently to store the hashes of multiple variants of a
particular image. The GKI will be verified via VTS anyway.

Also remove some emulator-specific stuff from aosp_arm64.

Bug: 151094943
Change-Id: I465ea6c98d52e839284d51b246203f6b8dfb5566
2020-04-20 05:31:15 +00:00
Yo Chiang b301fd5434 Merge "Check ELF prebuilts in PRODUCT_COPY_FILES" am: 2cbcf3bda2 am: 85e68e75f1
Change-Id: Ifb30cc6423b03d9468ec949ba862c61d70085f4f
2020-04-17 01:41:49 +00:00
Yo Chiang 2cbcf3bda2 Merge "Check ELF prebuilts in PRODUCT_COPY_FILES" 2020-04-17 01:06:32 +00:00
Steve Muckle 9793cf6c8a support multiple boot.img files in release tools
Support for generating multiple boot.img files is required in the
release tools to enable GKI distribution/signing.

Bug: 151094943
Change-Id: I536a286d3123f35918106a52c49b1148d746370f
2020-04-16 17:54:25 -07:00