From f032c7ae4502f417939c84a1ca27766f5a2ad69f Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Tue, 15 Nov 2022 15:32:17 -0800 Subject: [PATCH] ANDROID: kleaf: Move list of kernel modules to an extension. This is so that it can be loaded by other packages. Some device's may wish to not build mixed build, in which case they'll either need to use 'auto' in module_outs (discouraged), or load the list of GKI modules. Test: TH Bug: 258308697 Change-Id: Iff7778b9edae7101a2debd44a49bb5eb403bfb2f Signed-off-by: Yifan Hong --- BUILD.bazel | 38 ++++++-------------------------------- modules.bzl | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 modules.bzl diff --git a/BUILD.bazel b/BUILD.bazel index 9e9183b58793..e59de4867742 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -19,51 +19,25 @@ package( load("//build/kernel/kleaf:common_kernels.bzl", "define_common_kernels", "define_db845c") load("//build/kernel/kleaf:kernel.bzl", "ddk_headers") - -_common_gki_modules_list = [ - # keep sorted - "drivers/block/zram/zram.ko", - "drivers/bluetooth/btbcm.ko", - "drivers/bluetooth/btqca.ko", - "drivers/bluetooth/btsdio.ko", - "drivers/bluetooth/hci_uart.ko", - "drivers/net/can/dev/can-dev.ko", - "drivers/net/can/slcan/slcan.ko", - "drivers/net/can/vcan.ko", - "drivers/usb/class/cdc-acm.ko", - "drivers/usb/serial/ftdi_sio.ko", - "drivers/usb/serial/usbserial.ko", - "mm/zsmalloc.ko", - "net/8021q/8021q.ko", - "net/bluetooth/hidp/hidp.ko", - "net/bluetooth/rfcomm/rfcomm.ko", - "net/can/can-bcm.ko", - "net/can/can-gw.ko", - "net/can/can-raw.ko", - "net/mac80211/mac80211.ko", - "net/nfc/nfc.ko", - "net/tipc/diag.ko", - "net/tipc/tipc.ko", - "net/wireless/cfg80211.ko", -] +load(":modules.bzl", "COMMON_GKI_MODULES_LIST") define_common_kernels(target_configs = { "kernel_aarch64": { - "module_implicit_outs": _common_gki_modules_list, + "module_implicit_outs": COMMON_GKI_MODULES_LIST, }, "kernel_aarch64_16k": { - "module_implicit_outs": _common_gki_modules_list, + "module_implicit_outs": COMMON_GKI_MODULES_LIST, }, "kernel_aarch64_debug": { - "module_implicit_outs": _common_gki_modules_list, + "module_implicit_outs": COMMON_GKI_MODULES_LIST, }, "kernel_x86_64": { "kmi_symbol_list_strict_mode": False, - "module_implicit_outs": _common_gki_modules_list, + "module_implicit_outs": COMMON_GKI_MODULES_LIST, }, "kernel_x86_64_debug": { "kmi_symbol_list_strict_mode": False, - "module_implicit_outs": _common_gki_modules_list, + "module_implicit_outs": COMMON_GKI_MODULES_LIST, }, }) diff --git a/modules.bzl b/modules.bzl new file mode 100644 index 000000000000..199dbc681efc --- /dev/null +++ b/modules.bzl @@ -0,0 +1,26 @@ +COMMON_GKI_MODULES_LIST = [ + # keep sorted + "drivers/block/zram/zram.ko", + "drivers/bluetooth/btbcm.ko", + "drivers/bluetooth/btqca.ko", + "drivers/bluetooth/btsdio.ko", + "drivers/bluetooth/hci_uart.ko", + "drivers/net/can/dev/can-dev.ko", + "drivers/net/can/slcan/slcan.ko", + "drivers/net/can/vcan.ko", + "drivers/usb/class/cdc-acm.ko", + "drivers/usb/serial/ftdi_sio.ko", + "drivers/usb/serial/usbserial.ko", + "mm/zsmalloc.ko", + "net/8021q/8021q.ko", + "net/bluetooth/hidp/hidp.ko", + "net/bluetooth/rfcomm/rfcomm.ko", + "net/can/can-bcm.ko", + "net/can/can-gw.ko", + "net/can/can-raw.ko", + "net/mac80211/mac80211.ko", + "net/nfc/nfc.ko", + "net/tipc/diag.ko", + "net/tipc/tipc.ko", + "net/wireless/cfg80211.ko", +]