common: Create DLKM component for 5.10+
Change-Id: I48787246fd3a01e6e7ea7acc10e08c9bdac6287e
This commit is contained in:
parent
eea144a2c3
commit
cee87bc746
|
@ -66,6 +66,10 @@ ifneq (,$(filter display, $(TARGET_COMMON_QTI_COMPONENTS)))
|
|||
include $(QCOM_COMMON_PATH)/vendor/display/qti-display.mk
|
||||
endif
|
||||
|
||||
ifeq ($(call is-board-platform-in-list,$(5_10_FAMILY)),true)
|
||||
include $(QCOM_COMMON_PATH)/dlkm/qti-dlkm.mk
|
||||
endif
|
||||
|
||||
ifneq (,$(filter gps, $(TARGET_COMMON_QTI_COMPONENTS)))
|
||||
include $(QCOM_COMMON_PATH)/system/gps/qti-gps.mk
|
||||
include $(QCOM_COMMON_PATH)/vendor/gps/qti-gps.mk
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
#
|
||||
# Copyright (C) 2022 Paranoid Android
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
TARGET_USES_KERNEL_PLATFORM ?= true
|
||||
|
||||
KERNEL_PREBUILT_DIR ?= device/qcom/$(TARGET_BOARD_PLATFORM)-kernel
|
||||
KERNEL_PRODUCT_DIR := kernel_obj
|
||||
KERNEL_MODULES_INSTALL := dlkm
|
||||
KERNEL_MODULES_OUT ?= $(OUT_DIR)/target/product/$(AOSPA_BUILD)/$(KERNEL_MODULES_INSTALL)/lib/modules
|
||||
|
||||
ifeq ($(TARGET_USES_KERNEL_PLATFORM),true)
|
||||
|
||||
ifeq ($(wildcard $(KERNEL_PREBUILT_DIR)/),)
|
||||
$(warning $(KERNEL_PREBUILT_DIR) does not exist, have you compiled kernel?)
|
||||
endif
|
||||
|
||||
# DLKM
|
||||
define get-kernel-modules
|
||||
$(if $(wildcard $(KERNEL_PREBUILT_DIR)/$(1)/modules.load), \
|
||||
$(addprefix $(KERNEL_PREBUILT_DIR)/$(1)/,$(notdir $(file < $(KERNEL_PREBUILT_DIR)/$(1)/modules.load))), \
|
||||
$(wildcard $(KERNEL_PREBUILT_DIR)/$(1)/*.ko))
|
||||
endef
|
||||
|
||||
prepend-kernel-modules = $(eval $1 := $2 $(filter-out $2,$($1)))
|
||||
|
||||
first_stage_modules := $(call get-kernel-modules,.)
|
||||
second_stage_modules := $(call get-kernel-modules,vendor_dlkm)
|
||||
|
||||
$(call prepend-kernel-modules,BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD,$(first_stage_modules))
|
||||
$(call prepend-kernel-modules,BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD,$(first_stage_modules) $(second_stage_modules))
|
||||
$(call prepend-kernel-modules,BOARD_VENDOR_KERNEL_MODULES,$(second_stage_modules))
|
||||
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := $(wildcard $(KERNEL_PREBUILT_DIR)/vendor_dlkm/modules.blocklist)
|
||||
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(wildcard $(KERNEL_PREBUILT_DIR)/vendor_dlkm/modules.blocklist)
|
||||
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(first_stage_modules)
|
||||
BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(second_stage_modules)
|
||||
|
||||
# DTBs
|
||||
BOARD_PREBUILT_DTBOIMAGE := $(KERNEL_PREBUILT_DIR)/dtbs/dtbo.img
|
||||
BOARD_PREBUILT_DTBIMAGE_DIR := $(KERNEL_PREBUILT_DIR)/dtbs/
|
||||
|
||||
# Kernel Headers
|
||||
TARGET_BOARD_KERNEL_HEADERS := $(KERNEL_PREBUILT_DIR)/kernel-headers
|
||||
|
||||
# Kernel
|
||||
PRODUCT_COPY_FILES += $(KERNEL_PREBUILT_DIR)/Image:kernel
|
||||
PRODUCT_COPY_FILES += $(KERNEL_PREBUILT_DIR)/System.map:$(KERNEL_PRODUCT_DIR)/System.map
|
||||
|
||||
endif
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Copyright (C) 2022 Paranoid Android
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
include $(QCOM_COMMON_PATH)/dlkm/kernel-platform.mk
|
||||
|
||||
# Audio
|
||||
-include vendor/qcom/opensource/audio-kernel/audio_kernel_product_board.mk
|
||||
-include vendor/qcom/opensource/audio-kernel/audio_kernel_vendor_board.mk
|
||||
|
||||
# CVP
|
||||
-include vendor/qcom/opensource/cvp-kernel/cvp_kernel_board.mk
|
||||
-include vendor/qcom/opensource/cvp-kernel/cvp_kernel_product.mk
|
||||
|
||||
# Camera
|
||||
-include vendor/qcom/opensource/camera-kernel/board.mk
|
||||
-include vendor/qcom/opensource/camera-kernel/product.mk
|
||||
|
||||
# Dataipa
|
||||
-include vendor/qcom/opensource/dataipa/dataipa_dlkm_vendor_board.mk
|
||||
-include vendor/qcom/opensource/dataipa/dataipa_dlkm_vendor_product.mk
|
||||
|
||||
# Datarmnet
|
||||
-include vendor/qcom/opensource/datarmnet/datarmnet_dlkm_vendor_board.mk
|
||||
-include vendor/qcom/opensource/datarmnet/datarmnet_dlkm_vendor_product.mk
|
||||
-include vendor/qcom/opensource/datarmnet-ext/datarmnet_ext_dlkm_vendor_board.mk
|
||||
-include vendor/qcom/opensource/datarmnet-ext/datarmnet_ext_dlkm_vendor_product.mk
|
||||
|
||||
# Display
|
||||
-include vendor/qcom/opensource/display-drivers/display_driver_board.mk
|
||||
-include vendor/qcom/opensource/display-drivers/display_driver_product.mk
|
||||
|
||||
# EVA
|
||||
-include vendor/qcom/opensource/eva-kernel/eva_kernel_board.mk
|
||||
-include vendor/qcom/opensource/eva-kernel/eva_kernel_product.mk
|
||||
|
||||
# MMRM
|
||||
-include vendor/qcom/opensource/mmrm-driver/mmrm_kernel_board.mk
|
||||
-include vendor/qcom/opensource/mmrm-driver/mmrm_kernel_product.mk
|
||||
|
||||
# Video
|
||||
-include vendor/qcom/opensource/video-driver/video_kernel_board.mk
|
||||
-include vendor/qcom/opensource/video-driver/video_kernel_product.mk
|
Loading…
Reference in New Issue