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_dma_buf.ko \ 31 virtio_mmio.ko \ 32 virtio-rng.ko \ 33 34RAMDISK_SYSTEM_KERNEL_MODULES += \ 35 virtio_blk.ko \ 36 virtio_console.ko \ 37 virtio_pci.ko \ 38 virtio_pci_legacy_dev.ko \ 39 virtio_pci_modern_dev.ko \ 40 vmw_vsock_virtio_transport.ko \ 41 42BOARD_SYSTEM_KERNEL_MODULES := $(wildcard $(KERNEL_ARTIFACTS_PATH)/*.ko) 43 44BOARD_VENDOR_RAMDISK_KERNEL_MODULES := \ 45 $(wildcard $(patsubst %,$(VIRTUAL_DEVICE_KERNEL_MODULES_PATH)/%,$(RAMDISK_KERNEL_MODULES))) \ 46 $(wildcard $(patsubst %,$(KERNEL_ARTIFACTS_PATH)/%,$(RAMDISK_SYSTEM_KERNEL_MODULES))) 47 48BOARD_VENDOR_KERNEL_MODULES := \ 49 $(filter-out $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),\ 50 $(wildcard $(VIRTUAL_DEVICE_KERNEL_MODULES_PATH)/*.ko)) 51 52BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := \ 53 device/generic/goldfish/board/kernel/kernel_modules.blocklist 54 55BOARD_DO_NOT_STRIP_VENDOR_RAMDISK_MODULES := true 56 57EMULATOR_KERNEL_FILE := $(KERNEL_ARTIFACTS_PATH)/kernel-$(TARGET_KERNEL_USE)-gz 58 59# BOARD_KERNEL_CMDLINE is not supported (b/361341981), use the file below 60PRODUCT_COPY_FILES += \ 61 device/generic/goldfish/board/kernel/arm64_16k_cmdline.txt:kernel_cmdline.txt 62