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 <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168812
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2024-07-04 18:22:29 +00:00
committed by mobile promotions
parent 60b43d6545
commit 02d32d24ba

View File

@@ -1,10 +1,26 @@
# SPDX-License-Identifier: GPL-2.0 # 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) ifeq ($(CONFIG_TEGRA_KLEAF_BUILD),y)
include $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.kleaf include $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/Makefile.kleaf
endif 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.nvconftest)
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include LINUXINCLUDE += -I$(srctree.nvidia-oot)/include