SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2017 The Android Open-Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | # Common boardconfig settings for generic AOSP products targetting mobile |
| 18 | # (phone/table) devices. |
| 19 | |
SzuWei Lin | 3cbe82d | 2017-08-11 17:30:17 +0800 | [diff] [blame] | 20 | # VNDK |
| 21 | BOARD_VNDK_VERSION := current |
| 22 | |
SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 23 | # Properties |
| 24 | TARGET_SYSTEM_PROP := build/make/target/board/treble_system.prop |
| 25 | BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true |
| 26 | |
| 27 | # Bootloader, kernel and recovery are not part of generic AOSP image |
| 28 | TARGET_NO_BOOTLOADER := true |
| 29 | TARGET_NO_KERNEL := true |
| 30 | |
| 31 | # system.img is always ext4 with sparse option |
SzuWei Lin | c867f1b | 2017-10-18 13:27:48 +0800 | [diff] [blame] | 32 | # GSI also includes make_f2fs to support userdata parition in f2fs |
| 33 | # for some devices |
SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 34 | TARGET_USERIMAGES_USE_EXT4 := true |
SzuWei Lin | c867f1b | 2017-10-18 13:27:48 +0800 | [diff] [blame] | 35 | TARGET_USERIMAGES_USE_F2FS := true |
SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 36 | TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false |
SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 37 | |
Bowgo Tsai | 3ac95b5 | 2018-10-04 02:14:54 +0000 | [diff] [blame] | 38 | # Enable dynamic system image size and reserved 64MB in it. |
| 39 | BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 |
SzuWei Lin | a2da9a3 | 2018-07-18 18:06:25 +0800 | [diff] [blame] | 40 | |
SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 41 | # Generic AOSP image always requires separate vendor.img |
| 42 | TARGET_COPY_OUT_VENDOR := vendor |
| 43 | |
SzuWei Lin | 5d356e2 | 2018-05-30 16:52:22 +0800 | [diff] [blame] | 44 | # Android generic system image always create metadata partition |
| 45 | BOARD_USES_METADATA_PARTITION := true |
| 46 | |
SzuWei Lin | 8075569 | 2017-07-28 11:35:40 +0800 | [diff] [blame] | 47 | # Set emulator framebuffer display device buffer count to 3 |
| 48 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 |
| 49 | |
SzuWei Lin | 83890eb | 2017-12-25 11:43:24 +0800 | [diff] [blame] | 50 | # Audio |
| 51 | USE_XML_AUDIO_POLICY_CONF := 1 |
Bowgo Tsai | 882c99a | 2017-08-18 16:08:36 +0800 | [diff] [blame] | 52 | |
SzuWei Lin | 83890eb | 2017-12-25 11:43:24 +0800 | [diff] [blame] | 53 | # Android Verified Boot (AVB): |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 54 | # 1) Sets BOARD_AVB_ENABLE to sign the GSI image. |
| 55 | # 2) Sets AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED (--flag 2) in |
| 56 | # vbmeta.img to disable AVB verification. |
| 57 | # |
| 58 | # To disable AVB for GSI, use the vbmeta.img and the GSI together. |
| 59 | # To enable AVB for GSI, include the GSI public key into the device-specific |
| 60 | # vbmeta.img. |
| 61 | BOARD_AVB_ENABLE := true |
| 62 | BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 63 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 |
| 64 | |
| 65 | # Enable chain partition for system. |
| 66 | BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 67 | BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 68 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 69 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 |