-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoardConfig.mk
78 lines (62 loc) · 2.1 KB
/
BoardConfig.mk
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
#
# Copyright (C) 2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Boot manager
TARGET_BOOT_MANAGER := grub
# Inherit from common
include device/virt/virt-common/BoardConfigVirtCommon.mk
USES_DEVICE_VIRT_VBOXWARE := true
# Arch
TARGET_CPU_ABI := x86_64
TARGET_ARCH := x86_64
TARGET_ARCH_VARIANT := sandybridge
# Boot manager
TARGET_EFI_BOOT_SCRIPTS := $(wildcard $(DEVICE_PATH)/bootmgr/linux_efi_stub/boot/*.nsh)
TARGET_EFI_INSTALL_SCRIPTS := $(wildcard $(DEVICE_PATH)/bootmgr/linux_efi_stub/install/*.nsh)
TARGET_GRUB_BOOT_CONFIGS += $(DEVICE_PATH)/bootmgr/grub/grub-boot.cfg
TARGET_GRUB_INSTALL_CONFIGS += $(DEVICE_PATH)/bootmgr/grub/grub-install.cfg
TARGET_REFIND_BOOT_CONFIG := $(DEVICE_PATH)/bootmgr/rEFInd/refind-boot.conf
TARGET_REFIND_INSTALL_CONFIG := $(DEVICE_PATH)/bootmgr/rEFInd/refind-install.conf
# Bootconfig
TARGET_BOOTCONFIG_FILES += $(DEVICE_PATH)/configs/misc/bootconfig.txt
# Fstab
ifeq ($(AB_OTA_UPDATER),true)
$(call soong_config_set,VBOXWARE_FSTAB,PARTITION_SCHEME,ab)
else
$(call soong_config_set,VBOXWARE_FSTAB,PARTITION_SCHEME,a)
endif
# Graphics (Mesa)
BOARD_MESA3D_GALLIUM_DRIVERS += svga
# GRUB
TARGET_GRUB_ARCH := x86_64-efi
# Kernel
BOARD_KERNEL_CMDLINE += \
8250.nr_uarts=1
BOARD_KERNEL_IMAGE_NAME := bzImage
ifneq ($(wildcard $(TARGET_KERNEL_SOURCE)/Makefile),)
TARGET_KERNEL_ARCH := x86
TARGET_KERNEL_CONFIG += \
lineageos/vboxware.config
else ifneq ($(wildcard $(TARGET_PREBUILT_KERNEL_DIR)/kernel),)
BOARD_VENDOR_KERNEL_MODULES := \
$(wildcard $(TARGET_PREBUILT_KERNEL_DIR)/*.ko)
endif
# Recovery
TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab_vboxware
TARGET_RECOVERY_PIXEL_FORMAT := BGRX_8888
# SELinux
BOARD_VENDOR_SEPOLICY_DIRS += \
$(DEVICE_PATH)/sepolicy/vendor
ifeq ($(AB_OTA_UPDATER),true)
BOARD_VENDOR_SEPOLICY_DIRS += \
$(DEVICE_PATH)/sepolicy/vendor/ab
else
BOARD_VENDOR_SEPOLICY_DIRS += \
$(DEVICE_PATH)/sepolicy/vendor/a
endif
# VINTF
ODM_MANIFEST_SKUS := virtualbox vmware
ODM_MANIFEST_VIRTUALBOX_FILES := $(DEVICE_PATH)/configs/vintf/manifest_sku_virtualbox.xml
ODM_MANIFEST_VMWARE_FILES := $(DEVICE_PATH)/configs/vintf/manifest_sku_vmware.xml