Commit graph

59062 commits

Author SHA1 Message Date
P.Adarsh Reddy
1ed2d66259 Fix up _CheckSecondTokenNotSlotSuffixed function.
Incremental OTA generation was failing since the
function _CheckSecondTokenNotSlotSuffixed was in
broken state, this change fixes the same.

Bug: 160215626
Test: Incremental OTA now gets generated and applied
      successfully a non-ab device.

Change-Id: Ifb3886396fe65dcdaeba16c568419b9fa084193d
Merged-In: Ifb3886396fe65dcdaeba16c568419b9fa084193d
2020-07-01 01:37:56 +00:00
Treehugger Robot
3a3d501e11 Merge "build.prop for ODM partition is under ./etc subdir" 2020-07-01 01:16:44 +00:00
Inseob Kim
b9a27f4e7d Merge "Error if BOARD_VNDK_VERSION=PLATFORM_VNDK_VERSION" 2020-07-01 00:27:44 +00:00
Dan Albert
016da58c3c Dedup lists of NDK libraries from Soong.
Test: treehugger
Bug: None
Change-Id: I56bca0e8dc6d42a7107ac421d0b608a533e38580
2020-06-30 12:46:41 -07:00
Treehugger Robot
6c9441a924 Merge "use first kernel when generating kernel configs file" 2020-06-30 17:36:01 +00:00
Yo Chiang
c9b0f0a9a5 Merge "Resolve module bitness for target-host required modules" 2020-06-30 11:21:03 +00:00
Jiyong Park
24d9cad563 Handle the case when non-optional props have the same value
foo=true
foo=true
foo?=false

Consider the above case: Then the duplication of foo is allowed because
they have the same value (true). However, there was a bug that the
optional assirgnment foo?=false is left unmodified.

This fixes the bug by commenting such optional assignments.

Exempt-From-Owner-Approval: fixes a broken build

Bug: 117892318
Bug: 158735147
Test: atest test_post_process_props
Test: m out/target/product/vsoc_x86/vendor/build.prop for  cf_x86_auto

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

Merged-In: Iba9b61d9779d93e86d9bead2286f945f8d51ab1d
(cherry picked from commit 9a32636759)
Change-Id: Iba9b61d9779d93e86d9bead2286f945f8d51ab1d
2020-06-30 18:44:51 +09:00
Jiyong Park
0b4fccb66d BUILD_BROKEN_DUP_SYSPROP as escape hatch for the new sysprop restriction
As the final step for the refactoring of sysprop configuration, this
change adds BUILD_BROKEN_DUP_SYSPROP which is the escape hatch for
the new restriction. When it is turned on, the new syntax `a ?= b`
collapses to the old syntax `a = b`, duplicated assignments are allowed,
and the dups are resolved following the legacy rule of preferring the
first.

This change also summarizes all the user-facing changes to the Change.md
file.

Lastly, post_process_prop.py is refactored to accept new argument
'--allow-dup' which when turned on allowes duplicated sysprops.

Bug: 117892318
Bug: 158735147
Test: atest --host post_process_prop_unittest

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

Merged-In: I7bdfffd47d50aad66a78e28a30c3dad7ebac080c
(cherry picked from commit b302cdf6a4)
Change-Id: I7bdfffd47d50aad66a78e28a30c3dad7ebac080c
2020-06-30 18:44:40 +09:00
Jiyong Park
85471ed82e pm.dexopt.* props in runtime_libart.mk becomes optional
The mk file is designed to provide safe default values which can be
overridden by target-specific mk files. Previously it was difficult to
correctly configure the mk files because the final prop value that
is baked in the system/build.prop is highly dependent (and sensitive as
well) to the mk file inheritance order which is very difficult (and
non-intuitive) to follow.

I9c073a21c8257987cf2378012cadaeeeb698a4fb is an attempt to make it much
easier and intuitive. Specifically, the new `a ?= b` syntax makes the
assignment optional, which means it is used only when there is no
non-optional assignment for the same prop regardless of the relative
ordering among them. In addition, the change prohibits having multiple
non-optional prop assignments for the same prop name.

pm.dex.* prop in runtime_libart.mk are now set using the `a ?= b` syntax
to explicitly mark that they provide default values.

Bug: 117892318
Bug: 158735147
Test: m

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

Merged-In: I044486d313d699607cd54222ae34d9eae24762b9
(cherry picked from commit bca4ea477a)
Change-Id: I044486d313d699607cd54222ae34d9eae24762b9
2020-06-30 18:44:30 +09:00
Jiyong Park
19746f4686 Some properties are set as optional
Some properties that are designed to provide a safe default value are
explicitly set as optional using the 'a ?= b' syntax.

Bug: 117892318
Bug: 158735147
Test: m

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

Merged-In: Ie6a50ab7e0bcb210e282bc18e8c1daf412903f90
(cherry picked from commit dfb3937ce4)
Change-Id: Ie6a50ab7e0bcb210e282bc18e8c1daf412903f90
2020-06-30 18:44:24 +09:00
Jiyong Park
8d521ec2c8 ro.zygote in base_system.mk is optional
The setting of ro.zygote in base_system.mk is optional, which means the
value can be overriden by other (probably more specific) mk files.

Bug: 117892318
Bug: 158735147
Test: atest --host post_process_prop_unittest

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

Merged-In: Ia7a67c0a04fad343d6591417f40dd4b9ddadc5e4
(cherry picked from commit b1261aac33)
Change-Id: Ia7a67c0a04fad343d6591417f40dd4b9ddadc5e4
2020-06-30 18:44:17 +09:00
Jiyong Park
8b266f16a9 Don't inherit tablet-dalvik-heap for GSI and emulator
GSI and emulator should not be specialized for tablet.

This is also to avoid the expected sysprop conflict after
I9c073a21c8257987cf2378012cadaeeeb698a4fb gets in. With the change,
duplicate assignments of a sysprop is prohibited. We currently have the
duplication due to the following hierarchy chain:

aosp_arm64.mk
 -> emulator_vendor.mk -> goldfish/vendor.mk -> phone-xhdpi-2048-dalvik-heap.mk
 -> generic_arm64/device.mk -> tablet-dalvik-heap.mk

Many of the dalvik.vm.* properties are duplicated between phone-*-
dalvik-heap.mk and tablet-dalvik-heap.mk files.

Bug: 117892318
Bug: 158735147
Test: atest --host post_process_prop_unittest

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

Merged-In: I4d1e2f819fe688a4a85e58387b6af58d603399d3
(cherry picked from commit 9f2f6dd9c9)
Change-Id: I4d1e2f819fe688a4a85e58387b6af58d603399d3
2020-06-30 18:44:11 +09:00
Jiyong Park
d721e870bc Support optional prop assignments
This CL adds a number of changes to make the assignment of system
properties to be less confusing.

1. Added `a ?= b` syntax, which is called optional prop assignments. The
prop `a` gets the value `b` only when there is no non-optional prop
assignment for `a` such as `a = c`. This is useful for props that
provide some reasonable default values as fallback.

2. With the introduction of the optional prop assignment syntax,
duplicated non-optional assignments is prohibited; e.g., the follwing
now triggers a build-time error:

a = b
a = c

, but the following doesn't:

a ?= b
a = c

Note that the textual order between the optional and non-optional
assignments doesn't matter. The non-optional assignment eclipses the
optional assignment even when the former appears 'before' the latter.

a = c
a ?= b

In the above, `a` gets the value `c`

When there are multiple optional assignments without a non-optional
assignments as shown below, the last one wins:

a ?= b
a ?= c

`a` becomes `c`. Specifically, the former assignment is commented out
and the latter is converted to a non-optional assignment.

3. post_process_props.py is modified so that when a prop assignment is
deleted, changed, or added, the changes are recorded as comments. This
is to aid debugging. Previously, it was often difficult to find out why
a certain sysprop assignment is missing or is added.

4. post_process_prop.py now has a unittest

Bug: 117892318
Bug: 158735147
Test: atest --host post_process_prop_unittest

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

Merged-In: I9c073a21c8257987cf2378012cadaeeeb698a4fb
(cherry picked from commit 7aeb8de74e)
Change-Id: I9c073a21c8257987cf2378012cadaeeeb698a4fb
2020-06-30 18:44:01 +09:00
Kelvin Zhang
5d2b56b129 Fix validate_target_files for target files modified by
add_img_to_target_files.py

See bug description:
"When resigning images, the validate_target_files.py can be used to
verify the images using avbtool. The script will use the vbmeta.img to
achieve this, and all relevant images need to be in the IMAGES folder.
However, due to changes on add_img_to_target_files.py and specifically
the commit 5277d1015, some images (e.g. acpio.img and tos.img) are no
longer copied from RADIO to the IMAGES folder. This causes an error on
validate_target_files.py indicating that it cannot find image such as
IMAGES/acpio.img."
This CL fixes this by symlink images under RADIO directory to IMAGES
directory before invoking avbtool.

Bug: 159299583
Test: python3 -m unittest test_validate_target_files
Change-Id: I5769ee2ab5230d2a3a7cef10706dcc5788e654f8
2020-06-29 16:08:45 -04:00
Dan Willemsen
4d1284c0b7 Merge "Remove empty new-space in dynamic_partition_list and super_$(group)_partition_list" 2020-06-27 22:10:58 +00:00
Treehugger Robot
1e6cc9fc30 Merge "Mark android_app_set modules PRESIGNED." 2020-06-27 01:01:40 +00:00
Steve Muckle
bbdfbdad50 use first kernel when generating kernel configs file
If multiple kernels are defined for a build, use the first one when
generating the kernel config file.

Bug: 159975506
Change-Id: Ia136264eb0d0b544bf0685bc22e600de187a9a9b
2020-06-26 16:39:34 -07:00
Jaewoong Jung
ddae589b95 Mark android_app_set modules PRESIGNED.
Test: m apkcerts-list
Fixes: 159921591
Merged-In: Ie83a05be0d71280644843eddffdbea6bcb429c74
Change-Id: Ie83a05be0d71280644843eddffdbea6bcb429c74
2020-06-26 16:10:49 -07:00
Luca Stefani
c158e421ec Remove empty new-space in dynamic_partition_list and super_$(group)_partition_list
* As a side product .strip() calls in releasetools are redunant,
  but since these scripts are also used out of tree we can't
  remove them to guarantee compatibility

Test: m dist
Change-Id: I5c513a4654e293c3d4eab98c8759ea094015fab1
2020-06-26 19:52:52 +02:00
Tianjie Xu
b829269aa1 Merge "Rename the boot image for avb validation" 2020-06-26 17:35:54 +00:00
Inseob Kim
2b0b3d1491 Error if BOARD_VNDK_VERSION=PLATFORM_VNDK_VERSION
"BOARD_VNDK_VERSION := current" should be used instead.

Bug: 159866756
Test: manual
Change-Id: I854ca9c0fa195ab4bbb468a1343ef4fa28ac9258
2020-06-27 00:18:12 +09:00
Ulya Trafimovich
69d0080510 Remove mentions of deleted script construct_context.sh in comments.
Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I3456ac3276e137b8e6298b9a74630bd0ccdb4dac
2020-06-26 11:52:58 +01:00
Ulyana Trafimovich
43774f74c3 Merge "Move construct_context.sh from Make to Soong." 2020-06-26 08:46:58 +00:00
Tianjie
5ec1a7a66a Rename the boot image for avb validation
Starting from http://go/aog/1328118, we chained the 1st GKI
boot image into vbmeta. However, this fails avb validation;
because the avbtool constructs the image path based by using
"partition name + ext".

This cl works around the issue by renaming boot-5.4.img to
boot.img, so avbtool can find the image correctly.

Bug: 159656873
Test: run validate target file
Change-Id: I577226596e139e5b5f3e6ca3c28ced02431ca392
2020-06-25 23:09:48 -07:00
Jiyong Park
62117c857d build.prop for ODM partition is under ./etc subdir
build.prop for the ODM partition should be placed under ./etc directory
to support GSI. For detailed reasons, see
I0733c277baa67c549bb45599abb70aba13fbdbcf

The path was changed to /odm/build.prop during the recent refactoring
around build.prop filems and this change fixes the mistake.

Bug: 132128501

Test: check if odm/etc/build.prop is created
Change-Id: Icc2c564250aa08786f32294a839cc81e86b7d368
2020-06-26 09:59:42 +09:00
Treehugger Robot
bfe947b5ce Merge "depmod: pair in a modules.load.charger on BOARD_VENDOR_CHARGER_KERNEL_MODULES_LOAD" 2020-06-25 19:23:39 +00:00
Mark Salyzyn
46a9c028b8 depmod: pair in a modules.load.charger on BOARD_VENDOR_CHARGER_KERNEL_MODULES_LOAD
If the BoardConfig defined BOARD_VENDOR_KERNEL_MODULES_LOAD and
BOARD_VENDOR_CHARGER_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.charger respectively on
/vendor/lib/modules.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 159424228
Bug: 151950334
Test: build, confirm, change to charger mode, confirm set of modules loads
Change-Id: I55677ed74d80ff3909fe8cbe26e6766f9b5283d5
2020-06-25 08:57:36 -07:00
Ulya Trafimovich
5a7defdab1 Move construct_context.sh from Make to Soong.
This script belongs with other manifest-related scripts, and the future
plan is to rewrite it in Python and share common functionality with
other scripts.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I4b90129e5023ca1a2c818fc160c34b0b7da943ef
2020-06-25 14:48:08 +01:00
Tianjie Xu
be46f482e0 Merge "Add lz4 to otatools" 2020-06-24 23:38:49 +00:00
Colin Cross
e1ab4cb610 Merge "Use inclusive language in build/make part 2" 2020-06-24 21:58:46 +00:00
Kelvin Zhang
c8b4784cb9 Merge "Fix lint errors in ota_from_target_files script" 2020-06-24 19:17:35 +00:00
Colin Cross
d1cbfeaa3a Use inclusive language in build/make part 2
Test: m checkbuild
Bug: 158889297
Change-Id: I63bac680cc63a8564f35ae85dda1a0b09c9fd541
2020-06-24 12:03:08 -07:00
Tianjie
3031c29905 Add lz4 to otatools
A call to lz4 was added in http://go/aog/1329115. But the binary
isn't added to otatools, leading to a signing failure.

Bug: 159656873
Test: build otatools
Change-Id: I9cab00f36ce3c39cc174b4c9feffdf360f0364ef
2020-06-24 11:20:36 -07:00
Kelvin Zhang
0876c410ad Fix lint errors in ota_from_target_files script
Only changes code styles, should be No-op to functionality

Test: Run unit tests
Bug: 159723838
Change-Id: Icf6146eb0d6b3fb66478709c0edf55bce54db68f
2020-06-24 09:21:35 -04:00
Roland Levillain
4a203a6326 Merge "Warn about the use of COVERAGE_PATHS and COVERAGE_EXCLUDE_PATHS." 2020-06-24 10:16:03 +00:00
Colin Cross
5c0acab3e2 Merge "Rename Native_coverage to GcovCoverage in Soong" 2020-06-23 03:06:53 +00:00
Treehugger Robot
8eba18759b Merge "Remove vts10 dependencies" 2020-06-23 02:11:30 +00:00
Ryan Prichard
b636b0cfb8 Merge "Unlist libunwind as a critical component" 2020-06-22 21:17:07 +00:00
J. Avila
dbbd970d18 Merge "Switch to using llvm-strip for modules" 2020-06-22 15:19:26 +00:00
Yo Chiang
697674fa56 Resolve module bitness for target-host required modules
Add select-bitness-of-target-host-required-modules that resolves module
bitness for TARGET_REQUIRED_FROM_HOST and HOST_REQUIRED_FROM_TARGET.
Also re-indent select-bitness-of-required-modules.

Bug: 7456955
Test: TH
Test: compare value of ALL_MODULES.<*>.*_REQUIRED_FROM_*
Change-Id: I9483685d8dd528cb1a4ef1e2ec53cbe2caa598a4
2020-06-22 07:07:10 +00:00
Ryan Prichard
7146b7cd46 Unlist libunwind as a critical component
Virtually nothing uses libunwind, and no one should start using it, so
it's unlikely to be critical.

(Code should use libunwindstack.so to collect backtraces, and it should
use libc.so's _Unwind_* APIs for C++ exception handling unwinding.)

Test: build Android
Change-Id: I81882a4634ff4d397abe8a7cf5ff15a22a3eed2f
Merged-In: I81882a4634ff4d397abe8a7cf5ff15a22a3eed2f
(cherry picked from commit 9355aeba79)
2020-06-19 22:38:42 +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
5dda5caeb9 Merge "adjust vendor ramdisk file extension based on compression" 2020-06-19 06:32:45 +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
Paul Duffin
e5fc8fdf5e Merge "Fail check-boot-jars if boot jar contains 0 .class files" 2020-06-18 19:35:22 +00:00
Sophie Zheng
34fe2651ed Merge "NDK api code coverage" 2020-06-18 19:26:00 +00:00
Treehugger Robot
efc6dfb703 Merge "Remove use of metalava compatible output" 2020-06-18 17:57:05 +00:00
Paul Duffin
70dd47f0df Fail check-boot-jars if boot jar contains 0 .class files
Protect against an invalid boot jar, e.g. one containing .dex files is
used instead of .class files.

Test: add a prebuilt for framework-tethering
      Run `m check-boot-jars` with the first fix from
	  https://r.android.com/1341756 and the build fails due to no
	  .class files because a dex jar is used.
	  Run `m check-boot-jars` with all fixeds from
	  https://r.android.com/1341756 and the build works.
Bug: 158304459
Bug: 159112414
Merged-In: I0e8ebd318312949bc58ba7a5c89f9e265b8bedf2
Change-Id: I0e8ebd318312949bc58ba7a5c89f9e265b8bedf2
(cherry picked from 92d41de8f2)
2020-06-18 14:17:57 +00:00
Treehugger Robot
7270150164 Merge "Mark jni libs as REQUIRED by their app" 2020-06-18 07:12:33 +00:00