Commit Graph

33 Commits

Author SHA1 Message Date
Donghyun Jo 8c65ef6574 Fix typo in sysprop.mk and Changes.md
android_info_pro -> android_info_prop
partititon -> partition
PRODUCT_SYSTEM_PROPERITES -> PRODUCT_SYSTEM_PROPERTIES

Test: build and manual test

Signed-off-by: Donghyun Jo <donghyun.jo@samsung.com>
Change-Id: I0b7f0566aaa5ce8844003bb4f373389c20ddeb88
2021-03-02 08:51:03 +09:00
Treehugger Robot d041e4babf Merge "Make ro.product.cpu.abilist.* to be fetched dynamically" 2021-01-14 18:34:22 +00:00
SzuWei Lin baf5c8114b Make ro.product.cpu.abilist.* to be fetched dynamically
The patch rename the original ro.product.cpu.abilist* to
ro.system.product.cpu.abilist*. The property service will
define ro.product.cpu.abilist* by the intersect ABIs of
ro.{partition}.product.cpu.abilist*.

Bug: 176520383
Test: build aosp_arm64-userdebug and check the system/build.prop
Change-Id: I26e404632b28e9f6abd462920e0084ad2022a763
2020-12-31 16:59:27 +08:00
Oleksiy Avramchenko d3d0f7d62e Skip generate-common-build-props for older devices without /product
Common ro.product properties are always generated for the
product partition, even if it is not present. This was introduced
for the R release with Ia88c8efecb18db9c27baa466e492bfd898b581d3
"Generate product build props always" commit.

It violates CDD requirements for the devices which were released
earlier. Add optional parameter to build-properties which allows to
skip the common properies generation and product partition specific
checks to make sure common properties are not generated for
the devices released before R and without product partition.

Test: manual, build product/etc/build.prop for shipping levels 28, 30
      and for the devices with and without product partitions
Bug: 174677451
Change-Id: Ia3275d7229d0a873e0a4f1d1ea7a25c758c85bb9
2020-12-18 00:53:20 +01:00
Rupert Shuttleworth 3b37bc8986 Add missing buildinfo dependencies.
Test: Manually via USE_BAZEL=1 m dist (fixes a failure).
Change-Id: Ideb8dfd2e13932be5dcdef780888ffd602b15bd2
2020-12-09 04:24:15 +00:00
Alexander Mishkovets 5a6bc22b52 Fix the order of loading OEM properties
Move the OEM property imports so that they take higher precedence over
product and can still be overridden by factory properties.

Bug: 171304788
Test: manual
Change-Id: I0c0be446d5e9af77acfcdeb5145b5776c8d5820f
2020-11-12 13:13:15 +00:00
Tianjie e88ac677c5 Make the ro.build.version.release consistent between device build prop & partition build prop
The ro.build.version.release has updated to use the last stable platform
version in go/ab/10260813. But the logic for per-partition build prop
has never been updated. This mismatch eventually reflects in the
device's build fingerprints and cause confusion. This cl updates the
partition build props to match the behavior of the top level build props.

Also the device's fingerprints is heavily used in static analysis, e.g.
ota targeting, the change to its computation may cause unexpected effects.

Bug: 170968068
Bug: 158483506
Test: build system image for coral, check the build prop
Change-Id: Icf741c915f2eba970258979efc274e424187ac69
2020-10-15 18:31:00 -07:00
Yifan Hong 33fd5d4277 Add <ramdisk>/system/etc/ramdisk/build.prop.
Add a build.prop file for ramdisk. Properties uses the
name ro.[product.]bootimage*.

These ro.[product.]bootimage.* properties are also included in recovery
properties.

The file is installed to system/etc/ramdisk/build.prop under ramdisk.

On devices with dedicated recovery partition, the file is
installed to ramdisk/, which is installed to the ramdisk in the boot
image. The file is NOT installed to recovery/root to prevent
collision.

On devices with recovery_as_boot, in addition to ramdisk/, it is also
installed to recovery/root, which is installed to the ramdisk in the
boot image.

Test: m bootimage and inspect output
Bug: 169169031
Bug: 162623577
Bug: 170411692
Bug: 170364317

Change-Id: Ica6515b2a4e0f4a7fe4440434a3d7085fde64387
2020-10-09 00:48:37 +00:00
Garfield Tan 04714da51c Include vendor overrides in system prop if not split
Bug: 163854285
Test: m on crosshatch. Vendor overrides are included in
system/build.prop on legacy devices.

Change-Id: Ib134f934de8546af3dff27312f6877eafe5ed22c
2020-08-13 18:42:43 -07:00
Yifan Hong 997d227648 Merge changes from topic "odm_dlkm"
* changes:
  Create $OUT/{vendor,odm}/lib before symlink modules
  Add odm_dlkm/etc/build.prop
  Install ODM dlkm to appropriate place and symlink
  Add notice files for odm_dlkm
  Add odm_dlkm partition.
2020-07-17 22:05:26 +00:00
Treehugger Robot ac2050ff13 Merge "Rebuild buildinfo.prop after installclean" 2020-07-17 05:59:18 +00:00
Yifan Hong 81a092ff88 Add odm_dlkm/etc/build.prop
Test: build and manual test
Bug: 156020364
Change-Id: I0b22280362fec499af5ff063a5984ed17131d89d
2020-07-16 12:34:30 -07:00
Jiyong Park c60c514e1a Rebuild buildinfo.prop after installclean
aosp/1317598 has made a regression that the dependency from
buildinfo.prop to INSTALLED_ANDROID_INFO_TXT_TARGET is removed. As a
result, buildinfo.prop is not re-builty even after installclean, which
caused inconsistency between  ro.build.display.id (from buildinfo.prop)
and ro.system.build.fingerprint (from build.prop which is re-built).

Fixing the issue by moving buildinfo.prop from $(call
intermediates-dir-for,ETC) to $(call intermediates-dir-for,PACKAGING)
so that it gets deleted by installclean.

Bug: 158583916
Test: m out/target/product/generic_arm64/system/build.prop
m installclean
m out/target/product/generic_arm64/system/build.prop
Inspect out/soong/verbose.gz and check that buildinfo.prop was newly
created.

Change-Id: Id82b8fdc872deffb6a1764ca6d3c7114301dee1d
2020-07-15 09:05:47 +09:00
Yifan Hong 51a971b1d5 Add vendor_dlkm/etc/build.prop
Test: builds and manual inspect
Bug: 156020364
Change-Id: Ic7606bc3cd8770ec56ddc7bea86c88625c38f32d
2020-07-13 14:20:56 -07:00
Jiyong Park c0bd8c7611 Move build.prop to ./etc subdir for some partitions
build.prop files under system_ext, product, and odm partitions are moved
to the ./etc subdirectory. This is to be in-line with the established
practice of having all configuration files under ./etc subdir.
build.prop doesn't need to be an exception.

However, system/build.prop and vendor/build.prop were not moved because
there are a lot of apps and tools that depend on the path.

Bug: 158735147
Test: device has build.prop under ./etc and is bootable
Change-Id: I37c79f7337680f92406d9e196e5762bb8e7da5d8
2020-07-01 13:08:40 +09:00
Jiyong Park dd3af422a2 Merge changes from topic "sysprop"
* changes:
  Handle the case when non-optional props have the same value
  BUILD_BROKEN_DUP_SYSPROP as escape hatch for the new sysprop restriction
  pm.dexopt.* props in runtime_libart.mk becomes optional
  Some properties are set as optional
  ro.zygote in base_system.mk is optional
  Don't inherit tablet-dalvik-heap for GSI and emulator
  Support optional prop assignments
2020-07-01 01:46:47 +00: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 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
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
Jiyong Park eb49b34b1e Organize product vars for adding properties
Properties for <partition>/build.prop are now added via
PRODUCT_<PARTITION>_PROPERTIES.

PRODUCT_SYSTEM_PROPERTIES is added. PRODUCT_SYSTEM_DEFAULT_PROPERTIES
will be deprecated.

PRODUCT_VENDOR_PROPERTIES is added. PRODUCT_PROPERTY_OVERRIDES and
PRODUCT_DEFAULT_PROPERTY_OVERRIDES will be deprecated in favor of the new
variable.

For other partitions (odm, system_ext, product), there is no change.

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

Bug: 117892318
Test: m
Merged-In: I98f3b5d0da661b3ad75260a23754e655103b7a44
(cherry picked from commit ad810b6dae)
Change-Id: I98f3b5d0da661b3ad75260a23754e655103b7a44
2020-06-11 15:35:23 +09: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
Jiyong Park 35a83d1a5a remove buildinfo_common.sh
The shell script was responsible for appending some system properties
that are common to <partition>/build.prop files. The values of the
system properties were given via environment variables whose names were
slightly different from their corresponding make var names.

This change removes the script and instead write the system properties
directly in Make, thus eliminating the need to keep track of the mapping
across sysprop names, environment variable names, and make var names.

Bug: 117892318
Test: m

Change-Id: I4d88733c1afa30ea0c0c4fcfc2b349f07f7fc090
2020-06-05 10:50:15 +09:00
Jiyong Park e28fa80e12 <partition>/build.prop rules are defined using macro
The macro `build-properties' is defined to generate build rules to
create <partition>/build.prop.

build.prop files in all partitions except for the system partition are
now build using the macro.

system partition will use the macro in the following changes.

Bug: 117892318
Test: m

Change-Id: Ibed9c96dac4366251ec59a0b1317aa92f501c9a3
2020-06-05 10:47:34 +09:00
Jiyong Park a9c3220368 Drop the dependency from vendor/build.prop to system/build.prop
The former doesn't use anything from the latter. The dependency is not
needed.

Bug: 117892318
Test: m
Change-Id: I61aeea9feb1ac4467af4f185f3d6930b03145afd
2020-05-27 12:52:44 +09:00
Jiyong Park 0f3ad31a81 Remove ro.bootimage.* sysprops
ro.bootimage.build.date.* are not used anywhere.
ro.bootimage.build.fingerprint was used in the recovery mode, which has
now been switched to ro.build.fingerprint.

Bug: 117892318
Test: m
Change-Id: I3776c4154f86ddb908b24c6899037c6a7df037df
2020-05-27 12:52:44 +09:00
Jiyong Park 3a2e95a63e ro.build.expect.* sysprops are created in a separate rule
This change is required to unify the build rules for */build.prop files;
The rules shouldn't have partition-specific actions.

Bug: 117892318
Test: m
Manually inspect ro.build.expect.[bootloader|baseband] props in
vendor/build.prop

Change-Id: I3b29b2728f779a9d7e1d71a5aa69b02ea940b3c6
2020-05-27 12:52:44 +09:00
Jiyong Park ca9b02c1ce Make use of ADDITIONAL_ODM_PROPERTIES
Properties that were defined in the build rule for odm/build.prop are
now defined via ADDITIONAL_ODM_PROPERTIES.

Bug: 117892318
Test: m
Change-Id: I6220e217d0724b6e27127786e7a908e1e662d1a0
2020-05-27 12:52:44 +09:00
Jiyong Park ae55638f75 Refactor post_process_props.py
The script is refactored to not parse lines everytime a prop is looked
up or updated.

Also it is now built using python_binary_host.

Bug: 117892318
Test: m

Change-Id: I1677ca5aa919c54b7b0740fdc52e1399009f9a12
2020-05-27 12:52:44 +09:00
Jiyong Park f2b944ccea Make more use of ADDITIONAL_VENDOR_PROPERTIES
Properties that were defined in the build rule for vendor/build.prop are
now defined via ADDITIONAL_VENDOR_PROPERTIES.

Bug: 117892318
Test: m
Change-Id: Ib3dc9d001a8dcd0aa38f1acae384a96b67b5af8a
2020-05-27 12:52:43 +09:00
Jiyong Park 57f51f1693 ADDITIONAL_*_PROPERTIES are props determined by the build system
This change defines ADDITIONAL_<partition>_PROPERTIES to store properties
determined by the build system itself.

ADDITIONAL_SYSTEM_PROPERTIES was originally ADDITIONAL_BUILD_PROPERTIES.
ADDITIONAL_VENDOR_PROPERTIES was originally FINAL_VENDOR_DEFAULT_PROPERTIES.
ADDITIONAL_PRODUCT_PROPERTIES has been there and thus not changed.
ADDITIONAL_ODM_PROPERTIES is newly defined, although it is empty now.

In addition, ADDITIONAL_VENDOR_PROPERTIES are now defined in
core/main.mk along with other ADDITIONAL_*_PROPERTIES.

Bug: 117892318
Test: m

Change-Id: Ic41bba2e5695355436ac8df353866cfc044e1e0b
2020-05-27 12:52:43 +09:00
SzuWei Lin 1e6b3e78df 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: Ia88c8efecb18db9c27baa466e492bfd898b581d3
2020-05-21 20:16:47 +08:00
Jiyong Park 80f164c0b3 Deprecate ADDITIONAL_DEFAULT_PROPERTIES
As we merge default.prop into build.prop, we don't need to distinguish
ADDITIONAL_DEFAULT_PROPERTIES and ADDITIONAL_BUILD_PROPERTIES. Deprecate
the former in favor of the latter.

Bug: 117892318
Test: m
Change-Id: I80341c2e05d70821396202dc9e94104625ebf024
2020-05-18 21:44:52 +09: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