gpu: nvgpu: consolidate the makefile config setup

Since the safety build config options for qnx build are to be adhered
by posix userspace build as well, let us create shared configs file.
Add these config options to unit tests makefile as we would need to
control the tests based on these options and tests also access the
common nvgpu functions.

JIRA NVGPU-3062

Change-Id: I292eca9ac3160eed93485afddf7c30e993e0461c
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2116401
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kamble
2019-05-10 14:11:26 +05:30
committed by mobile promotions
parent 84393def8b
commit 94a8f3ce28
4 changed files with 49 additions and 17 deletions

View File

@@ -56,7 +56,6 @@ NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl
NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += gcov
endif
NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__
_NV_TOOLCHAIN_CFLAGS += -rdynamic
NV_UNIT_SH=unit.sh
@@ -109,6 +108,7 @@ NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl
endif
NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__
NVGPU_REDUCED := 1
NV_COMPONENT_CFLAGS += \
-DCONFIG_TEGRA_19x_GPU \
@@ -128,6 +128,8 @@ NV_COMPONENT_CFLAGS += \
-DCONFIG_TEGRA_NVLINK \
-DNVGPU_UNITTEST_FAULT_INJECTION_ENABLEMENT
-include ../drivers/gpu/nvgpu/Makefile.shared.configs
NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit/
systemimage:: $(NV_COMPONENT_SYSTEMIMAGE_DIR)
$(NV_COMPONENT_SYSTEMIMAGE_DIR) : $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)

View File

@@ -53,6 +53,8 @@ else
NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__
endif
NVGPU_REDUCED := 1
NV_COMPONENT_CFLAGS += \
-DCONFIG_TEGRA_19x_GPU \
-DCONFIG_TEGRA_GK20A_NVHOST \
@@ -70,6 +72,8 @@ NV_COMPONENT_CFLAGS += \
-DCONFIG_SUPPORT_PMU_PSTATE \
-DCONFIG_TEGRA_NVLINK
-include $(NV_SOURCE)/kernel/nvgpu/drivers/gpu/nvgpu/Makefile.shared.configs
NV_COMPONENT_NEEDED_INTERFACE_DIRS := \
$(NV_SOURCE)/kernel/nvgpu/userspace