Commit graph

61047 commits

Author SHA1 Message Date
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
58dd353a07 remove code for default.prop
default.prop files are gone. Remove the code in post_process_prop.py
that handles the file.

Bug: 1313599
Test: m

Change-Id: I3b4ff4adac57a406b70300d34ece7028cb52eb2d
2020-05-27 12:52:43 +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
Howard Chen
64b6535f43 Merge "Add tinyhostless to mainline_system.mk" am: c0ea7e89b8 am: 67a7b6d830
Change-Id: I3c37fbd4de8aa2e00918430fca0e154cb83330d5
2020-05-27 03:00:47 +00:00
Treehugger Robot
d8046ecc67 Merge "Add RBE_CXX_COMPARE variable to locally disable compare mode for C++" am: aa0584c22d am: acb4079c27
Change-Id: Ifed6b9fda6781576d06f896176787c2b362be182
2020-05-27 03:00:40 +00:00
Yo Chiang
694ae5bab1 [automerger skipped] Merge "Remove mainline_arm64.mk" am: e32703d3be am: 3b75a5943a -s ours
am skip reason: Change-Id I08990b70d45c0663a9700f41b670513674bf7e97 with SHA-1 68bee4b679 is in history

Change-Id: I8bc6d8064209b1564a1b934ee050add1164b7642
2020-05-27 03:00:32 +00:00
Howard Chen
67a7b6d830 Merge "Add tinyhostless to mainline_system.mk" am: c0ea7e89b8
Change-Id: I5545cec112a88122fe09b834cd386ca47363600e
2020-05-27 02:44:18 +00:00
Howard Chen
c0ea7e89b8 Merge "Add tinyhostless to mainline_system.mk" 2020-05-27 02:41:37 +00:00
Treehugger Robot
acb4079c27 Merge "Add RBE_CXX_COMPARE variable to locally disable compare mode for C++" am: aa0584c22d
Change-Id: I3bb8a8b2f0997f289e532e61b320690a3bf42157
2020-05-27 02:38:14 +00:00
Yo Chiang
3b75a5943a Merge "Remove mainline_arm64.mk" am: e32703d3be
Change-Id: I015632ecf33407e47d1b6f13ca8c0c510124aeb8
2020-05-27 02:38:03 +00:00
Yo Chiang
60c0064902 Retire mainline.mk
We've converted all known users of mainline.mk to use
mainline_system.mk. Don't include mainline.mk directly in the future,
instead include mainline_system.mk and other partition specific
makefiles. Remove mainline.mk to prevent people from accidentally
including it again.

Bug: 141443017
Test: TH
Change-Id: Id161f29951982a100482a6201130adeebdb49846
2020-05-27 02:29:02 +00:00
Treehugger Robot
aa0584c22d Merge "Add RBE_CXX_COMPARE variable to locally disable compare mode for C++" 2020-05-27 02:27:09 +00:00
Yo Chiang
e32703d3be Merge "Remove mainline_arm64.mk" 2020-05-27 02:26:26 +00:00
Hongguang Chen
23dcc41308 [automerger skipped] Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." into rvc-dev am: 4217f575c3 -s ours
am skip reason: Change-Id I815d574f791734d4c6a25a9f8d827b5b4f93d7cc with SHA-1 883eecbc4b is in history

Change-Id: I68fb39c0a626e55479ba4e237d79b0cce1244ca4
2020-05-26 23:56:28 +00:00
Hongguang Chen
4217f575c3 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." into rvc-dev 2020-05-26 23:46:13 +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
c743ad8f77 [automerger skipped] Strip debug symbols from modules am: 43872f0eb7 -s ours
am skip reason: skipped by user elavila

Change-Id: If574cbff12a26766018b889db09f7f1440a262bf
2020-05-26 23:11:44 +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
267a1bf446 Merge "depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD" am: a74d425017
Change-Id: Ie50ca543785faf47178b42bf0b35e8499c9b0c5b
2020-05-26 21:21:26 +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
Treehugger Robot
53d445153c Merge "Fix type error" am: fdc392b245 am: de33c9c26e
Change-Id: If349c8fae1437893e4b58dab2ebe41aeebeecc8d
2020-05-26 20:13:50 +00:00
Treehugger Robot
de33c9c26e Merge "Fix type error" am: fdc392b245
Change-Id: If3e2f0183039e00cb4184f15dd19dd742857dd56
2020-05-26 20:02:57 +00:00
Treehugger Robot
fdc392b245 Merge "Fix type error" 2020-05-26 19:24:41 +00:00
Kousik Kumar
b0f055db13 Add RBE_CXX_COMPARE variable to locally disable compare mode for C++
When we do 64-32 migration, we want compare mode to be present only for
non-c++ actions as it would impact performance on 32-core machines
otherwise.

Bug: b/157414300
Test: Ran a build with "RBE_CXX_LINKS="true" RBE_CXX_LINKS_EXEC_STRATEGY="remote" RBE_CXX_COMPARE="false" RBE_compare="true" use_rbe mmma bionic"
and observed that local-executions happened only for link actions and
not for C++ actions.

Change-Id: Ia972c74d804085196a7b6ec755af63042c6b3909
2020-05-26 11:57:02 -07:00
Treehugger Robot
50f6e415f6 Merge "Generate product build props always" am: 223c0f66d5 am: ada61a9af5
Change-Id: I0e239bf19845ac63bf8363e3867c328c1a862eef
2020-05-26 18:01:23 +00:00
Treehugger Robot
ada61a9af5 Merge "Generate product build props always" am: 223c0f66d5
Change-Id: I7c82ba73c99b95a38146ff470ba249d160d2c02f
2020-05-26 17:40:55 +00:00
Treehugger Robot
223c0f66d5 Merge "Generate product build props always" 2020-05-26 17:26:01 +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
Yo Chiang
cb559ac3d8 Remove mainline_arm64.mk
mainline_arm64 is broken for quite some time. Let's just remove it
rather than trying to fix it.
IIUC this was a testing ground for mainline_system.mk when it was first
introduced. Now we have plenty of products that use mainline_system.mk
(e.g. mainline_system_arm64, aosp_arm64, aosp_<pixel>, ...).

Bug: 141443017
Test: TH
Change-Id: I8e0825b2d94134fd8e9e3edc5e2aa15dbcdf10ba
Merged-In: I08990b70d45c0663a9700f41b670513674bf7e97
2020-05-26 14:09:25 +00:00
TreeHugger Robot
b43ed8923a Merge "Remove mainline_arm64.mk" into rvc-dev-plus-aosp 2020-05-26 10:47:39 +00:00
Howard Chen
2f6bb93178 Add tinyhostless to mainline_system.mk
The tinyhostless module is provided by AOSP and is required by Mediatek
devices.

Test: build aosp_wembley-userdebug
Bug: 157109906
Change-Id: I2a1c4957c19fd4cbd60744d2d9cb534f19d3f239
2020-05-26 02:51:14 +00:00
TreeHugger Robot
8c928f1534 [automerger skipped] Merge "sign_apex.py respects hash algorithm" into rvc-dev am: 13aff4012d -s ours
am skip reason: Change-Id I996a33e0208d3dd3a04a31b8dafb27ef995297f2 with SHA-1 a1887f326c is in history

Change-Id: I80fa741aaec69ef12a8ddefc1d1c5c7373868014
2020-05-26 01:16:47 +00:00
TreeHugger Robot
13aff4012d Merge "sign_apex.py respects hash algorithm" into rvc-dev 2020-05-26 01:03:48 +00:00
Treehugger Robot
93b42b8fe3 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." am: 6d412db1b3 am: 787ee95af2
Change-Id: I08b51e5b108019f28c8c9004ddcb931acd11caf0
2020-05-25 22:36:21 +00:00
Treehugger Robot
787ee95af2 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." am: 6d412db1b3
Change-Id: I935e285afa6fe4b17932849d85a7645f175a88c0
2020-05-25 22:21:11 +00:00
Hongguang Chen
4975a9334f Allow more than one '=' in avb_extra_custom_image_extra_args.
avb_extra_custom_image_extra_args can be set to
'oem=--signing_helper_with_files=/tmp/avbsigner.sh' on signing server.
The second '=' shouldn't be splitted in this case.

BUG: 154171021
Test: Manually sign target zip files which has 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="--signing_helper_with_files=/tmp/avbsigner.sh" \
    xxxx-target_files.zip signed.zip

Change-Id: I815d574f791734d4c6a25a9f8d827b5b4f93d7cc
Merged-In: I815d574f791734d4c6a25a9f8d827b5b4f93d7cc
2020-05-25 15:11:30 -07:00
Treehugger Robot
6d412db1b3 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." 2020-05-25 22:08:12 +00:00
Yo Chiang
a0359ca828 releasetools: Fix non-existent required dependency
HOST module img_from_target_files has non-existent required: zip2zip
HOST module releasetools_py3_test has non-existent required: otatools
HOST module releasetools_test has non-existent required: otatools

Bug: 7456955
Test: TH presubmit
Test: atest releasetools_test # Test result doesn't change
Change-Id: I4fa4fb9c120fda5d4cb309b1e3a2660c3387eb7f
2020-05-25 17:14:51 +08: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
883eecbc4b Allow more than one '=' in avb_extra_custom_image_extra_args.
avb_extra_custom_image_extra_args can be set to
'oem=--signing_helper_with_files=/tmp/avbsigner.sh' on signing server.
The second '=' shouldn't be splitted in this case.

BUG: 154171021
Test: Manually sign target zip files which has 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="--signing_helper_with_files=/tmp/avbsigner.sh" \
    xxxx-target_files.zip signed.zip

Change-Id: I815d574f791734d4c6a25a9f8d827b5b4f93d7cc
2020-05-24 21:10:44 -07:00
Yo Chiang
68bee4b679 Remove mainline_arm64.mk
mainline_arm64 is broken for quite some time. Let's just remove it
rather than trying to fix it.
IIUC this was a testing ground for mainline_system.mk when it was first
introduced. Now we have plenty of products that use mainline_system.mk
(e.g. mainline_system_arm64, aosp_arm64, aosp_<pixel>, ...).

Bug: 141443017
Test: TH
Change-Id: I08990b70d45c0663a9700f41b670513674bf7e97
2020-05-25 10:52:31 +08:00
Hongguang Chen
cae87d6ff9 [automerger skipped] Add options to sign the prebuilt custom images. am: d9edddd64d -s ours
am skip reason: Change-Id Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6 with SHA-1 f23364d280 is in history

Change-Id: Ie3729afab0e8160be39fac9c0632edb9f2350f8c
2020-05-21 23:42:51 +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
cbee0b0284 Merge "Delete deps-license target." am: 95fc5e76a6 am: 381b86da62
Change-Id: I1e87c23a257e10db0618c03ae962bba753123cae
2020-05-21 22:15:53 +00:00
Treehugger Robot
381b86da62 Merge "Delete deps-license target." am: 95fc5e76a6
Change-Id: If7cd6f4365894902e925a0a79fb67eb2a35f435b
2020-05-21 21:51:40 +00:00
Treehugger Robot
95fc5e76a6 Merge "Delete deps-license target." 2020-05-21 21:37:06 +00:00