Home | History | Annotate | Download | only in shared
      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 
     21 TARGET_BOOTLOADER_BOARD_NAME := cutf
     22 
     23 # Boot partition size: 32M
     24 # This is only used for OTA update packages. The image size on disk
     25 # will not change (as is it not a filesystem.)
     26 BOARD_BOOTIMAGE_PARTITION_SIZE := 33554432
     27 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432
     28 
     29 # Build a separate vendor.img partition
     30 BOARD_USES_VENDORIMAGE := true
     31 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
     32 TARGET_COPY_OUT_VENDOR := vendor
     33 
     34 BOARD_USES_METADATA_PARTITION := true
     35 
     36 # Build a separate product.img partition
     37 BOARD_USES_PRODUCTIMAGE := true
     38 BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
     39 TARGET_COPY_OUT_PRODUCT := product
     40 
     41 ifeq ($(TARGET_BUILD_SYSTEM_ROOT_IMAGE),true)
     42 BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
     43 endif
     44 BOARD_USES_GENERIC_AUDIO := false
     45 USE_CAMERA_STUB := true
     46 TARGET_USERIMAGES_USE_EXT4 := true
     47 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
     48 TARGET_USES_64_BIT_BINDER := true
     49 
     50 # Hardware composer configuration
     51 TARGET_USES_HWC2 := true
     52 
     53 # The compiler will occasionally generate movaps, etc.
     54 BOARD_MALLOC_ALIGNMENT := 16
     55 
     56 # Make the userdata partition 4G to accomodate ASAN and CTS
     57 BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296
     58 
     59 # Cache partition size: 64M
     60 BOARD_CACHEIMAGE_PARTITION_SIZE := 67108864
     61 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
     62 
     63 BOARD_GPU_DRIVERS := virgl
     64 # This prevents mesa3d from unconditionally pulling in some modules
     65 BOARD_USE_CUSTOMIZED_MESA := true
     66 
     67 # Enable goldfish's encoder.
     68 # TODO(b/113617962) Remove this if we decide to use
     69 # device/generic/opengl-transport to generate the encoder
     70 BUILD_EMULATOR_OPENGL_DRIVER := true
     71 BUILD_EMULATOR_OPENGL := true
     72 
     73 # Minimum size of the final bootable disk image: 10G
     74 # GCE will pad disk images out to 10G. Our disk images should be at least as
     75 # big to avoid warnings about partition table oddities.
     76 BOARD_DISK_IMAGE_MINIMUM_SIZE := 10737418240
     77 
     78 BOARD_BOOTIMAGE_MAX_SIZE := 8388608
     79 BOARD_SYSLOADER_MAX_SIZE := 7340032
     80 # TODO(san): See if we can get rid of this.
     81 BOARD_FLASH_BLOCK_SIZE := 512
     82 
     83 WITH_DEXPREOPT := true
     84 
     85 USE_OPENGL_RENDERER := true
     86 
     87 # Wifi.
     88 BOARD_WLAN_DEVICE           := wlan0
     89 BOARD_HOSTAPD_DRIVER        := NL80211
     90 BOARD_WPA_SUPPLICANT_DRIVER := NL80211
     91 BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_simulated
     92 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_simulated
     93 WPA_SUPPLICANT_VERSION      := VER_0_8_X
     94 WIFI_DRIVER_FW_PATH_PARAM   := "/dev/null"
     95 WIFI_DRIVER_FW_PATH_STA     := "/dev/null"
     96 WIFI_DRIVER_FW_PATH_AP      := "/dev/null"
     97 
     98 BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy
     99 
    100 # master has breaking changes in dlfcn.h, but the platform SDK hasn't been
    101 # bumped. Restore the line below when it is.
    102 VSOC_VERSION_CFLAGS := -DVSOC_PLATFORM_SDK_VERSION=29
    103 # VSOC_VERSION_CFLAGS := -DVSOC_PLATFORM_SDK_VERSION=${PLATFORM_SDK_VERSION}
    104 VSOC_STLPORT_INCLUDES :=
    105 VSOC_STLPORT_LIBS :=
    106 VSOC_STLPORT_STATIC_LIBS :=
    107 VSOC_TEST_INCLUDES := external/googletest/googlemock/include external/googletest/googletest/include
    108 VSOC_TEST_LIBRARIES := libgmock_main_host libgtest_host libgmock_host
    109 VSOC_LIBCXX_STATIC := libc++_static
    110 VSOC_PROTOBUF_SHARED_LIB := libprotobuf-cpp-full
    111 
    112 CUTTLEFISH_LIBRIL_NAME := libril-cuttlefish-fork
    113 ENABLE_CUTTLEFISH_RILD := true
    114 
    115 # TODO(ender): Remove all these once we stop depending on GCE code.
    116 GCE_VERSION_CFLAGS := -DGCE_PLATFORM_SDK_VERSION=${PLATFORM_SDK_VERSION}
    117 GCE_STLPORT_INCLUDES := $(VSOC_STLPORT_INCLUDES)
    118 GCE_STLPORT_LIBS := $(VSOC_STLPORT_LIBS)
    119 GCE_STLPORT_STATIC_LIBS := $(VSOC_STLPORT_STATIC_LIBS)
    120 GCE_TEST_INCLUDES := $(VSOC_TEST_INCLUDES)
    121 GCE_TEST_LIBRARIES := $(VSOC_TEST_LIBRARIES)
    122 GCE_LIBCXX_STATIC := $(VSOC_LIBCXX_STATIC)
    123 GCE_PROTOBUF_SHARED_LIB := $(VSOC_PROTOBUF_SHARED_LIB)
    124 # TODO(ender): up till here.
    125 
    126 STAGEFRIGHT_AVCENC_CFLAGS := -DANDROID_GCE
    127 
    128 INIT_BOOTCHART := true
    129 
    130 # Need this so that the application's loop on reading input can be synchronized
    131 # with HW VSYNC
    132 TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
    133 
    134 # Settings for dhcpcd-6.8.2.
    135 DHCPCD_USE_IPV6 := no
    136 DHCPCD_USE_DBUS := no
    137 DHCPCD_USE_SCRIPT := yes
    138 
    139 USE_XML_AUDIO_POLICY_CONF := 1
    140 
    141 BOARD_VNDK_VERSION := current
    142 
    143 # TODO(b/73078796): remove
    144 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
    145 
    146 TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
    147 ifeq ($(TARGET_BUILD_SYSTEM_ROOT_IMAGE),true)
    148 # Use the initrd version for the dtb build, because we need to have /system
    149 # defined somewhere, and the dtb fstab doesn't define it (deliberately)
    150 TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.initrd
    151 else ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
    152 TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.initrd-dynamic-partitions
    153 else
    154 TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.initrd
    155 endif
    156 
    157 ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
    158   BOARD_SUPER_PARTITION_SIZE := 6442450944
    159   BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
    160   BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product
    161   BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6442450944
    162   BOARD_SUPER_PARTITION_METADATA_DEVICE := vda
    163   BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
    164   BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
    165   TARGET_RELEASETOOLS_EXTENSIONS := device/google/cuttlefish/shared
    166 else
    167   # No dynamic partitions support; we must specify maximum sizes
    168   BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4294967296 # 4 GB
    169   BOARD_VENDORIMAGE_PARTITION_SIZE := 536870912 # 512MB
    170   BOARD_PRODUCTIMAGE_PARTITION_SIZE := 1610612736 # 1.5GB
    171   TARGET_NO_RECOVERY ?= true
    172 endif
    173 
    174 # To see full logs from init, disable ratelimiting.
    175 # The default is 5 messages per second amortized, with a burst of up to 10.
    176 BOARD_KERNEL_CMDLINE += printk.devkmsg=on
    177