blob: 3fd56872fafe90001f5458871e1cd597e5770c4b [file] [log] [blame]
Amit Pundir4e375822019-04-18 16:46:10 +05301#
Peter Collingbournee8b96e32022-02-02 11:38:11 -08002# Copyright (C) 2022 The Android Open-Source Project
Amit Pundir4e375822019-04-18 16:46:10 +05303#
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
Peter Collingbournee8b96e32022-02-02 11:38:11 -080017TARGET_KERNEL_DIR ?= device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
John Stultzfa0fa162020-02-06 23:14:28 +000018
Peter Collingbournee8b96e32022-02-02 11:38:11 -080019TARGET_USES_GKI ?= true
Amit Pundir4e375822019-04-18 16:46:10 +053020
Peter Collingbournee8b96e32022-02-02 11:38:11 -080021ifeq ($(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
Amit Pundir4e375822019-04-18 16:46:10 +053027
John Stultze4b2cbd2021-07-02 21:23:59 +000028PRODUCT_SHIPPING_API_LEVEL := 31
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053029
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
Peter Collingbournee8b96e32022-02-02 11:38:11 -080034include device/linaro/dragonboard/vendor-package-ver.mk
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053035ifneq (,$(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)).)
Amit Pundire23d6722022-07-05 18:31:03 +053041 $(warning Please download and extract the new binaries by running the following script:)
42 $(warning ./device/linaro/dragonboard/fetch-vendor-package.sh )
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053043 # Would be good to error out here, but that causes other issues
44 endif
45else
46 $(warning Missing Linaro Vendor Package!)
Amit Pundire23d6722022-07-05 18:31:03 +053047 $(warning Please download and extract the vendor binaries by running the following script:)
48 $(warning ./device/linaro/dragonboard/fetch-vendor-package.sh )
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053049 # Would be good to error out here, but that causes other issues
50endif
51
Amit Pundirb192c972021-11-18 14:22:47 +053052PRODUCT_SOONG_NAMESPACES += \
53 device/linaro/dragonboard \
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053054 vendor/linaro/linux-firmware/$(EXPECTED_LINARO_VENDOR_VERSION) \
55 vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION) \
56 vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)
57
Peter Collingbournee8b96e32022-02-02 11:38:11 -080058# Dynamic partitions
59PRODUCT_BUILD_SUPER_PARTITION := true
60PRODUCT_USE_DYNAMIC_PARTITIONS := true
61PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
62
63# Enable Virtual A/B
64AB_OTA_UPDATER := true
65AB_OTA_PARTITIONS += \
66 product \
67 system \
68 system_ext \
69 vendor
70
71PRODUCT_COPY_FILES += \
72 $(TARGET_KERNEL_DIR)/Image.gz:kernel \
73 device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \
74 device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) \
75 device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).rc \
76 device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).usb.rc \
77 device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/$(TARGET_HARDWARE).kl