1#
2# Copyright (C) 2017 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
17TARGET_BOOTLOADER_BOARD_NAME := taimen
18DEFAULT_LOW_PERSISTENCE_MODE_BRIGHTNESS := 0x0000008c
19
20BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200,n8 earlycon=msm_serial_dm,0xc1b0000
21
22include device/google/wahoo/BoardConfig.mk
23
24BOARD_BOOTIMAGE_PARTITION_SIZE := 41943040
25BOARD_AVB_ENABLE := true
26
27# sepolicy
28BOARD_SEPOLICY_DIRS += device/google/taimen/sepolicy
29
30ifeq (,$(filter-out taimen_gcc, $(TARGET_PRODUCT)))
31# if TARGET_PRODUCT == taimen_gcc
32BOARD_VENDOR_KERNEL_MODULES += \
33    device/google/wahoo-kernel/gcc/touch_core_base.ko \
34    device/google/wahoo-kernel/gcc/ftm4.ko \
35    device/google/wahoo-kernel/gcc/sw49408.ko \
36    device/google/wahoo-kernel/gcc/lge_battery.ko \
37    device/google/wahoo-kernel/gcc/wlan.ko
38else ifeq (,$(filter-out taimen_kasan, $(TARGET_PRODUCT)))
39# if TARGET_PRODUCT == taimen_kasan
40BOARD_VENDOR_KERNEL_MODULES += \
41    device/google/wahoo-kernel/kasan/touch_core_base.ko \
42    device/google/wahoo-kernel/kasan/ftm4.ko \
43    device/google/wahoo-kernel/kasan/sw49408.ko \
44    device/google/wahoo-kernel/kasan/lge_battery.ko \
45    device/google/wahoo-kernel/kasan/wlan.ko
46else ifeq (,$(filter-out taimen_kcfi, $(TARGET_PRODUCT)))
47# if TARGET_PRODUCT == taimen_kcfi
48BOARD_VENDOR_KERNEL_MODULES += \
49    device/google/wahoo-kernel/kcfi/touch_core_base.ko \
50    device/google/wahoo-kernel/kcfi/ftm4.ko \
51    device/google/wahoo-kernel/kcfi/sw49408.ko \
52    device/google/wahoo-kernel/kcfi/lge_battery.ko \
53    device/google/wahoo-kernel/kcfi/wlan.ko
54else ifeq (,$(filter-out taimen_kernel_debug_memory, $(TARGET_PRODUCT)))
55# if TARGET == taimen_kernel_debug_memory
56BOARD_VENDOR_KERNEL_MODULES += \
57    device/google/wahoo-kernel/debug_memory/touch_core_base.ko \
58    device/google/wahoo-kernel/debug_memory/ftm4.ko \
59    device/google/wahoo-kernel/debug_memory/sw49408.ko \
60    device/google/wahoo-kernel/debug_memory/lge_battery.ko \
61    device/google/wahoo-kernel/debug_memory/wlan.ko
62else ifeq (,$(filter-out taimen_kernel_debug_locking, $(TARGET_PRODUCT)))
63# if TARGET == taimen_kernel_debug_locking
64BOARD_VENDOR_KERNEL_MODULES += \
65    device/google/wahoo-kernel/debug_locking/touch_core_base.ko \
66    device/google/wahoo-kernel/debug_locking/ftm4.ko \
67    device/google/wahoo-kernel/debug_locking/sw49408.ko \
68    device/google/wahoo-kernel/debug_locking/lge_battery.ko \
69    device/google/wahoo-kernel/debug_locking/wlan.ko
70else ifeq (,$(filter-out taimen_kernel_debug_hang, $(TARGET_PRODUCT)))
71# if TARGET == taimen_kernel_debug_hang
72BOARD_VENDOR_KERNEL_MODULES += \
73    device/google/wahoo-kernel/debug_hang/touch_core_base.ko \
74    device/google/wahoo-kernel/debug_hang/ftm4.ko \
75    device/google/wahoo-kernel/debug_hang/sw49408.ko \
76    device/google/wahoo-kernel/debug_hang/lge_battery.ko \
77    device/google/wahoo-kernel/debug_hang/wlan.ko
78else ifeq (,$(filter-out taimen_kernel_debug_api, $(TARGET_PRODUCT)))
79# if TARGET == taimen_kernel_debug_api
80BOARD_VENDOR_KERNEL_MODULES += \
81    device/google/wahoo-kernel/debug_api/touch_core_base.ko \
82    device/google/wahoo-kernel/debug_api/ftm4.ko \
83    device/google/wahoo-kernel/debug_api/sw49408.ko \
84    device/google/wahoo-kernel/debug_api/lge_battery.ko \
85    device/google/wahoo-kernel/debug_api/wlan.ko
86else
87BOARD_VENDOR_KERNEL_MODULES += \
88    device/google/wahoo-kernel/touch_core_base.ko \
89    device/google/wahoo-kernel/ftm4.ko \
90    device/google/wahoo-kernel/sw49408.ko \
91    device/google/wahoo-kernel/lge_battery.ko \
92    device/google/wahoo-kernel/wlan.ko
93endif
94
95-include vendor/google_devices/taimen/proprietary/BoardConfigVendor.mk
96
97# Testing related defines
98BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/wahoo-setup.sh
99
100BOARD_LISA_TARGET_SCRIPTS := device/google/wahoo/lisa/
101
102# Rounded corners recovery UI. 105px = 30dp * 3.5 density, where 30dp comes from
103# rounded_corner_radius in overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml.
104TARGET_RECOVERY_UI_MARGIN_HEIGHT := 105
105
106# VTS DTBO Verification. This kernel cmdline parameter should be added by the bootloader
107# for all future devices.
108BOARD_KERNEL_CMDLINE += androidboot.dtbo_idx=12
109