1# 2# Copyright (C) 2023 The Android Open Source Project 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 17# we do NOT support OTA - suppress the build warning 18PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false 19 20# Use 16K page size kernel 21TARGET_KERNEL_USE := 6.6 22TARGET_KERNEL_ARCH := arm64 23KERNEL_ARTIFACTS_PATH := kernel/prebuilts/$(TARGET_KERNEL_USE)/$(TARGET_KERNEL_ARCH)/16k 24VIRTUAL_DEVICE_KERNEL_MODULES_PATH := \ 25 kernel/prebuilts/common-modules/virtual-device/$(TARGET_KERNEL_USE)/$(subst _,-,$(TARGET_KERNEL_ARCH))/16k 26 27# The list of modules to reach the second stage. For performance reasons we 28# don't want to put all modules into the ramdisk. 29RAMDISK_KERNEL_MODULES := \ 30 virtio_blk.ko \ 31 virtio_console.ko \ 32 virtio_dma_buf.ko \ 33 virtio_mmio.ko \ 34 virtio_pci.ko \ 35 virtio_pci_legacy_dev.ko \ 36 virtio_pci_modern_dev.ko \ 37 virtio-rng.ko \ 38 vmw_vsock_virtio_transport.ko \ 39 40BOARD_SYSTEM_KERNEL_MODULES := $(wildcard $(KERNEL_ARTIFACTS_PATH)/*.ko) 41 42BOARD_VENDOR_RAMDISK_KERNEL_MODULES := \ 43 $(patsubst %,$(VIRTUAL_DEVICE_KERNEL_MODULES_PATH)/%,$(RAMDISK_KERNEL_MODULES)) 44 45BOARD_VENDOR_KERNEL_MODULES := \ 46 $(filter-out $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),\ 47 $(wildcard $(VIRTUAL_DEVICE_KERNEL_MODULES_PATH)/*.ko)) 48 49BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := \ 50 device/generic/goldfish/board/kernel/kernel_modules.blocklist 51 52EMULATOR_KERNEL_FILE := $(KERNEL_ARTIFACTS_PATH)/kernel-$(TARGET_KERNEL_USE)-gz 53