• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright 2020 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
17# Enable sparse on all filesystem images
18TARGET_USERIMAGES_SPARSE_EROFS_DISABLED ?= false
19TARGET_USERIMAGES_SPARSE_EXT_DISABLED ?= false
20TARGET_USERIMAGES_SPARSE_F2FS_DISABLED ?= false
21
22#
23# arm64 target for Trout
24#
25ifndef TARGET_BOOTLOADER_BOARD_NAME
26TARGET_BOOTLOADER_BOARD_NAME := trout
27endif
28
29BOARD_BOOT_HEADER_VERSION := 3
30
31# Kernel - prefer version 5.10 by default for trout
32TARGET_KERNEL_USE ?= 5.10
33
34TROUT_KERNEL_DIR ?= $(wildcard device/google/trout-kernel/$(TARGET_KERNEL_USE)-arm64)
35
36# The trout kernel is provided as source to AOSP,
37# and thus we cannot rely on it existing outside of Google-internal builds. Make sure not to try
38# and include a missing kernel image.
39ifndef TARGET_KERNEL_PATH
40# wildcard is for existence checking,
41# so TROUT_KERNEL_IMAGE is suppose to be a list that contains at most one path.
42# The foreach below is only for extracting the path from the list.
43TROUT_KERNEL_IMAGE := $(wildcard $(TROUT_KERNEL_DIR)/Image)
44$(foreach kernel_img, $(TROUT_KERNEL_IMAGE), $(eval TARGET_KERNEL_PATH := $(kernel_img)))
45endif
46
47TARGET_BOARD_PLATFORM := vsoc_arm64
48TARGET_ARCH := arm64
49TARGET_ARCH_VARIANT := armv8-a
50TARGET_CPU_ABI := arm64-v8a
51TARGET_CPU_VARIANT := cortex-a53
52
53-include device/google/trout/shared/BoardConfig.mk
54
55TROUT_KO_DIR ?= $(TROUT_KERNEL_DIR)
56ifneq ($(TROUT_KO_DIR),)
57BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(wildcard $(TROUT_KO_DIR)/*.ko)
58endif
59
60AUDIOSERVER_MULTILIB := first
61
62HOST_CROSS_OS := linux_bionic
63HOST_CROSS_ARCH := arm64
64HOST_CROSS_2ND_ARCH :=
65
66# Android Bluetooth stack configuration
67LOCAL_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR ?= device/google/trout/product_files/bluetooth
68BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)
69
70# Turn off AVB so that trout can boot
71BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2
72BOARD_KERNEL_CMDLINE += androidboot.verifiedbootstate=orange
73
74# Set SELinux to permissive mode for trout
75BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
76BOARD_KERNEL_CMDLINE += enforcing=0
77
78# Declare trout as a Cuttlefish HW
79BOARD_KERNEL_CMDLINE += androidboot.hardware=cutf_cvm
80BOARD_KERNEL_CMDLINE += androidboot.serialno=CUTTLEFISHCVD01
81BOARD_KERNEL_CMDLINE += androidboot.cf_devcfg=1
82
83# Set GPU properties
84BOARD_KERNEL_CMDLINE += androidboot.cpuvulkan.version=0
85BOARD_KERNEL_CMDLINE += androidboot.hardware.gralloc=minigbm
86BOARD_KERNEL_CMDLINE += androidboot.hardware.hwcomposer=ranchu
87BOARD_KERNEL_CMDLINE += androidboot.hardware.egl=mesa
88BOARD_KERNEL_CMDLINE += androidboot.hardware.hwcomposer.mode=client
89BOARD_KERNEL_CMDLINE += androidboot.hardware.hwcomposer.display_finder_mode=drm
90BOARD_KERNEL_CMDLINE += androidboot.lcd_density=160
91
92# Add WiFi configuration for VirtWifi network
93BOARD_KERNEL_CMDLINE += androidboot.wifi_mac_prefix=5554
94
95# Add default fstab settings
96BOARD_KERNEL_CMDLINE += androidboot.fstab_name=fstab androidboot.fstab_suffix=trout
97