1# BoardConfigEmuCommon.mk
2#
3# Common compile-time definitions for emulator
4#
5
6HAVE_HTC_AUDIO_DRIVER := true
7BOARD_USES_GENERIC_AUDIO := true
8TARGET_BOOTLOADER_BOARD_NAME := goldfish_$(TARGET_ARCH)
9
10# No Kernel
11TARGET_NO_KERNEL := true
12
13# no hardware camera
14USE_CAMERA_STUB := true
15
16NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
17
18# Build OpenGLES emulation guest and host libraries
19BUILD_EMULATOR_OPENGL := true
20BUILD_QEMU_IMAGES := true
21
22# Build and enable the OpenGL ES View renderer. When running on the emulator,
23# the GLES renderer disables itself if host GL acceleration isn't available.
24USE_OPENGL_RENDERER := true
25
26# Emulator doesn't support sparse image format.
27TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
28
29ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
30  # emulator is Non-A/B device
31  AB_OTA_UPDATER := false
32
33  # emulator needs super.img
34  BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
35
36  # 4G + 8M
37  BOARD_SUPER_PARTITION_SIZE := 4303355904
38  BOARD_SUPER_PARTITION_GROUPS := emulator_dynamic_partitions
39
40  ifeq ($(QEMU_USE_SYSTEM_EXT_PARTITIONS),true)
41    BOARD_EMULATOR_DYNAMIC_PARTITIONS_PARTITION_LIST := \
42        system \
43        system_ext \
44        product \
45        vendor
46
47    TARGET_COPY_OUT_PRODUCT := product
48    BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
49    TARGET_COPY_OUT_SYSTEM_EXT := system_ext
50    BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
51  else
52    TARGET_COPY_OUT_PRODUCT := system/product
53    TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext
54    BOARD_EMULATOR_DYNAMIC_PARTITIONS_PARTITION_LIST := \
55        system \
56        vendor
57  endif
58
59  # 4G
60  BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE := 4294967296
61
62  # in build environment to speed up make -j
63  ifeq ($(QEMU_DISABLE_AVB),true)
64    BOARD_AVB_ENABLE := false
65  endif
66else ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true)
67  # Enable dynamic system image size and reserved 64MB in it.
68  BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
69  BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 67108864
70else
71  BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
72  BOARD_VENDORIMAGE_PARTITION_SIZE := 146800640
73endif
74
75#vendor boot
76BOARD_INCLUDE_DTB_IN_BOOTIMG := false
77BOARD_BOOT_HEADER_VERSION := 4
78BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
79BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x06000000
80BOARD_RAMDISK_USE_LZ4 := true
81
82# Enable chain partition for system.
83BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
84BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048
85BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
86BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
87
88BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
89BOARD_FLASH_BLOCK_SIZE := 512
90DEVICE_MATRIX_FILE   := device/generic/goldfish/compatibility_matrix.xml
91
92BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/common
93