From 264e2973a4bfc73bb23ec1d60d742dd24d1a2ae6 Mon Sep 17 00:00:00 2001 From: Ramji Jiyani Date: Wed, 30 Aug 2023 06:53:07 +0000 Subject: [PATCH] ANDROID: arm as an option for get_gki_modules_list If driver config depends on ARM64, driver is not available for the ARM targets as module. Introduce arm as an option for get_gki_modules_list() to separate ARM64 dependent modules. virtual_device_arm Cuttlefish target is the current consumer of this; and it fails when there is ARM64 dependent module is introduced like OEM hypervisors. Bug: 293529933 Test: TH Change-Id: I462e8968faa48d58721d884688af62ff603c9a3d Signed-off-by: Ramji Jiyani (cherry picked from commit b0e30c021b79d9cb9a67b12a94d1fe2f61126f14) --- modules.bzl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules.bzl b/modules.bzl index dc86e7522fa4..025abfebedf2 100644 --- a/modules.bzl +++ b/modules.bzl @@ -72,6 +72,10 @@ _COMMON_GKI_MODULES_LIST = [ # Deprecated - Use `get_gki_modules_list` function instead. COMMON_GKI_MODULES_LIST = _COMMON_GKI_MODULES_LIST +_ARM_GKI_MODULES_LIST = [ + # keep sorted +] + _ARM64_GKI_MODULES_LIST = [ # keep sorted "arch/arm64/geniezone/gzvm.ko", @@ -90,20 +94,22 @@ def get_gki_modules_list(arch = None): """ Provides the list of GKI modules. Args: - arch: One of [arm64, x86_64, riscv64]. + arch: One of [arm, arm64, x86_64, riscv64]. Returns: The list of GKI modules for the given |arch|. """ gki_modules_list = [] + _COMMON_GKI_MODULES_LIST - if arch == "arm64": + if arch == "arm": + gki_modules_list += _ARM_GKI_MODULES_LIST + elif arch == "arm64": gki_modules_list += _ARM64_GKI_MODULES_LIST elif arch == "x86_64": gki_modules_list += _X86_64_GKI_MODULES_LIST elif arch == "riscv64": gki_modules_list += _RISCV64_GKI_MODULES_LIST else: - fail("{}: arch {} not supported. Use one of [arm64, x86_64, riscv64]".format( + fail("{}: arch {} not supported. Use one of [arm, arm64, x86_64, riscv64]".format( str(native.package_relative_label(":x")).removesuffix(":x"), arch, ))