-
Notifications
You must be signed in to change notification settings - Fork 0
/
kernel.mk
38 lines (31 loc) · 1.41 KB
/
kernel.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# Copyright (C) 2024 StatiX
#
# SPDX-License-Identifier: Apache-2.0
#
TARGET_KERNEL_PATH := device/lge/sm8150-kernel
# Configurations
TARGET_NO_KERNEL_OVERRIDE := true
TARGET_NO_KERNEL := false
# DTB image
BOARD_PREBUILT_DTBIMAGE_DIR := $(TARGET_KERNEL_PATH)/dtb
# Kernel modules
KERNEL_MODULES := $(wildcard $(TARGET_KERNEL_PATH)/modules/*.ko)
# Kernel headers
PRODUCT_VENDOR_KERNEL_HEADERS += device/lge/sm8150-kernel/kernel-headers
# Image (dtbo)
ifneq ($(filter alphalm alphaplus,$(shell echo $(TARGET_PRODUCT) | sed 's/^statix_//')),)
BOARD_PREBUILT_DTBOIMAGE := $(TARGET_KERNEL_PATH)/dtbo/alpha/dtbo.img
else ifneq ($(filter flashlm flashlmdd,$(shell echo $(TARGET_PRODUCT) | sed 's/^statix_//')),)
BOARD_PREBUILT_DTBOIMAGE := $(TARGET_KERNEL_PATH)/dtbo/flash/dtbo.img
else ifneq ($(filter betalm,$(shell echo $(TARGET_PRODUCT) | sed 's/^statix_//')),)
BOARD_PREBUILT_DTBOIMAGE := $(TARGET_KERNEL_PATH)/dtbo/beta/dtbo.img
endif
# Kernel image
ifneq ($(filter alphalm alphaplus,$(shell echo $(TARGET_PRODUCT) | sed 's/^statix_//')),)
PRODUCT_COPY_FILES += $(TARGET_KERNEL_PATH)/kernel/alpha/Image:kernel
else ifneq ($(filter flashlm flashlmdd,$(shell echo $(TARGET_PRODUCT) | sed 's/^statix_//')),)
PRODUCT_COPY_FILES += $(TARGET_KERNEL_PATH)/kernel/flash/Image:kernel
else ifneq ($(filter betalm,$(shell echo $(TARGET_PRODUCT) | sed 's/^statix_//')),)
PRODUCT_COPY_FILES += $(TARGET_KERNEL_PATH)/kernel/beta/Image:kernel
endif