aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRam Muthiah <rammuthiah@google.com>2024-02-22 11:35:05 +0000
committerRam Muthiah <rammuthiah@google.com>2024-02-22 11:37:23 +0000
commit557799fdc5a96d40d470f915ef06c44c5a6619ca (patch)
tree1d56a68d6cd1b67b79464f2a9812c5f4482131a9
parent93232aa398fea6f1b7d4f03877872955c5b12ff1 (diff)
downloadcuttlefish-557799fdc5a96d40d470f915ef06c44c5a6619ca.tar.gz
Revert^3 "Revert "Revert "Revert "Move kernel module options from bootconfig to modules.options""""
This reverts commit 93232aa398fea6f1b7d4f03877872955c5b12ff1. Reason for revert: RC fixed with https://android-review.googlesource.com/2962479 Bug: 309328283 Change-Id: I436089329dbdae1d5a476e93970c707bb021332b
-rw-r--r--shared/BoardConfig.mk12
-rw-r--r--shared/config/first_stage_modules.options4
-rw-r--r--shared/minidroid/BoardConfig.mk4
3 files changed, 16 insertions, 4 deletions
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index d0206ec41..15d4d72e1 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -86,9 +86,15 @@ __TARGET_NO_BOOTLOADER := $(TARGET_NO_BOOTLOADER)
include build/make/target/board/BoardConfigMainlineCommon.mk
TARGET_NO_BOOTLOADER := $(__TARGET_NO_BOOTLOADER)
+# For now modules are only blocked in second stage init.
+# If a module ever needs to blocked in first stage init - add a new blocklist to
+# BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := \
device/google/cuttlefish/shared/modules.blocklist
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES_OPTIONS_FILE := \
+ device/google/cuttlefish/shared/config/first_stage_modules.options
+
ifndef TARGET_BOOTLOADER_BOARD_NAME
TARGET_BOOTLOADER_BOARD_NAME := cutf
endif
@@ -339,9 +345,9 @@ endif
BOARD_BOOTCONFIG += androidboot.hardware=cutf_cvm
-# TODO(b/182417593): Move all of these module options to modules.options
-# TODO(b/176860479): Remove once goldfish and cuttlefish share a wifi implementation
-BOARD_BOOTCONFIG += kernel.mac80211_hwsim.radios=0
+# TODO(b/182417593): vsock transport is a module on some kernels and builtin
+# on others. To maintain the buffer size setting across these two configs,
+# the setting will remain in the bootconfig AND also the modules.options file.
# Reduce slab size usage from virtio vsock to reduce slab fragmentation
BOARD_BOOTCONFIG += \
kernel.vmw_vsock_virtio_transport_common.virtio_transport_max_vsock_pkt_buf_size=16384
diff --git a/shared/config/first_stage_modules.options b/shared/config/first_stage_modules.options
new file mode 100644
index 000000000..eeb5e0831
--- /dev/null
+++ b/shared/config/first_stage_modules.options
@@ -0,0 +1,4 @@
+# Reduce slab size usage from virtio vsock to reduce slab fragmentation
+options vmw_vsock_virtio_transport_common virtio_transport_max_vsock_pkt_buf_size=16384
+# TODO(b/176860479): Remove once goldfish and cuttlefish share a wifi implementation
+options mac80211_hwsim radios=0
diff --git a/shared/minidroid/BoardConfig.mk b/shared/minidroid/BoardConfig.mk
index f89ddd3fa..3aff9a020 100644
--- a/shared/minidroid/BoardConfig.mk
+++ b/shared/minidroid/BoardConfig.mk
@@ -52,6 +52,9 @@ TARGET_NO_RECOVERY := true
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := \
device/google/cuttlefish/shared/modules.blocklist
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES_OPTIONS_FILE := \
+ device/google/cuttlefish/shared/config/first_stage_modules.options
+
TARGET_BOOTLOADER_BOARD_NAME := cutf
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
@@ -122,7 +125,6 @@ BOARD_KERNEL_CMDLINE += init=/init
BOARD_BOOTCONFIG += androidboot.hardware=$(LOCAL_ANDROIDBOOT_HARDWARE)
BOARD_BOOTCONFIG += \
androidboot.init_rc=$(LOCAL_ANDROIDBOOT_INIT_RC)
-BOARD_BOOTCONFIG += kernel.mac80211_hwsim.radios=0
BOARD_BOOTCONFIG += \
kernel.vmw_vsock_virtio_transport_common.virtio_transport_max_vsock_pkt_buf_size=16384
BOARD_BOOTCONFIG += \