Commit Graph

2935 Commits

Author SHA1 Message Date
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
Treehugger Robot 624dfefb33 Merge "multi boot.img support cleanups" am: cffe5615f6 am: 140ae5e93b
Change-Id: Iffe07623699e56a3ed0d7d5e7655ffc5f4610d2b
2020-04-16 23:52:25 +00:00
Steve Muckle 10346271fd 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
2020-04-15 14:32:39 -07:00
Treehugger Robot dbd9d4b3d0 Merge "Enable non-v3 recovery image with v3 boot image" am: 44bb05c328 am: 1c8e2eaf4a
Change-Id: Ic80192e5526e6b748a2a058a495613f14e3513b0
2020-04-14 23:13:25 +00:00
Steve Muckle 759d0c8cb2 Enable non-v3 recovery image with v3 boot image
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.

Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
Merged-In: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
2020-04-14 15:40:01 -07:00
Steve Muckle f84668e1da Enable non-v3 recovery image with v3 boot image
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.

Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
2020-04-14 13:03:58 -07:00
Yo Chiang 73d3148c5f Ban ELF prebuilts in PRODUCT_COPY_FILES
ELF prebuilts in PRODUCT_COPY_FILES are an build error.
Define prebuilt modules and add them to PRODUCT_PACKAGES instead.

To triage any build break caused by this change, temporarily opt out
this check by setting
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true in BoardConfig.mk.

Bug: 140560012
Test: build_test & verify that either PRODUCT_COPY_FILES has no ELF \
      prebuilt or BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES is true
Change-Id: I9dcbe7b68c38fc23dac91fe5751cbc478105656e
2020-04-08 18:02:56 +08:00
Yo Chiang 0b49c03727 Check ELF prebuilts in PRODUCT_COPY_FILES
Add a check to ban ELF prebuilts in PRODUCT_COPY_FILES.
ELF prebuilts should be defined properly by cc_prebuilt_library_shared
and cc_prebuilt_binary so that the build system can keep track of the
file dependencies.

To opt in this check, set this option in BoardConfig.mk:
  BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := false

After all devices that have ELF prebuilts in PRODUCT_COPY_FILES are
tagged with BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true flip
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES to default false.

After a device is cleaned up, remove its
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true setting.

Bug: 140560012
Test: Set BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := false
Test: m # Should report any ELF prebuilt error in PRODUCT_COPY_FILES
Change-Id: Id75dac9417aed9baa7c5e9388430ff9369cf9b4f
2020-04-08 18:01:24 +08:00
Bo Hu f38abd4342 Merge "emulator: enable vendor boot image" am: ac74429171 am: e8966440c4
Change-Id: I69146442436f233b12989be15cb6f41a61a61450
2020-04-06 19:52:16 +00:00
bohu 8fd437c80a 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
2020-04-06 14:05:28 +00:00
Steve Muckle 6e038c3183 fix boot-test-harness.img build
The recently added support for multiple kernels and boot.img files
missed the boot-test-harness.img.

Bug: 152464066
Change-Id: I6e146a0702bc933e0b62f36dc34aba913e57316f
Merged-In: I6e146a0702bc933e0b62f36dc34aba913e57316f
2020-04-03 11:12:48 -07:00
Steve Muckle 39ab00b6fe support multiple kernels, boot.img output
In order to enable the delivery of multiple kernel variants with
a platform build, add support for generating boot.img files from
multiple kernels.

The BOARD_KERNEL_BINARIES macro may be defined as a list of kernel
binaries to be used (if not, the original behavior and assumption of a
single kernel binary is preserved). Each kernel binary filename
must begin with "kernel". Any extra text in the filename is appended
to the boot.img name, so "kernel-gz" would generate "boot-gz.img".

Bug: 151094943
Change-Id: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
Merged-In: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
2020-04-03 11:12:24 -07:00
Treehugger Robot c273484c9b Merge "fix boot-test-harness.img build" am: 40ddffe600 am: ccae3087be
Change-Id: Icec1125b98e59bd5e09e13ec32ca8c9fef9dd208
2020-04-03 16:24:13 +00:00
Treehugger Robot 40ddffe600 Merge "fix boot-test-harness.img build" 2020-04-03 15:33:31 +00:00
Anton Hansson 0af644cd37 Merge "Reland: Remove empty newline in build.prop" am: a0ef52302e am: de9f09c789
Change-Id: I2d48ffa6aa596f00d4e9b39c8d2530c06a5610f8
2020-04-03 12:35:47 +00:00
Steve Muckle 4866bd6bff fix boot-test-harness.img build
The recently added support for multiple kernels and boot.img files
missed the boot-test-harness.img.

Bug: 152464066
Change-Id: I6e146a0702bc933e0b62f36dc34aba913e57316f
2020-04-02 12:37:04 -07:00
Bill Peckham 8676f639f3 Build merged apexkeys.txt/apkcerts.txt by partition.
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.

Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Merged-In: Ic3226728e97dae84d38ec230ccc86d1b124bea94
2020-04-02 17:16:01 +00:00
Luca Stefani 033c7eb82f Reland: Remove empty newline in build.prop
Before:
cat build.prop

\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

After
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

Change-Id: I8365bb59ad22a3bd9fc1dc904ff2026ddd7abe06
Test: m
2020-04-01 12:55:27 +02:00
Tianjie Xu 715a8c7f4f Merge "Add aftl inclusion proof" am: a3541df291 am: 0a75716351
Change-Id: I606fb30775c3d34a3d0ec42c09955af4d127dee3
2020-03-31 22:43:51 +00:00
Tianjie Xu a3541df291 Merge "Add aftl inclusion proof" 2020-03-31 22:12:46 +00:00
Bo Hu 15fa044a04 Merge "Revert "Remove empty newline in build.prop"" am: c969dcc0b2 am: fe544f570d
Change-Id: Ic132ab04cde863cb39da47fa7f0cfc32e0be5136
2020-03-31 21:51:33 +00:00
Bo Hu c969dcc0b2 Merge "Revert "Remove empty newline in build.prop"" 2020-03-31 21:27:21 +00:00
Bo Hu 76a005da8d Revert "Remove empty newline in build.prop"
This reverts commit 96a79c6f65.

Reason for revert: b/152899887
original cl leads to build.prop getting longer and longer
from 60+ to 1k+ lines and keep increasing

Exempt-From-Owner-Approval:
BUG: 152899887

Change-Id: I83ed1702009278014c77d7e7a7305756041564de
2020-03-31 21:26:58 +00:00
Bill Peckham 5af467fbe6 Merge "Build merged apexkeys.txt/apkcerts.txt by partition." am: ad10b96768 am: 3eb546a636
Change-Id: I29fb3c6bc8c8497a9168d8efcbe1ddaa5ea0e71a
2020-03-31 14:14:49 +00:00
Bill Peckham 19c3feb2d3 Build merged apexkeys.txt/apkcerts.txt by partition.
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.

Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
2020-03-30 22:33:27 +00:00
Oliver Nguyen 6dae809d10 Merge "Export llvm-profdata for Clang coverage builds." am: 337f42e7d1 am: 09344d49c6
Change-Id: I0f2c987c86bd1ecb86b1d1f6b034486568486ca7
2020-03-30 21:13:12 +00:00
Oliver Nguyen 337f42e7d1 Merge "Export llvm-profdata for Clang coverage builds." 2020-03-30 20:38:22 +00:00
Treehugger Robot 3dcbcab2aa Merge "Remove empty newline in build.prop" am: 4777f97dc8 am: 564665f5fc
Change-Id: I88b440fed3b25ce56d6921309bb138b8a906ecf5
2020-03-27 16:37:38 +00:00
Luca Stefani 96a79c6f65 Remove empty newline in build.prop
Before:
cat build.prop

\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

After
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

Change-Id: I55a9cdc9a93e2d72ba4db97fef4c5e8c67421026
Test: m
2020-03-27 12:38:25 +00:00
Treehugger Robot 203174b91e Merge "support multiple kernels, boot.img output" am: 1973f86ffd am: 03caf970e3
Change-Id: I735b640f207b1c569730053a3804fee236a8ee40
2020-03-25 18:57:10 +00:00
Treehugger Robot 1973f86ffd Merge "support multiple kernels, boot.img output" 2020-03-25 18:23:15 +00:00
Steve Muckle b3dda77f2a support multiple kernels, boot.img output
In order to enable the delivery of multiple kernel variants with
a platform build, add support for generating boot.img files from
multiple kernels.

The BOARD_KERNEL_BINARIES macro may be defined as a list of kernel
binaries to be used (if not, the original behavior and assumption of a
single kernel binary is preserved). Each kernel binary filename
must begin with "kernel". Any extra text in the filename is appended
to the boot.img name, so "kernel-gz" would generate "boot-gz.img".

Bug: 151094943
Change-Id: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
2020-03-24 11:27:57 -07:00
Aurimas Liutikas 7a1823a5f3 Remove unnecessary dependency.
This dependency is now defined in ALL_SDK_FILES.

Test: lunch sdk; make sdk
Bug: 151160048

Change-Id: Ia740466e493d745d83039ba9991547a6c2d3bd2c
Merged-in: Ia740466e493d745d83039ba9991547a6c2d3bd2c
2020-03-23 19:17:13 +00:00
Yifan Hong 174b5be0bb Also check empty SKU if SKUS are not defined
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.

Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.

Fixes: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
Merged-In: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
2020-03-19 21:36:59 +00:00
Yifan Hong b284e367bf Merge changes from topic "vendor_sku" am: d6077aa7ca am: b8ecdfdd05
Change-Id: I7cf8a4e94ca9ea2da8300ca5193eb37307da38e2
2020-03-19 01:30:41 +00:00
Tianjie Xu eaed60c1a1 Add aftl inclusion proof
The otatools should talk to the aftl server and append the inclusion
proofs when building the vbmeta image. We should only do this during the
signing process when the network is always available.

Also the inclusion proof doesn't impact the final vbmeta image size on
coral, where the final size is 8192 after padding. This is below the
physical image of 65536.

Bug: 147870995
Test: unit tests pass, run sign_target_file_apks
Change-Id: If84c6bf5198c9b05f5e0c16ae6335971915f47e3
2020-03-18 13:11:41 -07:00
Yifan Hong 69430e65fe Also check empty SKU if SKUS are not defined
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.

Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.

Bug: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
2020-03-17 20:27:32 -07:00
Automerger Merge Worker 0de248e7eb Merge changes from topic "vendor_sku" am: 352e6a4d18 am: 01f66b11a1
Change-Id: I761041be4b353135edccbb537d28c6e668da1adc
2020-03-16 22:40:50 +00:00
Yifan Hong 922c38fb6e Proper checks for vendor and ODM SKUs
If DEVICE_MANIFEST_FILE / ODM_MANIFEST_FILES is set, also include check
for empty vendor / odm SKU, respectively. Then, do cross product of
vendor SKUs and ODM skus, and check each possible combination.

Test: build with and without vendor skus
Test: m check-vintf-all
Bug: 148601741

Change-Id: I23cc81998e7afc36c43540bf6d615b4d4b288447
Merged-In: I23cc81998e7afc36c43540bf6d615b4d4b288447
2020-03-16 15:06:11 -07:00
Yifan Hong 28ffd73591 Proper checks for vendor and ODM SKUs
If DEVICE_MANIFEST_FILE / ODM_MANIFEST_FILES is set, also include check
for empty vendor / odm SKU, respectively. Then, do cross product of
vendor SKUs and ODM skus, and check each possible combination.

Test: build with and without vendor skus
Test: m check-vintf-all
Bug: 148601741

Change-Id: I23cc81998e7afc36c43540bf6d615b4d4b288447
2020-03-13 18:32:07 -07:00
Automerger Merge Worker ec8fb6dd29 Merge "Remove unnecessary dependency." am: 1ee63b0b05 am: c4c7e93a8f
Change-Id: Ibaec17613991d0e236ddc374d6151c0ac856dc8d
2020-03-13 02:44:21 +00:00
Aurimas Liutikas cd80e3b9eb Remove unnecessary dependency.
This dependency is now defined in ALL_SDK_FILES.

Test: lunch sdk; make sdk
Change-Id: Ia740466e493d745d83039ba9991547a6c2d3bd2c
2020-03-12 16:12:27 -07:00
Oliver Nguyen b02f7dbaa4 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
Change-Id: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
2020-03-10 17:07:58 -07:00
Automerger Merge Worker ff5d065616 Merge "Trim down dont_bother_goals" am: 90d4027542 am: 67729d8689
Change-Id: Iee4e110db8f0e62d7a3a9e5038e2835b918de8c1
2020-03-06 00:39:48 +00:00
Dan Willemsen 395358edae Trim down dont_bother_goals
This had caused the nodeps targets to break when I added the
auto-cleanup feature, as we wrote out smaller lists of what was
installed. The functionality of dont_bother_goals is also being fixed in
https://android-review.googlesource.com/c/platform/build/+/1250929/

But there's also no reason to have all of these targets in
dont_bother_goals, as they can just re-use the cached kati build graph.

Bug: 149460609
Test: m systemimage && m snod    <did not delete everything>
Test: m snod    <still see warning>
Test: codesearch for uses of MAKECMDGOALS and these targets
Change-Id: Ib8e7ba67e5ad980be4bdcf521c5156eea7941f97
2020-03-05 00:21:25 +00:00
Automerger Merge Worker d7f63ec865 Merge "Partition the targets for notice files." am: 684350d24f am: 2150099d65
Change-Id: I13c83c65f6659feb9618124ab0878f3433a85479
2020-02-27 15:40:55 +00:00
Bob Badour 4b25c90e52 Partition the targets for notice files.
Partition the targets into those appearing in system images, those
appearing somewhere unreadable by the Settings UI, whose notices
must appear in a readable system image, and those not appearing
on the device thus not needing notices. Assert no other targets
appear under $(PRODUCT_OUT).

Test: manually built and tested phone image

Change-Id: If82cb36f98f8e6066d1c67bb4d15976be433d403
2020-02-26 16:49:28 -08:00
Automerger Merge Worker 4c95a5a6eb Merge "do not clear output kernel module directory" am: 733ad20963 am: d8d9a50090 am: 19c6758950
Change-Id: I4f8eb228d8b0e2658039ec13c81931b2c16bfee7
2020-02-21 01:39:25 +00:00
Treehugger Robot 733ad20963 Merge "do not clear output kernel module directory" 2020-02-21 01:02:09 +00:00
Steve Muckle 5e0ff33d0f do not clear output kernel module directory
When using an archive to provide kernel modules, the archive is directly
expanded into the output directory. The output directory is currently
removed prior to that to ensure no stale modules are present if they
were removed as part of a change in an incremental build.

Unfortunately if kernel modules are also provided via the regular
BOARD_*_KERNEL_MODULES macros, the removal of the output kernel module
directory will race with the copying of kernel modules in
BOARD_*_KERNEL_MODULES, resulting in some of those kernel modules not
being present in the output.

Kernel modules removed from BOARD_*_KERNEL_MODULES do not currently get
removed from the output directory in an incremental build anyway. So in
order to support using BOARD_*_KERNEL_MODULES and
BOARD_*_KERNEL_MODULES_ARCHIVE conurrently, take out the removal of the
output directory prior to archive expansion.

Bug: 149866863
Change-Id: Ib373650ddcb0fb5782a13d68a8869a9117e42ccc
2020-02-20 10:19:06 -08:00
Automerger Merge Worker dfa3d23969 Merge "Adding vendor_boot-debug.img" am: 31d4a5aed7 am: e1570cb99d am: a20bb6522a
Change-Id: Ic5ec4776d4daa91a1423b65d96e34026756ae9ad
2020-02-20 04:44:58 +00:00
Treehugger Robot 31d4a5aed7 Merge "Adding vendor_boot-debug.img" 2020-02-20 03:56:58 +00:00
Automerger Merge Worker 9c4b8cbd74 Merge "Support empty jacoco-report-classes.jar" am: 62eee30f34 am: d9bbafdbf2 am: 79b758946c
Change-Id: I161554f309cd8876fcc4f6a260078d63e5055fa4
2020-02-19 22:44:27 +00:00
Treehugger Robot 62eee30f34 Merge "Support empty jacoco-report-classes.jar" 2020-02-19 20:30:46 +00:00
Automerger Merge Worker 376388182c Merge "Add a new make target called `haiku-line-coverage`" am: 54839bb77e am: cfb18c0777 am: 49bd5e67a2
Change-Id: Ia99c192efda66997ac4de3c7313e8cba3889e9ae
2020-02-19 20:20:25 +00:00
Kyriakos Ispoglou 54839bb77e Merge "Add a new make target called `haiku-line-coverage`" 2020-02-19 19:07:20 +00:00
Automerger Merge Worker d3b880f22c Merge "build: Add vendor.prop and odm.prop capability" am: 6ed2deb9d5 am: a392047a05 am: b5a37417a0
Change-Id: I32b437a819477b3d5a0c086e78b3982627a69bba
2020-02-18 22:29:27 +00:00
Treehugger Robot 6ed2deb9d5 Merge "build: Add vendor.prop and odm.prop capability" 2020-02-18 21:45:08 +00:00
Bowgo Tsai 6a68367e6e Adding vendor_boot-debug.img
Commit I30137c3caef91805d9143d404e5e4d06c0fccc30 adds boot-debug.img
to allow adb root with an user build GSI image.

  https://source.android.com/compatibility/vts/vts-on-gsi

Another commit I5b005097b73f59857c3a2f92d693b3e67ee8424e adds
vendor_boot.img to pair with a generic kernel image, the GKI boot.img.

To allow adb root for devices using a GKI, vendor_boot-debug.img is
introduced. The image combination used in VTS will be:

    Old devices without GKI:
      GSI system.img + boot-debug.img + vendor.img, etc.

    New devices with GKI:
      GSI system.img + GKI boot.img + vendor_boot-debug.img + vendor.img, etc.

Note that boot-debug.img still can be used on new devices for
non-compliance scenario.

Bug: 147849477
Test: lunch aosp_cf_x86_64_phone-userdebug; make vendorbootimage_debug
Test: `make dist`, checks that both vendor_boot-debug.img and
      vendor-ramdisk-debug.cpio.gz are in $OUT/ and out/dist.
Test: `make dist`, checks that installed-files-vendor-ramdisk-debug.{json,txt} are
       in $OUT/ and out/dist.
Change-Id: I66b662d8b1e5c619ed7bb81e40233fe9df363b27
2020-02-18 13:46:17 +08:00
Kyriakos Ispoglou f00a0dbffc Add a new make target called `haiku-line-coverage`
This CL adds a new make target for line coverage, That is, by running
`make haiku-line-coverage` you can get a set of all profile (*.gcno) files
for all fuzz targets and for all critical components of Android,
packed into a zip called `line_coverage_profiles.zip`. Furthermore the set of
all fuzz targets are instrumented with line coverage and packed into
another zip called `line_coverage_fuzz_targets.zip`

To properly run the make target enable NATIVE_LINE_COVERAGE first:
NATIVE_LINE_COVERAGE=true NATIVE_COVERAGE=true COVERAGE_PATHS=* make haiku-line-coverage

Bug: b/148234755
Test: Make target buils successfully on master/aosp. Binaries tested on taimen
devices.

Change-Id: I6a1e11068119337628c2ae5ee3baf2fc394add05
2020-02-17 11:18:11 -08:00
Colin Cross d81f4b3461 Support empty jacoco-report-classes.jar
If EMMA_INSTRUMENT is turned on but no APKs were built the rule to
collect jacoco-report-classes.jar would error with missing directories
and an empty zip file.  Switch to soong_zip, which doesn't error
on empty zip files, and hide the errors if $(TARGET_COMMON_OUT_ROOT)
or $(HOST_COMMON_OUT_ROOT) don't exist.

Test: m EMMA_INSTRUMENT=true TARGET_BUILD_APPS=Camera2
Change-Id: I09e30e37dc38f32f55b3f91bfc4d12c9e753083f
2020-02-14 10:36:47 -08:00
Narayan Kamath af5a0e7b98 Merge "Reland: Rework platform version to hide codenames." 2020-02-12 08:42:17 +00:00
Automerger Merge Worker 017ff9f36d Merge "core/Makefile: pass value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE" am: 77ffb564a9 am: 70248b3392 am: 529e7eadc1
Change-Id: I8c1e680df7584fd78fbecdd7fa8866ed2ebd4de1
2020-02-12 02:12:29 +00:00
Dianne Hackborn 25648e60b2 Reland: Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Changes from the original version:
- Logic for emitting system properties has also been added to
  buildinfo_common.sh to make sure that ro.${partition}.build.*
  are consistent with ro.build.*.
- We also use PLATFORM_VERSION_LAST_STABLE as the value set in the
  boot image os_version header / hash tree additional headers to
  ensure they match with the ro.build.version.release system property.
  This is hopefully a temporary workaround while we stop using the
  system property for this purpose.

Bug:  143175463
Test: manual
Change-Id: Iaeefb35137de01c6ea57115d8830dd9bc30eccba
2020-02-11 13:20:20 +00:00
Tamas Petz 89418f058e core/Makefile: pass value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE
Regardless of the value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE
"use_dynamic_partition_size=true" is passed to build_image.sh.
Pass the value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE just like it is
done for other properties.

Test: 1. build a target with fixed partition sizes and
         "PRODUCT_USE_DYNAMIC_PARTITION_SIZE := false".
      2. check the value of "use_dynamic_partition_size" in the
         corresponding system_image_info.txt.
      3. repeat steps 1 and 2 with this fix and see the difference.

Change-Id: Ia121d3d67f554f8ae4e211ad4e2c381a43409f01
2020-02-10 11:34:48 +01:00
Dianne Hackborn 0023fa857c Add basic support ro.build.version.release_or_codename
Currently no different from "release". Will be updated to differ
in a follow up change, once all related issues have been resolved.

Bug:  143175463
Test: manual

Change-Id: I2e7de023d49cb1dcb83637e2c9af5a3e48e46f7d
2020-02-05 12:22:29 +00:00
Rashed Abdel-Tawab 194ed8e88d build: Add vendor.prop and odm.prop capability
This replicates the longtime existing handling of system.prop,
as well as the recently added handling of product.prop.

Change-Id: I8ab2b29bd0b5f0f2bcc0928d6a2a871c40582d3f
2020-02-01 22:53:52 +00:00
Baligh Uddin 6a8234bf43 Add mke2fs.conf to otatools
BUG: 148452817
2020-01-29 17:42:59 -08:00
Yifan Hong 67f58406ee Merge "Disallow VINTF metadata for PRODUCT_COPY_FILES" 2020-01-30 00:50:59 +00:00
Baligh Uddin 0434412bcd Merge "Add explicitly merge_zips to otatools package" 2020-01-29 06:16:16 +00:00
Tianjie Xu a25d76f2c8 Add explicitly merge_zips to otatools package
Since it's under soong/out/host, we need to explicitly copy it into the
otatools.zip

Bug: 146508800
Test: build and check otatools.zip
Change-Id: I83e201601cf03b6eb01ead912a78f22f750aa4be
2020-01-28 19:17:35 -08:00
Daniel Rosenberg dac25a96df Merge "Add build properties to enable casefold and prj_quota" 2020-01-28 23:53:25 +00:00
Daniel Rosenberg 6cc2c81f4d Add build properties to enable casefold and prj_quota
This adds the ability to format f2fs and ext4 in a way that supports
casefolding and project quotas. Project quotas require wider inodes, and
thus cannot be enable apart from at build time. Casefolding can be
configured with f2fs.fsck/tune2fs later.

Both features are enabled via inheriting emulated_storage.mk in the
device.mk

Bug: 138322712
Bug: 138321217
Test: Enable on device with related patches, view fs configuration on /data
Change-Id: Ib1ab0589006ff1b3fb7478b7e9b0a8aad71e4b09
2020-01-27 12:45:47 -08:00
Tianjie Xu eb8a0a0036 Add apexer and dependencies to otatools
We need them to extract and repack the apex file when signing
the apex.

Bug: 146508800
Test: build
Change-Id: Ib38055eac24f28ac59610d03275de05b77d3eeb0
2020-01-27 11:05:54 -08:00
Yifan Hong 5e57a778cd Disallow VINTF metadata for PRODUCT_COPY_FILES
VINTF metadata must be checked by defining
DEVICE_MANIFEST_FILE and friends, instead of being
copied with PRODUCT_COPY_FILES directly.

This can be worked arond with BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES.

Test: Add the following and see errors:

PRODUCT_COPY_FILES += \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/manifest/foo.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/manifest/foo.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/etc/vintf/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/etc/vintf/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_ODM)/etc/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_ODM)/etc/vintf/manifest.xml \

Test: test again with BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES := true

Bug: 147506249

Change-Id: Id75a9690b3c71fdc9a4e1b4e9be2caa63183cf7c
2020-01-24 15:07:35 -08:00
Yifan Hong af9b0701e3 Do not check VINTF if no files
Do not check VINTF integrity / compatibility if
no files are built to /system/etc/vintf/* or /vendor/etc/vintf/*.

Test: m check-vintf-all on gsi_gms_arm64
Test: m check-vintf-all on coral

Fixes: 147749718
Fixes: 148007775

Change-Id: I874d1558e0b891b9d307eec536b1071d382a43f5
2020-01-21 13:21:52 -08:00
Yifan Hong 605ea043c8 Reland "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
This reverts commit d00ebcd740.

Reason for revert: reland CL

Test: m check-vintf-all

Change-Id: I6544197048a18745c80a954b9eccf69e7e438e9d
2020-01-14 14:25:31 -08:00
Yifan Hong bcd46bc540 Reland "Add check-vintf-all target."
This reverts commit 152a783e2b.

Reason for revert: reland CL

Test: m check-vintf-all

Change-Id: I80fc789313edd3a9cc439a0b3a81e524e39b41b1
2020-01-14 14:25:16 -08:00
Harry Zhang 152a783e2b Revert "Add check-vintf-all target."
Revert submission 1202895-build_time_vintf

Reason for revert: Build breakage at b/147648187
Reverted Changes:
I9791abc44: Improve BUILT_ASSEMBLED_*_MANIFEST checks
I6ee79910d: Add check-vintf-all target.

Change-Id: I6d9fd1747eaea492a3ebfe98c13ea4a5a2d22a33
2020-01-14 18:40:23 +00:00
Harry Zhang d00ebcd740 Revert "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
Revert submission 1202895-build_time_vintf

Reason for revert: Build breakage at b/147648187
Reverted Changes:
I9791abc44: Improve BUILT_ASSEMBLED_*_MANIFEST checks
I6ee79910d: Add check-vintf-all target.

Change-Id: If580207415d6ca54eb5fc653efc54d07b086f804
2020-01-14 18:40:23 +00:00
Yifan Hong 8bdfe365d6 Improve BUILT_ASSEMBLED_*_MANIFEST checks
They are moved into check-vintf-all, which is more
accurate and do not require building full OS images.

Also move kernel check code down to check_vintf_compatible. There
is no assembled manifest to put kernel configs now, but they are still
required for build time OTA VINTF checks.

Test: builds
Test: change a vintf_fragment file to cause a conflict with main manifest file
(add health@2.0 to boot@1.1.xml), and check_vintf_vendor_log fails

Change-Id: I9791abc440a40e1537b4387eb67575ff2e22df08
2020-01-11 19:06:18 +00:00
Yifan Hong 850f8b5d77 Add check-vintf-all target.
Add target that checks VINTF compatibility of the current build
(in $PRODUCT_OUT) properly. The target:

- Doesn't require a full build
- Won't run for system-only AOSP targets

A verbose log is printed if `m check-vintf-compatible` is executed,
but it won't show up if `m` is executed.

(After this patch, adding product / system_ext matrices is as simple
as defining a vintf_compatibility_matrix in Soong, and VINTF
compatibility is properly checked.)

Test: m check-vintf-all
Test: delete */etc/vintf and m check-vintf-all
Test: m
Test: m check-vintf-all on device with vendor/odm and ODM SKU-specific
      manifests

Test: change manifest.xml to be incompatible and m check-vintf-all fails

Bug: 140280874
Bug: 140360109

Change-Id: I6ee79910d745d29cfc9b05b1435e26f91b7c10f7
2020-01-10 13:17:56 -08:00
Daniel Mentz 30652b3380 Add unpack_bootimg to otatools to modify boot.img
unpack_bootimg in conjunction with mkbootimg can be used to re-create
boot.img with a different kernel image and ramdisk.

Change-Id: I9615facc9335885989772a0dd7f08217e2143a45
2020-01-04 15:25:42 -08:00
Daniel Mentz 4d6017d519 Dist ramdisk-recovery.img and misc_info.txt
Dist ramdisk-recovery.img and misc_info.txt. This is useful for
re-creating boot.img without having to download a huge target_files zip
file.

Change-Id: I2e1c1d547c95ca3433f89c68428c0c98fa4d19cd
2019-12-23 18:35:17 +00:00
Jiyong Park 22195346dd apex-libs-absence checks are removed
The check is implemented in Soong via the apex_available property.
For a module that should be in the APEX named "foo" and shouldn't be in
any other APEX and also in the platform (the non-updatable part), the
property can be set to "foo" (without "//apex_available:platform")
to express the restriction and then Soong will enforce it.

Bug: 128708192
Test: m
Change-Id: Ia1aaaacd685f466447b61deae2849cb0aa83def3
2019-12-23 03:41:59 +00:00
Treehugger Robot 8e3bc2d4ce Merge "Adding missing dependencies for vbmetaimage-nodeps" 2019-12-16 04:47:56 +00:00
Dan Willemsen 79a0caff35 Write list of copy headers
So that soong_ui can remove obsolete headers that have been removed.

Test: cat out/target/product/crosshatch/.copied_headers_list
Test: cat out/target/product/generic/.copied_headers_list
Change-Id: I7df8029c1f2ed630d35c357f94e5dfb668e5824f
2019-12-13 19:35:05 -08:00
Bowgo Tsai 6a4eaa57b9 Adding missing dependencies for vbmetaimage-nodeps
Bug: 143513520
Test: `make vbmetaimage-nodeps` then checks the value of
      PRIVATE_AVB_VBMETA_SIGNING_ARGS appears in ./out/verbose.log.gz

Change-Id: I2eac2b2d319a46f3c3ecb56df8c6b56925a4d596
2019-12-10 15:08:24 +08:00
Bill Peckham 43e5420a50 Merge "Don't generate recovery patch for A/B systems." 2019-12-03 00:42:22 +00:00
Alistair Delva 1cfe41269f Merge "Allow f2fs sparse mode to be disabled" 2019-12-02 21:54:20 +00:00
Bill Peckham c0f413f0ad Don't generate recovery patch for A/B systems.
An A/B system that has a recovery image should not generate the recovery patch.
This change gates the creation of the recovery patch such that we create it
only when the recovery image exists and only for non-A/B systems.

Test: Build A/B system, verify that recovery patch is not present.
Bug: 144104493
Change-Id: Ib570c21b73912c4e4b7a964b192abc15fde9a753
2019-12-02 18:16:01 +00:00
Kris Alder fe283c99e6 Merge "rename 'make fuzz' to 'make haiku'" 2019-11-27 17:29:00 +00:00
Kris Alder 8c8c2b96f2 rename 'make fuzz' to 'make haiku'
Bug: 145147479
Test: ran 'make haiku' locally, verified results match
Change-Id: I56b9bcfabe7dee705008e711d7c7d85421643e42
2019-11-26 12:03:39 -08:00
Yifan Hong 874a5aa95e Merge "Move check partition size logs to a file" 2019-11-26 00:32:52 +00:00
Steve Muckle 810a0ba56f add BOARD_*_KERNEL_MODULE_ARCHIVE support
It may be the case that the list of kernel modules to be copied into
various partitions is not known at the time the build is invoked. To
support this configuration, create a set of make variables, each of
which can be set to the path of a zip archive of kernel modules to be
used.

Bug: 144317186
Bug: 144844424
Test: build and verify *.ko in vendor, repackage prebuilt
      kernel modules into zip, build and verify *.ko in vendor
Change-Id: Ie6f7e2c72efa11d39be341920dd46e4ed6678fe1
2019-11-20 10:46:13 -08:00
Alistair Delva 91238cce14 Allow f2fs sparse mode to be disabled
Bug: 142424832
Bug: 142803849
Change-Id: Ic112128f15e3f29208332afceea4fbc3fca40b36
2019-11-15 19:05:41 +00:00
Tom Cherry 4f51fba546 Merge "Move init and ueventd scripts from / to /system/etc" 2019-11-13 14:36:47 +00:00
Treehugger Robot eed4e1324e Merge "Make backend for shared library fuzzing." 2019-11-08 21:35:08 +00:00
Mitch Phillips 3adbcb31ea Make backend for shared library fuzzing.
Additional context (for Googlers): go/android-fuzzing-shared

This patch adds the Make support for automatically installing sanitized
dependent shared libraries. 'make $module' will find all the shared
library dependencies in soong, and create the rules to install them. We
simply need to add the <install sanitized shared library> rule that's
made by Soong as a dependency of the module's phony.

We also now change 'm fuzz' to not just build the fuzz packages, but to
build all fuzz targets into the respective
$ANDROID_PRODUCT_OUT/data/fuzz and $ANDROID_HOST_OUT/fuzz directories.

Bug: N/A
Test: Build fuzz target with shared libs, note the contents of
$ANDROID_PRODUCT_OUT/data/fuzz/lib and out/soong/fuzz-target-*.zip now
has shared libraries.

Change-Id: I74def02fee663ef788ee25ec0d5106faf474c2a6
2019-11-07 15:39:34 -08:00
Tom Cherry 89eea96fe1 Move init and ueventd scripts from / to /system/etc
There is no reason for these scripts to continue to exist in /, when
they are better suited for /system/etc.  There are problems keeping
them at / as well, particularly that they cannot be updated with
overlayfs.

Bug: 131087886
Bug: 140313207
Test: build/boot
Merged-In: I5aa0332e7f0e3fb6840b60e3d099c2b28d38b7ea
Change-Id: I5aa0332e7f0e3fb6840b60e3d099c2b28d38b7ea
2019-11-07 11:28:56 -08:00
Yifan Hong 309109351e Move check partition size logs to a file
Don't contaminate the build log.
Test: m check-all-partition-sizes -j (verbose logs stored to file)
Test: m check-all-partition-sizes-nodeps -j (see verbose logs)
Test: manually run the script with[out] -v and with[out] --logfile

Change-Id: I345a340deab3e29bb9cb05d4970a55d8758607a7
2019-11-05 14:06:27 -08:00