• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2022 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_KERNEL_DIR ?= device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
18
19TARGET_USES_GKI ?= true
20
21ifeq ($(TARGET_USES_GKI), true)
22  TARGET_MODS := $(wildcard $(TARGET_KERNEL_DIR)/*.ko)
23  ifneq ($(TARGET_MODS),)
24    BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(TARGET_MODS)
25  endif
26endif
27
28PRODUCT_SHIPPING_API_LEVEL := 31
29
30# Check vendor package version
31# If you need to make changes to the vendor partition,
32# please modify the source git project here:
33#   https://staging-git.codelinaro.org/linaro/linaro-aosp/aosp-linaro-vendor-package
34include device/linaro/dragonboard/vendor-package-ver.mk
35ifneq (,$(wildcard $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk))
36  # Unfortunately inherit-product doesn't export build variables from the
37  # called make file to the caller, so we have to include it directly here.
38  include $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk
39  ifneq ($(TARGET_LINARO_VENDOR_VERSION), $(EXPECTED_LINARO_VENDOR_VERSION))
40    $(warning TARGET_LINARO_VENDOR_VERSION ($(TARGET_LINARO_VENDOR_VERSION)) does not match exiting the build ($(EXPECTED_LINARO_VENDOR_VERSION)).)
41    $(warning Please download new binaries here:)
42    $(warning    $(VND_PKG_URL) )
43    $(warning And extract in the ANDROID_TOP_DIR)
44    # Would be good to error out here, but that causes other issues
45  endif
46else
47  $(warning Missing Linaro Vendor Package!)
48  $(warning Please download new binaries here:)
49  $(warning    $(VND_PKG_URL) )
50  $(warning And extract in the ANDROID_TOP_DIR)
51  # Would be good to error out here, but that causes other issues
52endif
53
54PRODUCT_SOONG_NAMESPACES += \
55    device/linaro/dragonboard \
56    vendor/linaro/linux-firmware/$(EXPECTED_LINARO_VENDOR_VERSION) \
57    vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION) \
58    vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)
59
60# Dynamic partitions
61PRODUCT_BUILD_SUPER_PARTITION := true
62PRODUCT_USE_DYNAMIC_PARTITIONS := true
63PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
64
65# Enable Virtual A/B
66AB_OTA_UPDATER := true
67AB_OTA_PARTITIONS += \
68    product \
69    system \
70    system_ext \
71    vendor
72
73PRODUCT_COPY_FILES += \
74    $(TARGET_KERNEL_DIR)/Image.gz:kernel \
75    device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \
76    device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) \
77    device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).rc \
78    device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).usb.rc \
79    device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/$(TARGET_HARDWARE).kl
80