-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
34 lines (25 loc) · 1.02 KB
/
Android.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
#
# Copyright (C) 2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
LOCAL_PATH := $(call my-dir)
ifeq ($(USES_DEVICE_VIRT_VBOXWARE),true)
# Create prebuilt kernel repo
ifneq ($(LINEAGE_BUILD),)
ifneq ($(wildcard $(TARGET_KERNEL_SOURCE)/Makefile),)
INSTALLED_PREBUILT_KERNEL_REPO_DIR := out/kernel-vboxware/$(TARGET_PREBUILT_KERNEL_USE)
INSTALLED_PREBUILT_KERNEL_REPO_KERNEL_TARGET := $(INSTALLED_PREBUILT_KERNEL_REPO_DIR)/kernel
$(INSTALLED_PREBUILT_KERNEL_REPO_KERNEL_TARGET): $(PRODUCT_OUT)/kernel
$(call pretty,"Target prebuilt kernel repo: $@")
mkdir -p $(INSTALLED_PREBUILT_KERNEL_REPO_DIR)
rm -f $(INSTALLED_PREBUILT_KERNEL_REPO_DIR)/*.ko
if grep -q '=m' $(PRODUCT_OUT)/obj/KERNEL_OBJ/.config; then\
cp `find $(PRODUCT_OUT)/obj/KERNEL_OBJ/ -type f -name "*.ko"` $(INSTALLED_PREBUILT_KERNEL_REPO_DIR)/;\
fi
cp $(PRODUCT_OUT)/kernel $@
.PHONY: prebuilt-kernel-repo
prebuilt-kernel-repo: $(INSTALLED_PREBUILT_KERNEL_REPO_KERNEL_TARGET)
endif # $(TARGET_KERNEL_SOURCE)/Makefile
endif # LINEAGE_BUILD
endif