1 # Copyright (C) 2013 The Android Open Source Project 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 # 15 16 # The generic product target doesn't have any hardware-specific pieces. 17 TARGET_NO_BOOTLOADER := true 18 TARGET_NO_KERNEL := true 19 TARGET_ARCH := arm64 20 TARGET_ARCH_VARIANT := armv8-a 21 TARGET_CPU_VARIANT := generic 22 TARGET_CPU_ABI := arm64-v8a 23 TARGET_BOOTLOADER_BOARD_NAME := goldfish_$(TARGET_ARCH) 24 25 TARGET_2ND_ARCH := arm 26 TARGET_2ND_CPU_ABI := armeabi-v7a 27 TARGET_2ND_CPU_ABI2 := armeabi 28 29 ifneq ($(TARGET_BUILD_APPS)$(filter cts sdk,$(MAKECMDGOALS)),) 30 # DO NOT USE 31 # DO NOT USE 32 # 33 # This architecture / CPU variant must NOT be used for any 64 bit 34 # platform builds. It is the lowest common denominator required 35 # to build an unbundled application or cts for all supported 32 and 64 bit 36 # platforms. 37 # 38 # If you're building a 64 bit platform (and not an application) the 39 # ARM-v8 specification allows you to assume all the features available in an 40 # armv7-a-neon CPU. You should set the following as 2nd arch/cpu variant: 41 # 42 # TARGET_2ND_ARCH_VARIANT := armv8-a 43 # TARGET_2ND_CPU_VARIANT := generic 44 # 45 # DO NOT USE 46 # DO NOT USE 47 TARGET_2ND_ARCH_VARIANT := armv7-a 48 # DO NOT USE 49 # DO NOT USE 50 TARGET_2ND_CPU_VARIANT := generic 51 # DO NOT USE 52 # DO NOT USE 53 else 54 TARGET_2ND_ARCH_VARIANT := armv8-a 55 TARGET_2ND_CPU_VARIANT := generic 56 endif 57 58 59 TARGET_USES_64_BIT_BINDER := true 60 61 # no hardware camera 62 USE_CAMERA_STUB := true 63 64 TARGET_USES_HWC2 := true 65 NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 66 67 # Build OpenGLES emulation host and guest libraries 68 BUILD_EMULATOR_OPENGL := true 69 BUILD_QEMU_IMAGES := true 70 71 # Build and enable the OpenGL ES View renderer. When running on the emulator, 72 # the GLES renderer disables itself if host GL acceleration isn't available. 73 USE_OPENGL_RENDERER := true 74 75 TARGET_USERIMAGES_USE_EXT4 := true 76 # Partition size is default 1.5GB (1536MB) for 64 bits projects 77 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 78 BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 79 TARGET_COPY_OUT_VENDOR := vendor 80 # ~100 MB vendor image. Please adjust system image / vendor image sizes 81 # when finalizing them. 82 BOARD_VENDORIMAGE_PARTITION_SIZE := 100000000 83 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 84 BOARD_FLASH_BLOCK_SIZE := 512 85 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true 86 DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml 87 88 # Android generic system image always create metadata partition 89 BOARD_USES_METADATA_PARTITION := true 90 91 # Set this to create /cache mount point for non-A/B devices that mounts /cache. 92 # The partition size doesn't matter, just to make build pass. 93 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 94 BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 95 96 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true 97 BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy 98 99 # Android Verified Boot (AVB): 100 # Builds a special vbmeta.img that disables AVB verification. 101 # Otherwise, AVB will prevent the device from booting the generic system.img. 102 # Also checks that BOARD_AVB_ENABLE is not set, to prevent adding verity 103 # metadata into system.img. 104 ifeq ($(BOARD_AVB_ENABLE),true) 105 $(error BOARD_AVB_ENABLE cannot be set for GSI) 106 endif 107 BOARD_BUILD_DISABLED_VBMETAIMAGE := true 108 109 ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) 110 # GSI is always userdebug and needs a couple of properties taking precedence 111 # over those set by the vendor. 112 TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop 113 endif 114 BOARD_VNDK_VERSION := current 115 116 # Emulator system image is going to be used as GSI and some vendor still hasn't 117 # cleaned up all device specific directories under root! 118 119 # TODO(jiyong) These might be SoC specific. 120 BOARD_ROOT_EXTRA_FOLDERS += firmware firmware/radio persist 121 BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp 122 123 # TODO(b/36764215): remove this setting when the generic system image 124 # no longer has QCOM-specific directories under /. 125 BOARD_SEPOLICY_DIRS += build/target/board/generic_arm64_ab/sepolicy 126 127 # Wifi. 128 BOARD_WLAN_DEVICE := emulator 129 BOARD_HOSTAPD_DRIVER := NL80211 130 BOARD_WPA_SUPPLICANT_DRIVER := NL80211 131 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_simulated 132 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_simulated 133 WPA_SUPPLICANT_VERSION := VER_0_8_X 134 WIFI_DRIVER_FW_PATH_PARAM := "/dev/null" 135 WIFI_DRIVER_FW_PATH_STA := "/dev/null" 136 WIFI_DRIVER_FW_PATH_AP := "/dev/null" 137 138 # Enable A/B update 139 TARGET_NO_RECOVERY := true 140 BOARD_BUILD_SYSTEM_ROOT_IMAGE := true 141