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 |
Amit Pundir | dc57023 | 2024-01-11 13:07:10 +0530 | [diff] [blame] | 21 | BOARD_DO_NOT_STRIP_GENERIC_RAMDISK_MODULES := true |
| 22 | ifeq ($(TARGET_SDCARD_BOOT), true) |
| 23 | # UFS module filename varies from ufs_qcom.ko to ufs-qcom.ko across different kernel versions |
| 24 | BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(TARGET_KERNEL_DIR)/ufs*qcom.ko) |
| 25 | BOARD_GENERIC_RAMDISK_KERNEL_MODULES := $(filter-out $(BOARD_VENDOR_KERNEL_MODULES),$(TARGET_MODS)) |
| 26 | else |
| 27 | BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(TARGET_MODS) |
| 28 | endif |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 29 | |
Yongqin Liu | 183f6a7 | 2024-01-30 21:44:11 +0800 | [diff] [blame] | 30 | PRODUCT_SHIPPING_API_LEVEL := 33 |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 31 | |
| 32 | # Check vendor package version |
| 33 | # If you need to make changes to the vendor partition, |
| 34 | # please modify the source git project here: |
| 35 | # https://staging-git.codelinaro.org/linaro/linaro-aosp/aosp-linaro-vendor-package |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 36 | include device/linaro/dragonboard/vendor-package-ver.mk |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 37 | ifneq (,$(wildcard $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk)) |
| 38 | # Unfortunately inherit-product doesn't export build variables from the |
| 39 | # called make file to the caller, so we have to include it directly here. |
| 40 | include $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk |
| 41 | ifneq ($(TARGET_LINARO_VENDOR_VERSION), $(EXPECTED_LINARO_VENDOR_VERSION)) |
| 42 | $(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] | 43 | $(warning Please download and extract the new binaries by running the following script:) |
| 44 | $(warning ./device/linaro/dragonboard/fetch-vendor-package.sh ) |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 45 | # Would be good to error out here, but that causes other issues |
| 46 | endif |
| 47 | else |
| 48 | $(warning Missing Linaro Vendor Package!) |
Amit Pundir | e23d672 | 2022-07-05 18:31:03 +0530 | [diff] [blame] | 49 | $(warning Please download and extract the vendor binaries by running the following script:) |
| 50 | $(warning ./device/linaro/dragonboard/fetch-vendor-package.sh ) |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 51 | # Would be good to error out here, but that causes other issues |
| 52 | endif |
| 53 | |
Amit Pundir | b192c97 | 2021-11-18 14:22:47 +0530 | [diff] [blame] | 54 | PRODUCT_SOONG_NAMESPACES += \ |
| 55 | device/linaro/dragonboard \ |
Amit Pundir | 701031f | 2024-03-18 14:42:18 +0530 | [diff] [blame^] | 56 | vendor/linaro/shared/$(EXPECTED_LINARO_VENDOR_VERSION)/linux-firmware |
Amit Pundir | fbd3fbb | 2021-11-18 14:59:17 +0530 | [diff] [blame] | 57 | |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 58 | # Dynamic partitions |
| 59 | PRODUCT_BUILD_SUPER_PARTITION := true |
| 60 | PRODUCT_USE_DYNAMIC_PARTITIONS := true |
| 61 | PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true |
| 62 | |
| 63 | # Enable Virtual A/B |
| 64 | AB_OTA_UPDATER := true |
| 65 | AB_OTA_PARTITIONS += \ |
| 66 | product \ |
| 67 | system \ |
| 68 | system_ext \ |
| 69 | vendor |
| 70 | |
Amit Pundir | dc57023 | 2024-01-11 13:07:10 +0530 | [diff] [blame] | 71 | ifeq ($(TARGET_SDCARD_BOOT), true) |
| 72 | ifneq ($(filter 5.4 5.10 5.15, $(TARGET_KERNEL_USE)),) |
| 73 | PRODUCT_COPY_FILES += \ |
| 74 | device/linaro/dragonboard/shared/utils/sdcard-boot/fstab.sdhci:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \ |
| 75 | device/linaro/dragonboard/shared/utils/sdcard-boot/fstab.sdhci:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) |
| 76 | else |
| 77 | PRODUCT_COPY_FILES += \ |
| 78 | device/linaro/dragonboard/shared/utils/sdcard-boot/fstab.mmc:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \ |
| 79 | device/linaro/dragonboard/shared/utils/sdcard-boot/fstab.mmc:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) |
| 80 | endif |
| 81 | else |
| 82 | PRODUCT_COPY_FILES += \ |
| 83 | device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \ |
| 84 | device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) |
| 85 | endif |
| 86 | |
Amit Pundir | ab98c6c | 2024-02-08 23:18:26 +0530 | [diff] [blame] | 87 | PRODUCT_VENDOR_PROPERTIES += \ |
| 88 | persist.sys.zram_enabled=1 |
| 89 | |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 90 | PRODUCT_COPY_FILES += \ |
| 91 | $(TARGET_KERNEL_DIR)/Image.gz:kernel \ |
Peter Collingbourne | e8b96e3 | 2022-02-02 11:38:11 -0800 | [diff] [blame] | 92 | device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).rc \ |
| 93 | 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] | 94 | frameworks/base/data/keyboards/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/$(TARGET_HARDWARE).kl |
Yongqin Liu | 44956f2 | 2024-02-26 12:19:41 +0800 | [diff] [blame] | 95 | |
| 96 | # Workaround for the drop of OMX service |
| 97 | PRODUCT_VENDOR_PROPERTIES += \ |
| 98 | debug.stagefright.c2inputsurface=-1 |