diff options
author | Brian Daniels <briandaniels@google.com> | 2024-04-15 21:21:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-04-15 21:21:40 +0000 |
commit | cafde1bf87bba63e98e56a072460f75fefc43d3e (patch) | |
tree | a15108e9e03dd51afc4b415a73c104f0579ad278 | |
parent | c0a48ea43922eff7db33654ad1f483c1fd2ca5e7 (diff) | |
parent | e7a13bd030d3db7b326221125bf044c8f302ac87 (diff) | |
download | trout-cafde1bf87bba63e98e56a072460f75fefc43d3e.tar.gz |
Merge "Prerequisite changes to switch to 6.1 kernel" into main
-rw-r--r-- | product_files/fstab.trout | 2 | ||||
-rw-r--r-- | trout_arm64/BoardConfig.mk | 56 |
2 files changed, 43 insertions, 15 deletions
diff --git a/product_files/fstab.trout b/product_files/fstab.trout index 82726c8..d7c98c0 100644 --- a/product_files/fstab.trout +++ b/product_files/fstab.trout @@ -10,6 +10,8 @@ odm /odm ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect, product /product ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect,avb system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect,avb=vbmeta_system vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect,avb=vbmeta +vendor_dlkm /vendor_dlkm ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect,avb=vbmeta_dlkm +system_dlkm /system_dlkm ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect,avb=vbmeta_system_dlkm /dev/block/zram0 none swap defaults zramsize=75% /tmp /sdcard none defaults,bind recoveryonly /devices/*/block/vdb auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata diff --git a/trout_arm64/BoardConfig.mk b/trout_arm64/BoardConfig.mk index 3d20522..f99db1a 100644 --- a/trout_arm64/BoardConfig.mk +++ b/trout_arm64/BoardConfig.mk @@ -51,32 +51,55 @@ BOARD_BOOT_HEADER_VERSION := 4 # Kernel - prefer version 5.10 by default for trout TARGET_KERNEL_USE ?= 5.10 +# Select the prebuilt trout kernel if 5.10 or 5.4 is in use TROUT_KERNEL_DIR ?= $(wildcard device/google/trout-kernel/$(TARGET_KERNEL_USE)-arm64) -# The trout kernel is provided as source to AOSP, -# and thus we cannot rely on it existing outside of Google-internal builds. Make sure not to try -# and include a missing kernel image. -ifndef TARGET_KERNEL_PATH -# wildcard is for existence checking, -# so TROUT_KERNEL_IMAGE is suppose to be a list that contains at most one path. -# The foreach below is only for extracting the path from the list. -TROUT_KERNEL_IMAGE := $(wildcard $(TROUT_KERNEL_DIR)/Image) -$(foreach kernel_img, $(TROUT_KERNEL_IMAGE), $(eval TARGET_KERNEL_PATH := $(kernel_img))) -endif - TARGET_BOARD_PLATFORM := vsoc_arm64 TARGET_ARCH := arm64 TARGET_ARCH_VARIANT := armv8-a TARGET_CPU_ABI := arm64-v8a TARGET_CPU_VARIANT := cortex-a53 --include device/google/trout/shared/BoardConfig.mk +ifneq ($(TROUT_KERNEL_DIR),) +KERNEL_MODULES_PATH ?= $(TROUT_KERNEL_DIR) +TARGET_KERNEL_PATH ?= $(TROUT_KERNEL_DIR)/Image -TROUT_KO_DIR ?= $(TROUT_KERNEL_DIR) -ifneq ($(TROUT_KO_DIR),) -BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(wildcard $(TROUT_KO_DIR)/*.ko) +# For local builds of the android12-5.10 kernel, this directory doesn't exist. +# The system_dlkm partition won't have any kernel modules in it, which matches +# how this kernel was originally used. +# +# For prebuilts of the android12-5.10 kernel, the result is the same. +# +# For local builds of the android14-6.1 kernel and later, this directory should +# be created by extracting the system_dlkm_staging_archive.tar.gz file in the +# build directory of the kernel before building the android image. +# +# For prebuilts of the android14-6.1 kernel and later, TROUT_KERNEL_DIR should +# not be specified, in which case it will follow whatever the upstream +# cuttlefish device specifies. +SYSTEM_DLKM_SRC ?= $(TROUT_KERNEL_DIR)/flatten/lib/modules endif +# The list of modules strictly/only required either to reach second stage +# init, OR for recovery. Do not use this list to workaround second stage +# issues. +RAMDISK_KERNEL_MODULES ?= \ + failover.ko \ + nd_virtio.ko \ + net_failover.ko \ + virtio_blk.ko \ + virtio_console.ko \ + virtio_dma_buf.ko \ + virtio-gpu.ko \ + virtio_input.ko \ + virtio_net.ko \ + virtio_mmio.ko \ + virtio_pci.ko \ + virtio-rng.ko \ + vmw_vsock_virtio_transport.ko \ + +-include device/google/trout/shared/BoardConfig.mk + AUDIOSERVER_MULTILIB := first HOST_CROSS_OS := linux_bionic @@ -110,3 +133,6 @@ BOARD_KERNEL_CMDLINE += androidboot.wifi_mac_prefix=5554 # Add default fstab settings BOARD_KERNEL_CMDLINE += androidboot.fstab_name=fstab androidboot.fstab_suffix=trout + +# Prevent mac80211_hwsim from simulating any radios +BOARD_KERNEL_CMDLINE += mac80211_hwsim.radios=0 |