blob: cddde7686020c12191da55a2d37ed0849435fd24 [file] [log] [blame]
Amit Pundir097c2422020-02-19 20:12:40 +05301ifndef TARGET_KERNEL_USE
2
3KERNEL_MODS := $(wildcard device/linaro/dragonboard-kernel/android-5.4/*.ko)
Amit Pundir1addda62020-02-02 13:07:33 +05304
Amit Pundir8e3de692020-02-01 18:25:51 +05305# Local modules are built from following tree:
6# https://github.com/pundiramit/linux/tree/android-5.4-modules
Amit Pundir097c2422020-02-19 20:12:40 +05307LOCAL_MODS := $(wildcard device/xiaomi/beryllium/prebuilt-kernel/android-5.4/*.ko)
Amit Pundir1addda62020-02-02 13:07:33 +05308
Amit Pundir816b0482020-02-01 20:25:18 +05309# Skip copying modules broken on android-5.4
10# Use local module copy instead
Amit Pundir097c2422020-02-19 20:12:40 +053011SKIP_MODS := %/msm.ko
Amit Pundir1addda62020-02-02 13:07:33 +053012
13# BT modules go to vendor partition
Amit Pundir097c2422020-02-19 20:12:40 +053014ONLY_VENDOR := %/btqca.ko %/hci_uart.ko
15BOARD_VENDOR_KERNEL_MODULES := $(filter $(ONLY_VENDOR),$(KERNEL_MODS))
Amit Pundir1addda62020-02-02 13:07:33 +053016
Amit Pundir097c2422020-02-19 20:12:40 +053017BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(SKIP_MODS) $(ONLY_VENDOR),$(KERNEL_MODS))
Amit Pundir8e3de692020-02-01 18:25:51 +053018BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(LOCAL_MODS)
Amit Pundirc738b812019-06-19 16:13:49 +053019
Amit Pundir097c2422020-02-19 20:12:40 +053020else # ifdef TARGET_KERNEL_USE
21
22KERNEL_MODS := $(wildcard device/xiaomi/beryllium/prebuilt-kernel/android-$(TARGET_KERNEL_USE)/*.ko)
23
24# Following modules go to vendor partition
25ONLY_VENDOR := %/btqca.ko %/hci_uart.ko
26
27BOARD_VENDOR_KERNEL_MODULES := $(filter $(ONLY_VENDOR),$(KERNEL_MODS))
28BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(ONLY_VENDOR),$(KERNEL_MODS))
29
30endif
31
Amit Pundirc738b812019-06-19 16:13:49 +053032# Inherit the full_base and device configurations
33$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
34$(call inherit-product, device/xiaomi/beryllium/aosp_beryllium/device.mk)
35$(call inherit-product, device/xiaomi/beryllium/device-common.mk)
36$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
37
38# Product overrides
39PRODUCT_NAME := aosp_beryllium
40PRODUCT_DEVICE := aosp_beryllium
41PRODUCT_BRAND := AOSP