Commit graph

60172 commits

Author SHA1 Message Date
Steve Muckle
68f1d20a29 move module list creation outside conditionals am: 2319129a88
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712419

Change-Id: I200500fe02a2235459e2e61ee31ceb9a0baf9770
2020-06-03 21:12:08 +00:00
Steve Muckle
fa38004709 fix reference to BOARD_ODM_MODULES_LOAD am: 708435b557
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712418

Change-Id: Ib446376aaf2f63064109f4c7295c7ae4376f940a
2020-06-03 21:12:04 +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
Sasha Smundak
eefa8e954e Implement android_app_set module.
Bug: 152319766
Test: manual and builtin
Change-Id: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
Merged-In: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
2020-06-03 09:50:48 -07:00
Anton Hansson
ca7784780b Merge "releasetools: Add signapk as required modules" into rvc-dev am: a973323a9d am: dba45855b7
Change-Id: I494031f31f759735a13da4306f6f280a9088b1d1
2020-06-01 18:48:11 +00:00
Anton Hansson
dba45855b7 Merge "releasetools: Add signapk as required modules" into rvc-dev am: a973323a9d
Change-Id: I80740482b1ef48b5aeab1fff44f04e0c07c35ab9
2020-06-01 18:26:02 +00:00
Anton Hansson
a973323a9d Merge "releasetools: Add signapk as required modules" into rvc-dev 2020-06-01 17:53:21 +00:00
J. Avila
78d01dfc9e Merge "Add build support for LZ4 ramdisks" into rvc-dev am: 5ea1cf103f am: 321a54ab57
Change-Id: I9fa17bd4f98c62f4c756dcbbdbee38b912decb6d
2020-05-31 16:17:55 +00:00
J. Avila
321a54ab57 Merge "Add build support for LZ4 ramdisks" into rvc-dev am: 5ea1cf103f
Change-Id: Ibf2a2745637b56a52117ae9a33e34de7b6e27426
2020-05-31 16:04:51 +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
644781ccdc Add apksigner to otatools.zip am: 1325034c81 am: 63f6665bc8
Change-Id: I326d5080d21aee863d782ed96bec05b147464cf0
2020-05-30 06:06:28 +00:00
Baligh Uddin
63f6665bc8 Add apksigner to otatools.zip am: 1325034c81
Change-Id: I147c6fb98062e7917435966ca258a74acdf62712
2020-05-30 05:55:10 +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
117823fe43 Merge "iorap: Add a config mk for large memory device." into rvc-dev am: 270308af15 am: 1e020580e2
Change-Id: Ie727f4486ac139aa3b9cb7169686e8b84b61acdc
2020-05-29 21:52:59 +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
TreeHugger Robot
1e020580e2 Merge "iorap: Add a config mk for large memory device." into rvc-dev am: 270308af15
Change-Id: Ie6eeabe91eb09bdb53680227a7fa8c598b9b6a96
2020-05-29 21:39:31 +00:00
TreeHugger Robot
270308af15 Merge "iorap: Add a config mk for large memory device." into rvc-dev 2020-05-29 21:27:26 +00:00
Kousik Kumar
2dcf402edc 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
Merged-In: Ia972c74d804085196a7b6ec755af63042c6b3909
2020-05-29 08:08:58 -07:00
Hongguang Chen
cfd7302f19 Fix _ImportParser() error if property is imported from oem partition. am: 96c88287a7 am: 3065c1b1c0
Change-Id: I8da1fbcce630bb14de54d3d40f767dcc99c0180e
2020-05-29 00:56:52 +00:00
Hongguang Chen
3065c1b1c0 Fix _ImportParser() error if property is imported from oem partition. am: 96c88287a7
Change-Id: I2fabd57984512b41d279b05e2bbafd49e88de91b
2020-05-29 00:30:24 +00:00
David Zeuthen
1a5c205100 Merge "Update Identity Credential AIDL and Keymaster AIDL to V2 in VNDK list" into rvc-dev am: c599a2708f am: b27a8278e4
Change-Id: I1663ec2187490ac34080870911a2b691542f0615
2020-05-28 23:51:01 +00:00
David Zeuthen
b27a8278e4 Merge "Update Identity Credential AIDL and Keymaster AIDL to V2 in VNDK list" into rvc-dev am: c599a2708f
Change-Id: I5228272f6063e4d1a933251357512e84b330988f
2020-05-28 23:36:32 +00:00
Yan Wang
ef60ddcf6a iorap: Add a config mk for large memory device.
Pinner for camera is turned on for large memory.

Bug: 157667363
Test: Make
Change-Id: I86be79f59fa5b569fbd4e68402d3ea1b9b62275f
2020-05-28 22:50:52 +00:00
Hongguang Chen
96c88287a7 Fix _ImportParser() error if property is imported from oem partition.
The oem partition allows system build.prop to import properties from it
by "import /oem/oem.prop xxxx". An _ImportParser() error was raised on
this case.

BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
      2) On a device who has oem partition, "make dist" and sign its
      target zip file.
Change-Id: I47875bf7a698390e11690150e6516a3064550ca0
Merged-In: I47875bf7a698390e11690150e6516a3064550ca0
2020-05-28 15:22:31 -07:00
David Zeuthen
c599a2708f Merge "Update Identity Credential AIDL and Keymaster AIDL to V2 in VNDK list" into rvc-dev 2020-05-28 22:04:19 +00:00
Tianjie Xu
1053c3741b Merge changes I637dea34,I4a9fa35c,I5c952cd2 into rvc-dev am: 8098b73e0c am: e508315305
Change-Id: I051df14fe6bc5991f59cfa88acf7e647e866e535
2020-05-28 19:25:21 +00:00
Tianjie Xu
2bd69b1b01 Reland "Calculate the runtime fingerprint prefixes from build prop" am: 835aac5cf6 am: 8878ac2efc
Change-Id: I09c5ef1192bc33a3811190d2b25f1247ca43da77
2020-05-28 19:25:19 +00:00
Tianjie Xu
792231662c Reland "Add a wrapper class PartitionBuildProp"" am: 726d20a68f am: 92c2809e0a
Change-Id: I397e9d589db0a6f1cdc131763fda4f6dc3d89695
2020-05-28 19:25:16 +00:00
Tianjie Xu
e508315305 Merge changes I637dea34,I4a9fa35c,I5c952cd2 into rvc-dev am: 8098b73e0c
Change-Id: If75ec310a8a8ca4bcaa922861a48add85565323d
2020-05-28 19:07:09 +00:00
Tianjie Xu
8878ac2efc Reland "Calculate the runtime fingerprint prefixes from build prop" am: 835aac5cf6
Change-Id: I9a648b8a9537040894e1557cd2925b50ea1dd292
2020-05-28 19:07:07 +00:00
Tianjie Xu
92c2809e0a Reland "Add a wrapper class PartitionBuildProp"" am: 726d20a68f
Change-Id: I8fd163e374a28e06397aafa64a9988f445f9d0cc
2020-05-28 19:07:04 +00:00
Tianjie Xu
8098b73e0c Merge changes I637dea34,I4a9fa35c,I5c952cd2 into rvc-dev
* changes:
  Add an option to input the boot variables for OTA package generation
  Reland "Calculate the runtime fingerprint prefixes from build prop"
  Reland "Add a wrapper class PartitionBuildProp""
2020-05-28 18:56:21 +00:00
TreeHugger Robot
964a0fc46e Merge "Update auto-gen test config template with PARAMETERIZED_STRINGS placeholder" into rvc-dev am: 20daf73fd9 am: 376d43f180
Change-Id: Ia41a346c5ca4d71962a3e7020d491068eacf65de
2020-05-28 06:45:23 +00:00
TreeHugger Robot
376d43f180 Merge "Update auto-gen test config template with PARAMETERIZED_STRINGS placeholder" into rvc-dev am: 20daf73fd9
Change-Id: I1e6557aa29ba22d15f318db3f2f92e4153c2e811
2020-05-28 06:27:30 +00:00
TreeHugger Robot
20daf73fd9 Merge "Update auto-gen test config template with PARAMETERIZED_STRINGS placeholder" into rvc-dev 2020-05-28 06:12:35 +00:00
Chen Xu
591ff9ef1c Merge "support data migration by default" into rvc-dev am: 18029ed3d2 am: e9365b6921
Change-Id: I2a2040cde5bef8f324ee5ac3bc9d6ba4f52950a1
2020-05-28 00:31:45 +00:00
Chen Xu
e9365b6921 Merge "support data migration by default" into rvc-dev am: 18029ed3d2
Change-Id: Iac7158dbbda8080e452cd2197edb3595ae49eee1
2020-05-28 00:26:53 +00:00
Chen Xu
18029ed3d2 Merge "support data migration by default" into rvc-dev 2020-05-28 00:24:29 +00:00
Tianjie
48d159fa7c Add an option to input the boot variables for OTA package generation
The values of the ro.boot* variables are not part of the image files
and are provided (e.g. by bootloaders) at runtime. Meanwhile, their
values may affect some of the device build properties, as a different
build.prop file can be imported by init during runtime.

This cl adds an option to accepts a list of possible values for some
boot variables. The OTA generation script later use these values to
calculate the alternative runtime fingerprints of the device; and
list the device names and fingerprints in the OTA package's metadata.

The OTA metadata is verified by the OTA server or recovery to ensure
the correct OTA package is used for update. We haven't made any
restrictions on what ro.boot* variables can be used for fingerprint
override. One possible candidate can be the skus listed in
ODM_MANIFEST_SKUS.

Bug: 152167826
Test: unittests pass, generate an OTA file with the new option
Change-Id: I637dea3472354236d2fd1ef0a3306712b3283c29
Merged-In: I637dea3472354236d2fd1ef0a3306712b3283c29
2020-05-27 22:14:30 +00:00
Tianjie Xu
835aac5cf6 Reland "Calculate the runtime fingerprint prefixes from build prop"
This reverts commit b21e48b499.

In practice, some partners use the 'import' statement to override
the device fingerprint at runtime. The runtime fingerprint will
later add to the metadata of OTA package, so that the OTA server
can deliver the package to corresponding devices correctly.

This CL supports parsing a subset of import statement that the init
process recognizes. And we loose the restriction based on how the
dynamic fingerprint is used in practice. Right now, we only searches
for the override of brand, name and device. And the placeholder
format should be ${placeholder}, with its value supplied by the
script caller.

As part of the implementation, we generate all the possible
combinations of the input boot variables. And recalculate the
fingerprint for each of the combination. Though we load the
build.prop multiple times, the logic is easier to follow. Also,
it's more convenient to enhance the logic if we only want to
allow some of the boot variables combination later.

Bug: 152167826
Change-Id: I4a9fa35c7ac037ff1cf4f9a4bdff602beac3894b
Merged-In: I4a9fa35c7ac037ff1cf4f9a4bdff602beac3894b
Test: unittests pass
2020-05-27 22:14:02 +00:00
Tianjie Xu
726d20a68f Reland "Add a wrapper class PartitionBuildProp""
This reverts commit 6022545272.

The build prop for a partition used to be a simple key:value
dictionary. But we need more fields to hold the alternative build
props overriden by the 'import' statement. Therefore, add a new
class as a wrapper for these props first.

Bug: 152167826
Change-Id: I5c952cd2a976ba1a09ddc66d56c2b8b55a61986b
Merged-In: I5c952cd2a976ba1a09ddc66d56c2b8b55a61986b
Test: unittests pass
2020-05-27 22:13:34 +00:00
Mark Salyzyn
c1e6883d22 depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD am: d702af1ef1 am: 05d6c7d994
Change-Id: I9f192a02de4ee7a9fe155ab4dae451ec3e99a2d1
2020-05-27 18:16:51 +00:00
Mark Salyzyn
05d6c7d994 depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD am: d702af1ef1
Change-Id: I889403a31fe669b8c3fa601a79c4d255a1bf9d08
2020-05-27 18:05:26 +00:00
Chen Xu
9dfa9ec4ae support data migration by default
include stub cellbroadcat app for data preservation by dafault.

Bug: 155844209
Change-Id: I34d1978ce89f4d4edbf327a3b61f7fb87262aae0
Merged-in: I34d1978ce89f4d4edbf327a3b61f7fb87262aae0
2020-05-27 16:15:48 +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
31e385b332 Merge "Generate product build props always" into rvc-dev am: 0e5c584ba8 am: a4701b6798
Change-Id: I5283e329399c421e37d2713d7fe69f8d7bfae7d2
2020-05-27 05:16:13 +00:00
TreeHugger Robot
a4701b6798 Merge "Generate product build props always" into rvc-dev am: 0e5c584ba8
Change-Id: I58f3ba4d4919959d7cbd1d083aa0d41605ea0824
2020-05-27 04:59:19 +00:00