From 02d32d24bae9b0c88a91d6ae3f8abd4acc3174b4 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 4 Jul 2024 18:22:29 +0000 Subject: [PATCH] Makefile: Parse kernel name and system type get specific configurations The OOT driver requires the kernel and system type specific configuration. These configuration is set in OOT drivers itself by parsing the kernel name and system type. The configuration are done in config file which is included from makefile based on kernel name and system type. Jira HOSTX-5375 Change-Id: I12b71e4cb6330706e0e53292f6d0c3073b199173 Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168812 GVS: buildbot_gerritrpt --- Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7ed698cf..7962d75c 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,26 @@ # SPDX-License-Identifier: GPL-2.0 -# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved. ifeq ($(CONFIG_TEGRA_KLEAF_BUILD),y) include $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.kleaf endif +# Include kernel specific config +ifneq ($(kernel_name),) +kernel_config := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.config.$(kernel_name) +ifneq ($(wildcard $(kernel_config)),) +include $(kernel_config) +endif +endif + +# Include system specific config +ifneq ($(system_type),) +system_config := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.config.$(system_type) +ifneq ($(wildcard $(system_config)),) +include $(system_config) +endif +endif + LINUXINCLUDE += -I$(srctree.nvconftest) LINUXINCLUDE += -I$(srctree.nvidia-oot)/include