Commit graph

1253 commits

Author SHA1 Message Date
Tom Cherry
04552fed3b Merge "Support a first stage ramdisk via TARGET_RAMDISK_OUT" 2018-08-29 17:05:40 +00:00
Tom Cherry
d14b895665 Support a first stage ramdisk via TARGET_RAMDISK_OUT
Support a first stage ramdisk which will include the targets placed
into TARGET_RAMDISK_OUT.  This replaces the existing ramdisk on
existing devices.

All system images are now built to be mounted as the root dir.
Devices with a first stage ramdisk will switch root to the system
partition.

BOARD_BUILD_SYSTEM_ROOT_IMAGE remains and is used to specify if the
system partition is going to be directly used as rootfs without the
ramdisk.

Bug: 79173823
Bug: 79758715
Test: hikey boots, sailfish boots
Test: OTA walleye from P to master
Change-Id: Idbb2dccc6340b0235a4bef03e11e420a9ed154b6
2018-08-28 12:42:41 -07:00
David Brazdil
b67402ecce Support hidden API whitelist generated by class2greylist
Libcore has support for annotating a virtual method which is known
to change its return type in a future release. This annotation is
recognized by the dexer and a future-proof bridge method is created.
This patch integrates changes in class2greylist to support this
annotation into the build system and generation of hidden API lists.

Calling class2greylist on each boot classpath module now produces two
text files instead of one: signatures for greylisting and now also
whitelisting. They are passed on to the hidden API list generating rules
in frameworks/base.

Bug: 112186571
Test: m appcompat, diff public-list.txt whitelist.txt
Change-Id: I9861203e6e07a17d50850892ec13880971457d11
2018-08-23 10:38:03 +01:00
Yu Shan
10be65dbc1 Use prebuilt nanopb_generator.py.
Use prebuilt nanopb_generator.py to avoid using the incompatible
version of libprotobuf-python on host.

Test: Local build tests.
Bug: 111798740
Change-Id: Iabca07eb13dbab183fbf85cb0dfe04ce33aa660c
(cherry picked from commit fa47daa47d)
2018-08-16 16:07:05 -07:00
Treehugger Robot
c272a99b5c Merge "Add support for /odm partition" 2018-08-16 03:37:36 +00:00
Treehugger Robot
72150c147e Merge "Remove proguard support" 2018-08-15 01:14:45 +00:00
Colin Cross
e3a4df80c8 Allow Soong to autogenerate test configs
Move the configuration for autogenerating test configs into Soong,
and add LOCAL_FULL_TEST_CONFIG so that Soong can specify the full
path to a generated test config.

Also add a java junit test config template.

Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Test: atest junit-params-test
Change-Id: I2e64bc33c949ab7b342be518f94a81a186fe9c07
2018-08-14 15:39:32 -07:00
yangbill
976c80ae86 ATest: Host native test config auto-gen support.
Autogenerate HostGTest test config for better user
experience of hostside native tests.

BUG: 80298359

Test: . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j
      . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j hello_world_test
      . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j CtsLiblogTestCases_list

Change-Id: Iee1db17f8957d3c1cd80c9aae1996a72b48413d9
2018-08-14 14:53:14 -07:00
Colin Cross
de684e84fb Merge "Remove TARGET_USES_MKE2FS" 2018-08-14 20:55:51 +00:00
Colin Cross
a110579e31 Remove TARGET_USES_MKE2FS
Nothing reads TARGET_USES_MKE2FS any more, mke2fs is always used.
Remove the requirement that TARGET_USES_MKE2FS is set, and remove
the places it is set.

Bug: 112241651
Test: m checkbuild
Change-Id: Ibdca062bbe7dcd19ba8f7ee7f8291ce746b74e65
2018-08-13 17:40:26 +00:00
Bowgo Tsai
e4e3018bf6 Adding constraints for first shipping API level >= 29
Do not allow setting BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE when
first shipping API level >= 29.

Bug: 112291283
Test: Checks it can cause build error when the condition is met

Change-Id: I3983bea89625f5ece303432b32bea277aee21a2b
2018-08-14 00:17:50 +08:00
Bowgo Tsai
d624fa63d5 Add support for /odm partition
This CL is largely an adaptation of Change-Id
I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d

tools/vendor_buildinfo.sh is also renamed to tools/device_buildinfo.sh.
The caller then can invoke device_buildinfo.sh "vendor" | "odm" to
generate properties for vendor.img and odm.img, respectively.

It adds the following variables:

- BOARD_AVB_ODM_KEY_PATH
- BOARD_AVB_ODM_ALGORITHM
- BOARD_AVB_ODM_ROLLBACK_INDEX_LOCATION
- BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
- BOARD_ODMIMAGE_EXTFS_INODE_COUNT
- BOARD_ODMIMAGE_EXTFS_RSV_PCT
- BOARD_ODMIMAGE_PARTITION_SIZE
- BOARD_ODMIMAGE_JOURNAL_SIZE
- BOARD_ODMIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_ODMIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_ODMIMAGE
- BOARD_USES_ODMIMAGE
- LOCAL_ODM_MODULE
- PRODUCT_ODM_BASE_FS_PATH
- PRODUCT_ODM_VERITY_PARTITION
- PRODUCT_ODM_PROPERTIES
- TARGET_COPY_OUT_ODM
- TARGET_OUT_ODM
- TARGET_OUT_ODM_*

Bug: 64195575
Test: boot a Taimen with existing images

Test: `make odmimage` with
      - BOARD_AVB_ENABLE := true
      - BOARD_ODMIMAGE_PARTITION_SIZE := 62914560
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success

Test: `make odmimage` with
      - BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE := 10485760
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - BOARD_AVB_ENABLE := true
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success
      - PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true

Change-Id: I4dea7b567ec49a766c7a4683decaf81c7e921d55
2018-08-08 18:59:44 +08:00
Colin Cross
3ebfe7309f Remove proguard support
R8 is always used now.

Bug: 111885749
Test: m checkbuild
Change-Id: I9ae586c6360f2e3050422090b4e08f27ae167758
2018-08-07 11:22:17 -07:00
Yifan Hong
d55225f8d6 Merge "Remove USE_LOGICAL_PARTITIONS override"
am: c0213682b3

Change-Id: I75667dfc3596cda7b8b640540f48964081107eb2
2018-08-01 11:40:43 -07:00
Yifan Hong
9a7d525849 Merge "Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags."
am: d1c308bf40

Change-Id: I834e75dcfc04af0dd8655027bfc251c3d0162815
2018-08-01 11:39:59 -07:00
Yifan Hong
a42e5f976d Remove USE_LOGICAL_PARTITIONS override
... so that its requirements does not fallback
on the overridden USE_LOGICAL_PARTITIONS, but
PRODUCT_USE_LOGICAL_PARTITIONS.

Test: m superimage -j
Change-Id: Ib14aaf83cc8bd4336125d503d11c69a60566530e
2018-08-01 18:29:44 +00:00
Yifan Hong
2dae5721d4 Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags.
Split the flag into PRODUCT_USE_DYNAMIC_PARTITION_SIZE
and PRODUCT_BUILD_SUPER_PARTITION. More sub-flags can be
added with the same way.

Also change some checks with USE_LOGICAL_PARTITIONS with
the appropriate sub-flags.

This allows easier device bring-up to fulfill the requirements
separately.

This also enables dynamic partition size without logical patition.
Originally, to enable BOARD_*_PARTITION_RESERVED_SIZE must also
enable PRODUCT_USE_LOGICAL_PARTITIONS. The patch fix the rule to
let dynamic partition size is able to be used independently.

Fixes: 111966003

Test: make superimage with PRODUCT_USE_LOGICAL_PARTITIONS
Change-Id: I45b29c87bf94356d8416bbd58a14c8982039c222
2018-08-01 00:39:13 +00:00
Yifan Hong
8883a739b3 Merge changes I1459d62f,I4c2b975e
am: bb937a6b69

Change-Id: Ifdedee1b0251bc9c2a8baf30d28b5d315b5c9e20
2018-07-30 11:35:33 -07:00
Yifan Hong
bb937a6b69 Merge changes I1459d62f,I4c2b975e
* changes:
  Build image for super partition
  productservices => product_services
2018-07-30 18:23:38 +00:00
Yifan Hong
09e4e23a2f Merge "Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS."
am: 4f85bace12

Change-Id: I01718232aa2de09b46785d029bdd70ff59b8d9d6
2018-07-30 10:38:33 -07:00
Yifan Hong
37c0c7c82d Build image for super partition
... for bootstrapping / initializing the device.
Image is built to $(PRODUCT_OUT)/super.img when running
`m dist`. For A/B devices, the image contains other
partitions in the _a slot.

Change-Id: I1459d62f02b95f142dfb3b7608f88ec6801dbf37
Fixes: 111758129
Test: m superimage -j
2018-07-27 13:45:43 -07:00
Yifan Hong
0c3eb63eb3 Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS.
When it is true, all kernel requirements are enforced during OTA.
Otherwise:
- Kernel minor revision is not enforced.
- Kernel configs are not enforced.

Bug: 111840577
Test: `m dist` and inspect system_matrix.xml in OTA zip

Change-Id: I965ee5ef59ff48b600ebfab858ecf0909397fe6b
2018-07-27 12:42:11 -07:00
Yifan Hong
ebc041af56 productservices => product_services
Make names consistent.
Some things that does not change:
- productservicesimage target and intermediates

Test: build product services image
Bug: 111609632
Change-Id: I4c2b975e194577aad3d51b908b103880625deb5e
2018-07-26 17:19:02 -07:00
Yifan Hong
2843e2e16f Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk"
am: df899f64d0

Change-Id: Icdf456afba7d366373311b292b1675c3cce6bf4c
2018-07-26 15:09:53 -07:00
Treehugger Robot
df899f64d0 Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk" 2018-07-26 21:44:05 +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
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
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
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
9c35a022e1 build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I00c1a96c09cf7bd9274b65ac0afc47462686171d
2018-07-20 16:51:26 -07:00
Yifan Hong
56a6c3bb34 build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I26aba694fd3d6a2feed7601524dde52569ba41e2
2018-07-20 16:51:26 -07:00
Dario Freni
5f9ddc95a2 Merge "Add support for /product-services partition"
am: 3cf03b775a

Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
2018-07-20 02:09:37 -07:00
Dario Freni
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00:00
Tri Vo
60b687383d Merge "Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
am: 3e583e0b3d

Change-Id: I297a53cd1acd73250967c6a9669f876d68694354
2018-07-19 18:02:51 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Tri Vo
047c4d544c Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 72458734
Test: m selinux_policy
Change-Id: I5104c14bcc45067723080c229895c9a7771b2651
2018-07-18 13:24:43 -07:00
David Brazdil
467a10c261 Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-13 00:52:05 +00:00
David Brazdil
dc39f73d5b Merge "Add singleton rule for hiddenapi list generation" 2018-07-12 21:34:54 +00:00
David Brazdil
ab501e0d8b Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-12 08:58:14 +00:00
Colin Cross
5bcb2fc9a9 Move manifest merger config to Soong
Bug: 110848854
Test: m checkbuild
Change-Id: Id9a8b4c02ade275eefc32bf72710430e889cd554
Merged-In: Id9a8b4c02ade275eefc32bf72710430e889cd554
Merged-In: Ib20aa4849978283f1da1ce601b28199fc0183e05
2018-07-11 09:43:04 -07:00
Colin Cross
4871e77f0a Move manifest merger config to Soong
Bug: 110848854
Test: m checkbuild
Change-Id: Id9a8b4c02ade275eefc32bf72710430e889cd554
2018-07-10 22:49:15 -07:00
Colin Cross
357bed2f65 Merge "Make USE_D8 and USE_R8 read-only"
am: 670dd68705

Change-Id: I04e82b076c3669fa3a3ce73e2012c9c430ce47eb
2018-07-10 09:51:05 -07:00
Treehugger Robot
670dd68705 Merge "Make USE_D8 and USE_R8 read-only" 2018-07-10 16:38:44 +00:00
Anton Hansson
bfc78def01 Merge "Warn when defining a 32-bit product on a 64-bit device."
am: 4788f5b094

Change-Id: I705ee5fb954c156e7e57dda684ce5d45b23ffb97
2018-07-09 23:39:11 -07:00
Anton Hansson
133fcb2550 Warn when defining a 32-bit product on a 64-bit device.
Building a 32-bit-app-only product on a 64-bit capable device is likely
to be unintentional. Print a warning if this is done implicitly,
e.g. via forgetting to define the TARGET_SUPPORTS_64_BIT_APPS variable.

Also change existing references to only treat 'true' as a positive
value, rather than all non-empty ones.

Bug: 110918674
Test: lunched 64-bit-device product that does and doesn't set this var
Change-Id: I021157c94ec3ac1c690547c8992768e58c89c287
2018-07-09 13:17:52 +01:00
Colin Cross
bbbcf1c01e Merge "Disable standalone relocation packer"
am: effbc370dc

Change-Id: Ie72c24415f13f0960413f61d515b793ab780125a
2018-06-26 10:50:11 -07:00
Colin Cross
979f9f9b18 Disable standalone relocation packer
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer.  Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.

This will also prevent relocation packing on prebuilt shared
libraries.

Also enables relocation packing on Darwin since lld will work on
Darwin.

Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
2018-06-26 00:35:46 +00:00
Colin Cross
e9381754b4 Make USE_D8 and USE_R8 read-only
Confusion between LOCAL_USE_R8 and USE_R8 caused USE_R8 := false
to be set in an Android.mk file, which changed the behavior of
half of the build.  Make USE_R8 and USE_D8 read-only to prevent
it from happening again.

Test: m checkbuild
Bug: 110033958
Change-Id: I09a8fbf3d7f8e4b3f0cb3de538870f925d5d0abe
2018-06-25 14:18:42 -07:00
Yifan Hong
bb42f7d655 Merge changes from topic "board_partition_reserved_size"
am: 3967e0eb99

Change-Id: I767967f1086ec303c63199d0e38ec02dedf09152
2018-06-22 13:25:18 -07:00