forked from shugaoye/device_generic_common
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathBoardConfig.mk
More file actions
216 lines (172 loc) · 6.45 KB
/
Copy pathBoardConfig.mk
File metadata and controls
216 lines (172 loc) · 6.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#
# BoardConfig.mk for x86 platform
#
TARGET_BOARD_PLATFORM := android-x86
LOCAL_COMMON_TREE := device/generic/common
## Use EROFS image or SquashFS
USE_SQUASHFS := 1
USE_EROFS := 0
# A/B
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS += \
system \
initrd \
kernel \
ramdisk-recovery
# Rootfs
BOARD_ROOT_EXTRA_FOLDERS := boot
# Some framework code requires this to enable BT
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_LINUX := true
#BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/generic/common/bluetooth
BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
BOARD_USE_LEGACY_UI := true
# customize the malloced address to be 16-byte aligned
BOARD_MALLOC_ALIGNMENT := 16
# Enable dex-preoptimization to speed up the first boot sequence
# of an SDK AVD. Note that this operation only works on Linux for now
ifeq ($(HOST_OS),linux)
WITH_DEXPREOPT := true
WITH_DEXPREOPT_PIC := true
endif
# the following variables could be overridden
TARGET_PRELINK_MODULE := false
TARGET_NO_KERNEL ?= false
#TARGET_NO_RECOVERY ?= true
TARGET_EXTRA_KERNEL_MODULES :=
ifneq ($(filter efi_img,$(MAKECMDGOALS)),)
TARGET_KERNEL_ARCH ?= x86_64
endif
TARGET_USES_64_BIT_BINDER := true
BOARD_USES_GENERIC_AUDIO ?= false
BOARD_USES_ALSA_AUDIO := true
BOARD_USES_TINY_ALSA_AUDIO := true
INTEL_AUDIO_HAL := audio
BUILD_WITH_ALSA_UTILS ?= true
BOARD_HAS_GPS_HARDWARE ?= true
# Don't build emulator
BUILD_EMULATOR ?= false
BUILD_STANDALONE_EMULATOR ?= false
BUILD_EMULATOR_QEMUD ?= false
BUILD_EMULATOR_OPENGL ?= false
BUILD_EMULATOR_OPENGL_DRIVER ?= false
BUILD_EMULATOR_QEMU_PROPS ?= false
BUILD_EMULATOR_CAMERA_HAL ?= false
BUILD_EMULATOR_GPS_MODULE ?= false
BUILD_EMULATOR_LIGHTS_MODULE ?= false
BUILD_EMULATOR_SENSORS_MODULE ?= false
BUILD_ARM_FOR_X86 := $(WITH_NATIVE_BRIDGE)
BOARD_USE_LIBVA_INTEL_DRIVER := true
BOARD_USE_LIBVA := true
BOARD_USE_LIBMIX := true
BOARD_USES_WRS_OMXIL_CORE := true
USE_INTEL_OMX_COMPONENTS := true
USE_OPENGL_RENDERER := true
NUM_FRAMEBUFFER_SURFACE_BUFFERS ?= 3
BOARD_USES_DRM_GRALLOC := false
BOARD_USES_DRM_HWCOMPOSER ?= true
BOARD_USES_MINIGBM := true
BOARD_USES_MINIGBM_INTEL := true
BOARD_USES_GRALLOC1 := true
BOARD_USES_IA_HWCOMPOSER := true
TARGET_USES_HWC2 ?= true
#BOARD_USES_VULKAN := true
USE_CAMERA_STUB ?= false
# This enables the wpa wireless driver
# and hostapd tool
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
WIFI_HIDL_FEATURE_AWARE := true
BOARD_GPU_DRIVERS ?= crocus i915 iris freedreno panfrost nouveau r300g r600g radeonsi virgl vmwgfx
ifneq ($(strip $(BOARD_GPU_DRIVERS)),)
TARGET_HARDWARE_3D := true
endif
#BOARD_MESA3D_USES_MESON_BUILD := true
#BOARD_MESA3D_CLASSIC_DRIVERS := i965
BOARD_MESA3D_BUILD_LIBGBM := true
BOARD_MESA3D_GALLIUM_DRIVERS := crocus iris i915 nouveau r600 radeonsi svga virgl zink softpipe llvmpipe
BOARD_MESA3D_VULKAN_DRIVERS := amd intel intel_hasvk virtio swrast nouveau
BOARD_MESA3D_GALLIUM_VA := enabled
BOARD_MESA3D_VIDEO_CODECS := h264dec h265dec vc1dec av1dec vp9dec
BOARD_MESA3D_MESON_ARGS := -Dallow-kcmp=enabled -Dmesa-clc=system -Dprecomp-compiler=system
BUILD_EMULATOR_OPENGL := true
BOARD_KERNEL_CMDLINE := $(if $(filter x86_64,$(TARGET_ARCH) $(TARGET_KERNEL_ARCH)),, vmalloc=192M)
TARGET_KERNEL_DIFFCONFIG := device/generic/common/selinux_diffconfig
# Atom specific
ifeq ($(IS_INTEL_ATOM),true)
# from celadon tablet
BOARD_KERNEL_CMDLINE += \
intel_pstate=passive
BOARD_KERNEL_CMDLINE += \
no_timer_check \
noxsaves \
reboot_panic=p,w \
i915.hpd_sense_invert=0x7 \
intel_iommu=off
ifeq ($(TARGET_BUILD_VARIANT),user)
BOARD_KERNEL_CMDLINE += console=tty0
endif
ifneq ($(TARGET_BUILD_VARIANT),user)
BOARD_KERNEL_CMDLINE += console=ttyUSB0,115200n8
endif
# Fix screen off when s2idle is entered
BOARD_KERNEL_CMDLINE += vga=current drm.atomic=1 i915.nuclear_pageflip=1 drm.vblankoffdelay=1 i915.fastboot=1
# Fix timeout suspend from preventing wake events
BOARD_KERNEL_CMDLINE += intel_idle.max_cstate=2 cstate=1 tsc=reliable force_tsc_stable=1 clocksource_failover=tsc
endif
ifeq ($(BOARD_IS_GO_BUILD), true)
# SVELTE
MALLOC_SVELTE := true
endif
KERNEL_DIR ?= kernel/x86/common
# Surface specific
ifeq ($(BOARD_IS_SURFACE_BUILD),true)
KERNEL_DIR := kernel/x86/surface
BOARD_KERNEL_CMDLINE += nvme_core.default_ps_max_latency_us=0 pcie_aspm=off
endif
TARGET_KERNEL_SOURCE := $(KERNEL_DIR)
COMPATIBILITY_ENHANCEMENT_PACKAGE := true
PRC_COMPATIBILITY_PACKAGE := true
ZIP_OPTIMIZATION_NO_INTEGRITY := true
DEVICE_MANIFEST_FILE := device/generic/common/manifest.xml
#BOARD_SEPOLICY_DIRS += device/generic/common/sepolicy/nonplat \
# system/bt/vendor_libs/linux/sepolicy \
# device/generic/common/sepolicy/celadon/graphics/mesa \
# vendor/intel/proprietary/houdini/sepolicy \
# vendor/google/proprietary/widevine-prebuilt/sepolicy
#
BOARD_SEPOLICY_DIRS += $(LOCAL_COMMON_TREE)/sepolicy/celadon/thermal \
$(LOCAL_COMMON_TREE)/sepolicy/celadon/thermal/thermal-daemon
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(LOCAL_COMMON_TREE)/sepolicy/plat_private
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(LOCAL_COMMON_TREE)/sepolicy/public
BOARD_VENDOR_SEPOLICY_DIRS += device/generic/common/sepolicy/vendor
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
BOARD_SYSTEMIMAGE_PARTITION_SIZE := $(shell echo | awk '{printf "%.0f", 5.2 * 1000 * 1000 * 1000}')
BOARD_RECOVERYIMAGE_PARTITION_SIZE := $(shell echo | awk '{printf "%.0f", 98 * 1000 * 1000}')
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
BOARD_USES_OEMIMAGE := true
BUILD_BROKEN_USES_NETWORK := true
USE_XML_AUDIO_POLICY_CONF := 1
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE := true
BUILD_BROKEN_USES_BUILD_HOST_STATIC_LIBRARY := true
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
BUILD_BROKEN_PLUGIN_VALIDATION := soong-llvm22
#ifeq ($(ANDROID_USE_INTEL_HOUDINI),true)
#include vendor/intel/proprietary/houdini/board/native_bridge_arm_on_x86.mk
#endif
STAGEFRIGHT_AVCENC_CFLAGS := -DANDROID_GCE
# Properties
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
TARGET_VENDOR_PROP += $(LOCAL_COMMON_TREE)/properties/vendor.prop
TARGET_SYSTEM_PROP += $(LOCAL_COMMON_TREE)/properties/system.prop
# Recovery
TARGET_RECOVERY_FSTAB := $(LOCAL_COMMON_TREE)/recovery.fstab
TARGET_RECOVERY_UI_LIB := librecovery_ui_x86
# Init
TARGET_INIT_VENDOR_LIB ?= //$(LOCAL_COMMON_TREE):init_x86
TARGET_RECOVERY_DEVICE_MODULES ?= init_x86
# Include GloDroid components
include device/generic/common/glodroid/BoardConfig_glodroid.mk