1# 2# Copyright 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# 18# Common BoardConfig for all supported architectures. 19# 20 21include build/make/target/board/BoardConfigMainlineCommon.mk 22 23TARGET_BOOTLOADER_BOARD_NAME := cutf 24 25# Boot partition size: 32M 26# This is only used for OTA update packages. The image size on disk 27# will not change (as is it not a filesystem.) 28BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 29BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 30BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 67108864 31 32# Build a separate vendor.img partition 33BOARD_USES_VENDORIMAGE := true 34BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 35 36BOARD_USES_METADATA_PARTITION := true 37 38# Build a separate product.img partition 39BOARD_USES_PRODUCTIMAGE := true 40BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 41 42# Build a separate system_ext.img partition 43BOARD_USES_SYSTEM_EXTIMAGE := true 44BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 45TARGET_COPY_OUT_SYSTEM_EXT := system_ext 46 47# Build a separate odm.img partition 48BOARD_USES_ODMIMAGE := true 49BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 50TARGET_COPY_OUT_ODM := odm 51 52# Build a separate vendor_dlkm partition 53BOARD_USES_VENDOR_DLKMIMAGE := true 54BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4 55TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm 56 57# Build a separate odm_dlkm partition 58BOARD_USES_ODM_DLKMIMAGE := true 59BOARD_ODM_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4 60TARGET_COPY_OUT_ODM_DLKM := odm_dlkm 61 62# FIXME: Remove this once we generate the vbmeta digest correctly 63BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 64 65# Enable chained vbmeta for system image mixing 66BOARD_AVB_VBMETA_SYSTEM := product system system_ext 67BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem 68BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 69BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) 70BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 71 72BOARD_USES_GENERIC_AUDIO := false 73USE_CAMERA_STUB := true 74TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true 75 76# Hardware composer configuration 77TARGET_USES_HWC2 := true 78 79# The compiler will occasionally generate movaps, etc. 80BOARD_MALLOC_ALIGNMENT := 16 81 82# Make the userdata partition 4.25G to accomodate ASAN and CTS 83BOARD_USERDATAIMAGE_PARTITION_SIZE := 4563402752 84TARGET_USERIMAGES_SPARSE_F2FS_DISABLED := true 85BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := $(TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE) 86TARGET_USERIMAGES_USE_F2FS := true 87 88# Cache partition size: 64M 89BOARD_CACHEIMAGE_PARTITION_SIZE := 67108864 90BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 91 92BOARD_GPU_DRIVERS := virgl 93 94# Enable goldfish's encoder. 95# TODO(b/113617962) Remove this if we decide to use 96# device/generic/opengl-transport to generate the encoder 97BUILD_EMULATOR_OPENGL_DRIVER := true 98BUILD_EMULATOR_OPENGL := true 99 100# Minimum size of the final bootable disk image: 10G 101# GCE will pad disk images out to 10G. Our disk images should be at least as 102# big to avoid warnings about partition table oddities. 103BOARD_DISK_IMAGE_MINIMUM_SIZE := 10737418240 104 105BOARD_BOOTIMAGE_MAX_SIZE := 8388608 106BOARD_SYSLOADER_MAX_SIZE := 7340032 107# TODO(san): See if we can get rid of this. 108BOARD_FLASH_BLOCK_SIZE := 512 109 110USE_OPENGL_RENDERER := true 111 112# Wifi. 113BOARD_WLAN_DEVICE := wlan0 114BOARD_HOSTAPD_DRIVER := NL80211 115BOARD_WPA_SUPPLICANT_DRIVER := NL80211 116WPA_SUPPLICANT_VERSION := VER_0_8_X 117WIFI_DRIVER_FW_PATH_PARAM := "/dev/null" 118WIFI_DRIVER_FW_PATH_STA := "/dev/null" 119WIFI_DRIVER_FW_PATH_AP := "/dev/null" 120 121# vendor sepolicy 122BOARD_VENDOR_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy/vendor 123BOARD_VENDOR_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy/vendor/google 124# product sepolicy, allow other layers to append 125PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy/product/private 126# PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy/product/public 127# system_ext sepolicy 128BOARD_PLAT_PRIVATE_SEPOLICY_DIR := device/google/cuttlefish/shared/sepolicy/system_ext/private 129# BOARD_PLAT_PUBLIC_SEPOLICY_DIR := device/google/cuttlefish/shared/sepolicy/system_ext/public 130 131VSOC_STLPORT_INCLUDES := 132VSOC_STLPORT_LIBS := 133VSOC_STLPORT_STATIC_LIBS := 134VSOC_TEST_INCLUDES := external/googletest/googlemock/include external/googletest/googletest/include 135VSOC_TEST_LIBRARIES := libgmock_main_host libgtest_host libgmock_host 136VSOC_LIBCXX_STATIC := libc++_static 137VSOC_PROTOBUF_SHARED_LIB := libprotobuf-cpp-full 138 139CUTTLEFISH_LIBRIL_NAME := libril-cuttlefish-fork 140ENABLE_CUTTLEFISH_RILD := true 141 142# TODO(ender): Remove all these once we stop depending on GCE code. 143GCE_VERSION_CFLAGS := -DGCE_PLATFORM_SDK_VERSION=${PLATFORM_SDK_VERSION} 144GCE_STLPORT_INCLUDES := $(VSOC_STLPORT_INCLUDES) 145GCE_STLPORT_LIBS := $(VSOC_STLPORT_LIBS) 146GCE_STLPORT_STATIC_LIBS := $(VSOC_STLPORT_STATIC_LIBS) 147GCE_TEST_INCLUDES := $(VSOC_TEST_INCLUDES) 148GCE_TEST_LIBRARIES := $(VSOC_TEST_LIBRARIES) 149GCE_LIBCXX_STATIC := $(VSOC_LIBCXX_STATIC) 150GCE_PROTOBUF_SHARED_LIB := $(VSOC_PROTOBUF_SHARED_LIB) 151# TODO(ender): up till here. 152 153STAGEFRIGHT_AVCENC_CFLAGS := -DANDROID_GCE 154 155INIT_BOOTCHART := true 156 157# Settings for dhcpcd-6.8.2. 158DHCPCD_USE_IPV6 := no 159DHCPCD_USE_DBUS := no 160DHCPCD_USE_SCRIPT := yes 161 162 163TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888 164TARGET_RECOVERY_UI_LIB := librecovery_ui_cuttlefish 165TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.f2fs 166 167BOARD_SUPER_PARTITION_SIZE := 6442450944 168BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions 169BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor vendor_dlkm odm_dlkm 170BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6442450944 171BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true 172BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true 173TARGET_RELEASETOOLS_EXTENSIONS := device/google/cuttlefish/shared 174 175BOARD_RAMDISK_USE_LZ4 := true 176 177# To see full logs from init, disable ratelimiting. 178# The default is 5 messages per second amortized, with a burst of up to 10. 179BOARD_KERNEL_CMDLINE += printk.devkmsg=on 180BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/etc/ 181 182BOARD_KERNEL_CMDLINE += init=/init 183BOARD_KERNEL_CMDLINE += androidboot.hardware=cutf_cvm 184 185ifeq ($(TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE),f2fs) 186BOARD_KERNEL_CMDLINE += androidboot.fstab_suffix=f2fs 187endif 188 189ifeq ($(TARGET_USERDATAIMAGE_FILE_SYSTEM_TYPE),ext4) 190BOARD_KERNEL_CMDLINE += androidboot.fstab_suffix=ext4 191endif 192 193BOARD_INCLUDE_DTB_IN_BOOTIMG := true 194BOARD_BOOT_HEADER_VERSION := 3 195BOARD_USES_RECOVERY_AS_BOOT := true 196BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) 197PRODUCT_COPY_FILES += \ 198 device/google/cuttlefish/dtb.img:dtb.img \ 199 device/google/cuttlefish/required_images:required_images \ 200 201BOARD_BUILD_SYSTEM_ROOT_IMAGE := false 202