From 1dfd260fc2b6c7be3581e3608b0cb883e9abdb42 Mon Sep 17 00:00:00 2001 From: Giuliano Procida Date: Mon, 7 Oct 2024 13:12:29 +0100 Subject: [PATCH] ANDROID: GKI: simplify ABI file matching This commit introduces the Makefile variable AARCH to abstract away the difference between Linux and GKI architecture names. Bug: 393044622 Bug: 372188974 Change-Id: I345510055ccce7f849ab86f90f3457ac57226efa Signed-off-by: Giuliano Procida --- kernel/module/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kernel/module/Makefile b/kernel/module/Makefile index 1ad496a776ed..75680b45564c 100644 --- a/kernel/module/Makefile +++ b/kernel/module/Makefile @@ -40,17 +40,15 @@ include/generated/gki_module_unprotected.h: $(ALL_KMI_SYMBOLS) \ "$(srctree)" \ $(ALL_KMI_SYMBOLS) +# AARCH is the same as ARCH, except that arm64 becomes aarch64 +AARCH := $(if $(filter arm64,$(ARCH)),aarch64,$(ARCH)) + # Generate symbol list with union of all symbol list for arm64; empty for others -$(ALL_KMI_SYMBOLS): $(if $(filter arm64,$(ARCH)),$(wildcard $(srctree)/android/abi_gki_aarch64_*),) +$(ALL_KMI_SYMBOLS): $(if $(filter arm64,$(ARCH)),$(wildcard $(srctree)/android/abi_gki_$(AARCH)_*),) $(if $(strip $^),cat $^ > $(ALL_KMI_SYMBOLS), echo "" > $(ALL_KMI_SYMBOLS)) # ABI protected exports list file specific to ARCH if exists else empty -ABI_PROTECTED_EXPORTS_FILE := -ifeq ($(ARCH),arm64) - ABI_PROTECTED_EXPORTS_FILE := $(wildcard $(srctree)/android/abi_gki_protected_exports_aarch64) -else - ABI_PROTECTED_EXPORTS_FILE := $(wildcard $(srctree)/android/abi_gki_protected_exports_$(ARCH)) -endif +ABI_PROTECTED_EXPORTS_FILE := $(wildcard $(srctree)/android/abi_gki_protected_exports_$(AARCH)) include/generated/gki_module_protected_exports.h: $(ABI_PROTECTED_EXPORTS_FILE) \ $(srctree)/scripts/gen_gki_modules_headers.sh