Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 1 | # |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 2 | # Copyright (C) 2022 The Android Open-Source Project |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 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 | |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 17 | TARGET_KERNEL_DIR ?= device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE) |
Amit Pundir | 07776a3 | 2023-08-16 23:29:35 +0530 | [diff] [blame] | 18 | TARGET_MODS := $(wildcard $(TARGET_KERNEL_DIR)/*.ko) |
John Stultz | fa0fa16 | 2020-02-06 23:14:28 +0000 | [diff] [blame] | 19 | |
Amit Pundir | 07776a3 | 2023-08-16 23:29:35 +0530 | [diff] [blame] | 20 | BOARD_DO_NOT_STRIP_VENDOR_RAMDISK_MODULES := true |
| 21 | BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(TARGET_MODS) |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 22 | |
John Stultz | e4b2cbd | 2021-07-02 21:23:59 +0000 | [diff] [blame] | 23 | PRODUCT_SHIPPING_API_LEVEL := 31 |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 24 | |
| 25 | # Check vendor package version |
| 26 | # If you need to make changes to the vendor partition, |
| 27 | # please modify the source git project here: |
| 28 | # https://staging-git.codelinaro.org/linaro/linaro-aosp/aosp-linaro-vendor-package |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 29 | include device/linaro/dragonboard/vendor-package-ver.mk |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 30 | ifneq (,$(wildcard $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk)) |
| 31 | # Unfortunately inherit-product doesn't export build variables from the |
| 32 | # called make file to the caller, so we have to include it directly here. |
| 33 | include $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk |
| 34 | ifneq ($(TARGET_LINARO_VENDOR_VERSION), $(EXPECTED_LINARO_VENDOR_VERSION)) |
| 35 | $(warning TARGET_LINARO_VENDOR_VERSION ($(TARGET_LINARO_VENDOR_VERSION)) does not match exiting the build ($(EXPECTED_LINARO_VENDOR_VERSION)).) |
Amit Pundir | e23d672 | 2022-07-05 18:31:03 +0530 | [diff] [blame] | 36 | $(warning Please download and extract the new binaries by running the following script:) |
| 37 | $(warning ./device/linaro/dragonboard/fetch-vendor-package.sh ) |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 38 | # Would be good to error out here, but that causes other issues |
| 39 | endif |
| 40 | else |
| 41 | $(warning Missing Linaro Vendor Package!) |
Amit Pundir | e23d672 | 2022-07-05 18:31:03 +0530 | [diff] [blame] | 42 | $(warning Please download and extract the vendor binaries by running the following script:) |
| 43 | $(warning ./device/linaro/dragonboard/fetch-vendor-package.sh ) |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 44 | # Would be good to error out here, but that causes other issues |
| 45 | endif |
| 46 | |
Amit Pundir | b192c97 | 2021-11-18 14:22:47 +0530 | [diff] [blame] | 47 | PRODUCT_SOONG_NAMESPACES += \ |
| 48 | device/linaro/dragonboard \ |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 49 | vendor/linaro/linux-firmware/$(EXPECTED_LINARO_VENDOR_VERSION) \ |
| 50 | vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION) \ |
| 51 | vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION) |
| 52 | |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 53 | # Dynamic partitions |
| 54 | PRODUCT_BUILD_SUPER_PARTITION := true |
| 55 | PRODUCT_USE_DYNAMIC_PARTITIONS := true |
| 56 | PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true |
| 57 | |
| 58 | # Enable Virtual A/B |
| 59 | AB_OTA_UPDATER := true |
| 60 | AB_OTA_PARTITIONS += \ |
| 61 | product \ |
| 62 | system \ |
| 63 | system_ext \ |
| 64 | vendor |
| 65 | |
| 66 | PRODUCT_COPY_FILES += \ |
| 67 | $(TARGET_KERNEL_DIR)/Image.gz:kernel \ |
| 68 | device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \ |
| 69 | device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) \ |
| 70 | device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).rc \ |
| 71 | device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).usb.rc \ |
Amit Pundir | 7f72e1e | 2022-10-01 11:07:59 +0530 | [diff] [blame] | 72 | frameworks/base/data/keyboards/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/$(TARGET_HARDWARE).kl |