Commit graph

45675 commits

Author SHA1 Message Date
Treehugger Robot
d578232c95 Merge "releasetools: Fix an issue in image size computation." 2018-07-26 18:45:25 +00:00
Yifan Hong
78ae26132d BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk
... because variable checks should go there.

Test: pass
Change-Id: I484f928d848fd4f3b3936d1c7fd03976ee64feb2
2018-07-26 10:50:45 -07:00
Tao Bao
4f35d47160 Merge "releasetools: Return the actual image size when building logical partitions."
am: f42fc1a7c3

Change-Id: I714fbd9458c2d6708ade24b36cbfd965a135b840
2018-07-26 10:09:53 -07:00
Tao Bao
c2606eb548 releasetools: Fix an issue in image size computation.
When building a system image with system_root_image enabled, the size
computation should include files under both of in_dir (i.e. /system
files) and root (pointed by 'root_dir'). Because files from both
locations will end up into the built image. The files under root are
usually only a few MiBs, but should be accounted for especially in the
context of logical partitions (where the partition size will be
allocated based on the actual need). Note that we will still need some
"reserved space" (defined via BOARD_*_PARTITION_RESERVED_SIZE) to cover
the cost for filesystem and/or verity metadata.

This CL moves the combination of the two dirs up, before parsing and
computing other properties. This doesn't affect anything for a
successful image building path. It may however increase the time to
error out in certain error path, since it copies the files earlier now.

Test: python -m unittest test_build_image
Test: `make dist`
Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and
      BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Build system
      image successfully.
Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and
      BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Write a large
      file to root dir (PRODUCT_OUT_ROOT). The image building fails, but
      reporting a size that accounts for both of /system and root.
Change-Id: Idfb26b8e259626ba57ec3bd4f85d357c30e56163
2018-07-26 16:59:57 +00:00
Tao Bao
f42fc1a7c3 Merge "releasetools: Return the actual image size when building logical partitions." 2018-07-26 16:59:36 +00:00
David Srbecky
49eae5a99e Merge "Generate unstripped .oat files in the symbols directory."
am: d453f6245d

Change-Id: I4406a0b602514cadaa856cb3d682707fd186dc7b
2018-07-26 05:17:17 -07:00
Treehugger Robot
d453f6245d Merge "Generate unstripped .oat files in the symbols directory." 2018-07-26 12:10:53 +00:00
Anton Hansson
b682674226 Merge "Don't apply path enforcements for non-full builds."
am: 362fff4fcd

Change-Id: I8578f069aa8b032832ef35dd78b973b517e6b547
2018-07-26 03:10:49 -07:00
Anton Hansson
362fff4fcd Merge "Don't apply path enforcements for non-full builds." 2018-07-26 10:02:44 +00:00
Hung-ying Tyan
c565f5c2ed Add more ro.vendor.build.*
to facilitate independent updates of vendor/odm images.

Bug: 78600951 (#56,#57)
Bug: 111491184
Test: build aosp_marlin-userdebug and check vendor/build.prop

Change-Id: I798c13822695259375fbc8d5c7fe08d43a540e46
2018-07-26 17:39:47 +08:00
Mathew Inwood
50f59655ba Merge "Build rules to derive greylists from annotations."
am: 48a7929962

Change-Id: I029776a9e31923b87e125ab0054b398d9c935bce
2018-07-26 01:37:29 -07:00
Mathew Inwood
48a7929962 Merge "Build rules to derive greylists from annotations." 2018-07-26 07:37:29 +00:00
Max Bires
b64277de4c Adding VENDOR_SECURITY_PATCH to vendor partition build.prop
This will add ro.vendor.build.security_patch to /vendor/build.prop on
device

Bug: 76428542
Test: ro.vendor.build.security_patch entry shows up under
/vendor/build.prop

Change-Id: I3d3ec2d0e76fc5e62cd283ed4bce3894423cabdd
Merged-In: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
(cherry picked from 56d444b98f)
2018-07-26 14:35:32 +08:00
yangbill
86f441d899 ATest: Sync auto_test_config for multilib modules
auto_test_config will only be set once for the same
$(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)
ATest should also treat the multilib variant modules as testable.

Fix auto_generated config may have chance to be set as 2nd_arch name

BUG: 111397357
BUG: 110820867
BUG: 80298359

Test: . build/envseup.sh
      lunch aosp_x86_64-eng
      make -j out/target/product/generic_x86_64/module-info.json
      (check module-info.json for hello_world_test)
      make -j hello_world_test
      cat out/target/product/generic_x86_64/testcases/hello_world_test/hello_world_test.config

Change-Id: I69895b6373476c0053f2c6e657770d606ccfbcd1
2018-07-26 14:00:55 +08:00
Jae Shin
4b6ba7e0df Remove workaround for libclang_rt.ubsan* vndk libs
libclang_rt.ubsan* VNDK core libraries are no longer built
for all arch flavors. Now, only the TARGET[_2ND]_ARCH-specific
libs are builts. Therefore no need to filter-out and re-add
libclang_rt.ubsan* VNDK core libraries.

Test: m -j vndk
Change-Id: I48080c1cd546cfc9f14313a3c9559d5c1bb2fdbe
2018-07-26 12:14:12 +09:00
Nan Zhang
8d4b4ba885 Change timestamp to -stubs.srcjar
Test: m clean && m -j docs
Bug: b/70351683

Change-Id: Id036e203bbfd81a9a3c089f21d0832495027447a
Merged-In: Id036e203bbfd81a9a3c089f21d0832495027447a
2018-07-25 17:42:24 -07:00
Colin Cross
acebb3266f Pass --library to manifest_fixer.py for android libraries
manifest_fixer.py needs to know the difference between apps
and android libraries in order to change its behavior around
inserting targetSdkVersion.

Bug: 111347801
Test: m checkbuild
Change-Id: Ic21f1b98e3bcbd782612370c46134fc9dd157512
2018-07-25 16:21:41 -07:00
Colin Cross
fcb441b2b7 Fix dependencies for obfuscated instrumentation tests
This path is never used, otherwise the dependency on
proguard.classes.jar would have triggered the checkbuild
dangling rules errors.  Remove the dependency on the
proguarded classes, which don't exist any more, and depend
on the proguard_options and proguard_dictionary files
instead.

Test: none
Change-Id: Ia3ebc3bc71f0d6fdfa4a7a6850e2f7021adfdd1a
2018-07-25 14:30:10 -07:00
Colin Cross
a90b6070c7 Move manifest fixing to a separate rule
Manifest fixing is getting complicated, move it to a separate rule
so that it doesn't have to be a function in definitions.mk.

Bug: 111347801
Test: m checkbuild
Change-Id: Ibc60ad79c9c4f4a63a0e1c8f7779534954fb6585
2018-07-25 14:30:05 -07:00
Nan Zhang
ba000ad893 Merge "Fix the broken build: aosp-master/sdk_x86-sdk"
am: 6ac13c77c7

Change-Id: Ieef26247ee369ecd652db1c16cc27e0461185143
2018-07-24 18:38:40 -07:00
Nan Zhang
6ac13c77c7 Merge "Fix the broken build: aosp-master/sdk_x86-sdk" 2018-07-25 01:28:28 +00:00
Nan Zhang
527c295cf5 Fix the broken build: aosp-master/sdk_x86-sdk
metalava-api-stubs-docs_annotations.zip needs to be added as part of
sdk.atree dependencies.

Bug: b/78245848
Test: make -j80 PRODUCT-sdk_x86-sdk sdk_repo; and check ninja file.
Change-Id: I6be5d59c6f91a519f8d16ff273daa35c349d18aa
2018-07-24 17:15:54 -07:00
Nan Zhang
e98baf0e4a Merge "Copy annotations.zip to out/target/common/obj/PACKAGING/"
am: 28af1e7484

Change-Id: I869c2977e9d366523e9042155173677f4e9efb42
2018-07-24 17:05:37 -07:00
Nan Zhang
28af1e7484 Merge "Copy annotations.zip to out/target/common/obj/PACKAGING/" 2018-07-24 22:44:12 +00:00
Dan Willemsen
76f0441dc0 Merge "Mark more targets as PHONY"
am: 6708f9507b

Change-Id: I4a23ba6f0043cef1406e40752d40b1228d0c8774
2018-07-24 15:37:00 -07:00
Treehugger Robot
6708f9507b Merge "Mark more targets as PHONY" 2018-07-24 22:24:37 +00:00
Dan Willemsen
fe677e27f0 Merge "Remove LOCAL_CLANG := false support" into stage-aosp-master 2018-07-24 19:29:39 +00:00
Tao Bao
4251fe97aa releasetools: Return the actual image size when building logical partitions.
When verity is enabled, `partition_size` has the "adjusted" partition
size for holding the filesystem files (i.e. excluding verity hashtree,
and FEC metadata if applicable), whereas `original_partition_size` has
the one for the actual image returned by build_image.py.
`partition_size` must be smaller than `original_partition_size`. As a
result, the later assertion in Makefile (e.g. assert-max-image-size) may
fail to hold when using `partition_size`.

This CL addresses the issue by returning the value in
`original_partition_size` instead, if available. It also changes to
include both values when dumping the size info on image creation
failure.

Fixes: 79106666
Test: `m dist` with aosp_walleye-userdebug
Test: Set up walleye to use logical partitions, with a reserved size of
      20MiB. `m systemimage` no longer fails.
Test: Set up walleye that doesn't use verified boot. Use `m systemimage`
      to build an oversized image. Check the error message.
Change-Id: I41d77bffa85e8eadfbf4a2a7dcd2e798fadfdab7
2018-07-24 11:57:10 -07:00
Tao Bao
fdcb3b5829 Merge "releasetools: Support verifying AVB signed images with chained partitions."
am: 78078646e9

Change-Id: If7656208f92fde69dad358d298cd1c9eb1002ecd
2018-07-24 11:53:57 -07:00
Tao Bao
78078646e9 Merge "releasetools: Support verifying AVB signed images with chained partitions." 2018-07-24 18:40:09 +00:00
Mathew Inwood
04c58dea0b Build rules to derive greylists from annotations.
Uses the new class2greylist tool to extract API descriptors from .class
files.

Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.

Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
2018-07-24 15:48:42 +01:00
Anton Hansson
a5fa898189 Don't apply path enforcements for non-full builds.
The installed files lists are wildly inaccurate unless all the
makefiles in the tree have been parsed, so the "redundant whitelist"
computation will be too trigger-happy in this case.

Bug: 111757442
Test: mmm -j system/extras/partition_tools
Test: m out/target/product/generic_arm64/offending-artifacts.txt
Change-Id: Id3a9f61d2366de77cdedf9cb1e4e39f7d18ade6f
2018-07-24 13:52:55 +01:00
Anton Hansson
a94ba25840 Merge "Dump artifacts offending path reqs into a file"
am: 7b4b1b1548

Change-Id: Id661c2785ffddb053499cbfa3e0dd281cb609907
2018-07-24 02:20:02 -07:00
Jae Shin
0b3a91c19d Merge "Additionally check TARGET_IS_64_BIT for binder bitness"
am: bd74c0cb0e

Change-Id: Id56ca32e6a810cacdc71776abfda69e9f76edaed
2018-07-24 02:18:19 -07:00
Anton Hansson
7b4b1b1548 Merge "Dump artifacts offending path reqs into a file" 2018-07-24 09:09:17 +00:00
Treehugger Robot
bd74c0cb0e Merge "Additionally check TARGET_IS_64_BIT for binder bitness" 2018-07-24 09:09:06 +00:00
Dario Freni
bf01d8301a Merge "Generate a zipfile with appcompat logs during dist."
am: 4abd9488ce

Change-Id: Ibdabbe448ef64634eb36de3f24d720efafaa440f
2018-07-24 01:51:04 -07:00
Dario Freni
4abd9488ce Merge "Generate a zipfile with appcompat logs during dist." 2018-07-24 08:45:36 +00:00
Dan Willemsen
7a1da0e43e Mark more targets as PHONY
So that we can start restricting non-phony targets to $OUT_DIR and
$DIST_DIR.

Test: add --writable=out/, see fewer warnings
Change-Id: I411fe4af732b1bce35d4a4c1e2a47b5f8a15e6b8
2018-07-24 01:21:12 -07:00
Jae Shin
f1e9d4f62f Additionally check TARGET_IS_64_BIT for binder bitness
Since TARGET_USES_64_BIT_BINDER could be not set, first check
TARGET_IS_64_BIT when determining binder bitness.

Test: lunch aosp_walleye-userdebug && m -j vndk, then check
directory structure
Bug: 111773572

Change-Id: If75d5946b38d7b5bc15798b273e0450035c8c43a
2018-07-24 16:12:42 +09:00
Dan Willemsen
e303480584 Remove LOCAL_CLANG := false support
Only clang is supported now.

Test: build/soong/build_test.bash in all downstream branches
Change-Id: Ie8ad009625ddd7d5c38a6276b631bc889974fda3
2018-07-24 04:44:09 +00:00
Yifan Hong
68ab6aeb52 Merge "Fix check on BOARD_SUPER_PARTITION_SIZE."
am: c4ae41b251

Change-Id: I23620bd45292e8cea385c2a2fa6322aa8f2e00c3
2018-07-23 15:57:33 -07:00
Treehugger Robot
c4ae41b251 Merge "Fix check on BOARD_SUPER_PARTITION_SIZE." 2018-07-23 22:45:27 +00:00
Tao Bao
02a0859b3c releasetools: Support verifying AVB signed images with chained partitions.
For example, verify a target_files.zip that has system AVB-signed as a
chained partition.

  $ build/make/tools/releasetools/validate_target_files.py \
      signed-target_files-4904652.zip \
      --verity_key verifiedboot_pub.pem \
      --avb_system_key_path system_pub.pem

Note that verifiedboot_pub.pem should be the key (either public or
private) to verify vbmeta.img, and 'system_pub.pem' should be the key
(either public or private) for the chained partition of system.

testdata/testkey.key is the private key converted from
testdata/testkey.pk8 for testing purpose (`openssl pkcs8 -in
testdata/testkey.pk8 -inform DER -out testdata/testkey.key -nocrypt`).

Bug: 63706333
Test: python -m unittest test_common
Test: python -m unittest test_add_img_to_target_files
Test: `m dist` on aosp_walleye-userdebug; Run validate_target_files.py
      on the generated target_files.zip.
Test: Set up walleye with chained system partition; `m dist`; Run
      validate_target_files.py on the generated target_files.zip.
Change-Id: I38517ab39baf8a5bc1a6062fab2fe229b68e897d
2018-07-23 15:20:14 -07:00
Tao Bao
f013dc3fed Merge "releasetools: Clean up AppendVBMetaArgsForPartition()."
am: 540a71d2b3

Change-Id: If13ee90c84f75c2452c1e1e8504928414a971ed4
2018-07-23 14:56:22 -07:00
Tao Bao
540a71d2b3 Merge "releasetools: Clean up AppendVBMetaArgsForPartition()." 2018-07-23 21:40:37 +00:00
Yifan Hong
17dd45d689 Fix check on BOARD_SUPER_PARTITION_SIZE.
The original code doesn't use the size of images that
is calculated at build time, but instead use BOARD_*IMAGE_PARTITION_SIZE
variables. Update the logic to use the actual size of the images at
build time.

Test: builds with a device defining the value and
BOARD_SUPER_PARTITION_PARTITION_LIST := system vendor product productservices

Bug: 79106666
Change-Id: I07b3ee466482bd8f5cf709e13e16a7f187099aaf
2018-07-23 13:13:50 -07:00
Dario Freni
d10112751a Generate a zipfile with appcompat logs during dist.
Test: m dist
Bug: 110073830
Bug: 78924201
Change-Id: I052034ab35365e7add9a9992a51022c20aa50718
2018-07-23 20:20:15 +01:00
Yifan Hong
fe421ed263 Merge changes from topic "board_partition_reserved_size"
am: 2d90c246a9

Change-Id: I460ea917b47a61acb0cbb0f17a867d15f61c7d6d
2018-07-23 11:58:52 -07:00
Yifan Hong
2d90c246a9 Merge changes from topic "board_partition_reserved_size"
* changes:
  build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
  build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
2018-07-23 18:38:24 +00:00