ANDROID: kleaf: get_gki_modules_list add i386 option

Adds "i386" as an option to get the list of 32-bit x86
modules in get_gki_modules_list().

virtual_device_i686 Cuttlefish target is a consumer.
Option is named i386 to match the `arch` attributes
in kernel_build rule.

Bug: 293529933
Test: TH
Change-Id: Ic5278aa687999a2bb2d98b97b204b99d1fcd809a
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
(cherry picked from commit 2a9967e15f99010ec06ac089b42a2ac20f2a57cb)
This commit is contained in:
Ramji Jiyani 2023-08-31 00:23:28 +00:00
parent 264e2973a4
commit 638804ea1c

View File

@ -85,6 +85,11 @@ _RISCV64_GKI_MODULES_LIST = [
# keep sorted
]
_X86_GKI_MODULES_LIST = [
# keep sorted
"drivers/ptp/ptp_kvm.ko",
]
_X86_64_GKI_MODULES_LIST = [
# keep sorted
]
@ -94,7 +99,7 @@ def get_gki_modules_list(arch = None):
""" Provides the list of GKI modules.
Args:
arch: One of [arm, arm64, x86_64, riscv64].
arch: One of [arm, arm64, i386, x86_64, riscv64].
Returns:
The list of GKI modules for the given |arch|.
@ -104,12 +109,14 @@ def get_gki_modules_list(arch = None):
gki_modules_list += _ARM_GKI_MODULES_LIST
elif arch == "arm64":
gki_modules_list += _ARM64_GKI_MODULES_LIST
elif arch == "i386":
gki_modules_list += _X86_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 [arm, arm64, x86_64, riscv64]".format(
fail("{}: arch {} not supported. Use one of [arm, arm64, i386, x86_64, riscv64]".format(
str(native.package_relative_label(":x")).removesuffix(":x"),
arch,
))