1#
2# Copyright (C) 2023 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
17include build/make/target/board/BoardConfigGsiCommon.mk
18
19BOARD_VENDOR_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/vendor
20SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/system_ext/private
21
22TARGET_BOOTLOADER_BOARD_NAME := goldfish_$(TARGET_ARCH)
23
24NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
25
26# Build OpenGLES emulation guest and host libraries
27BUILD_EMULATOR_OPENGL := true
28BUILD_QEMU_IMAGES := true
29
30# Build and enable the OpenGL ES View renderer. When running on the emulator,
31# the GLES renderer disables itself if host GL acceleration isn't available.
32USE_OPENGL_RENDERER := true
33
34# Emulator doesn't support sparse image format.
35TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
36
37# emulator is Non-A/B device
38AB_OTA_UPDATER := false
39AB_OTA_PARTITIONS :=
40
41BOARD_USES_SYSTEM_OTHER_ODEX :=
42
43# emulator needs super.img
44BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
45
46# 8G + 8M
47BOARD_SUPER_PARTITION_SIZE ?= 8598323200
48BOARD_SUPER_PARTITION_GROUPS := emulator_dynamic_partitions
49
50BOARD_EMULATOR_DYNAMIC_PARTITIONS_PARTITION_LIST := \
51  system \
52  system_dlkm \
53  system_ext \
54  product \
55  vendor
56
57BOARD_EROFS_PCLUSTER_SIZE ?= 16384
58EMULATOR_RO_PARTITION_FS ?= ext4
59
60BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := $(EMULATOR_RO_PARTITION_FS)
61
62TARGET_COPY_OUT_PRODUCT := product
63BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := $(EMULATOR_RO_PARTITION_FS)
64TARGET_COPY_OUT_SYSTEM_EXT := system_ext
65BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := $(EMULATOR_RO_PARTITION_FS)
66
67BOARD_USES_SYSTEM_DLKMIMAGE := true
68BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs # we never write here
69TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
70
71# 8G
72BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE ?= 8589934592
73
74#vendor boot
75BOARD_INCLUDE_DTB_IN_BOOTIMG := false
76BOARD_BOOT_HEADER_VERSION := 4
77BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
78BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x06000000
79BOARD_RAMDISK_USE_LZ4 := true
80
81# Enable chain partition for system.
82BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
83BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048
84BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
85BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
86
87BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := $(EMULATOR_RO_PARTITION_FS)
88BOARD_FLASH_BLOCK_SIZE := 512
89
90# Wifi.
91BOARD_WLAN_DEVICE           := emulator
92BOARD_HOSTAPD_DRIVER        := NL80211
93BOARD_WPA_SUPPLICANT_DRIVER := NL80211
94BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_simulated
95BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_simulated
96WPA_SUPPLICANT_VERSION      := VER_0_8_X
97WIFI_DRIVER_FW_PATH_PARAM   := "/dev/null"
98WIFI_DRIVER_FW_PATH_STA     := "/dev/null"
99WIFI_DRIVER_FW_PATH_AP      := "/dev/null"
100