mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 09:12:05 +03:00
Determining whether the header file iosys-map.h is present in the kernel
is currently determine by kernel version. However, for Linux v5.15,
iosys-map.h has been backported in order to support simple-framebuffer
for early display. Therefore, we cannot rely on the kernel version to
indicate whether iosys-map is present. This is also true for 3rd party
Linux kernels that backport changes as well. Fix this by adding a
compile time flag, that will be set accordingly by the conftest script
if this header is present.
Bug 4119327
Bug 4228080
Change-Id: I9de07a4615a6c9da504b36750c48e73e200da301
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2974080
(cherry picked from commit 54ce334474)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2946966
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
50 lines
1.2 KiB
Makefile
50 lines
1.2 KiB
Makefile
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
|
|
#
|
|
# Tegra SOC HWPM
|
|
#
|
|
|
|
GCOV_PROFILE := y
|
|
|
|
ifeq ($(origin srctree.hwpm), undefined)
|
|
srctree.hwpm := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST))))/../../..
|
|
endif
|
|
|
|
CONFIG_TEGRA_SOC_HWPM := y
|
|
ccflags-y += -DCONFIG_TEGRA_SOC_HWPM
|
|
|
|
CONFIG_TEGRA_T234_HWPM := y
|
|
ccflags-y += -DCONFIG_TEGRA_T234_HWPM
|
|
|
|
NVHWPM_OBJ = m
|
|
|
|
# For OOT builds, set required config flags
|
|
ifeq ($(CONFIG_TEGRA_OOT_MODULE),m)
|
|
CONFIG_TEGRA_HWPM_OOT := y
|
|
ccflags-y += -DCONFIG_TEGRA_HWPM_OOT
|
|
|
|
CONFIG_TEGRA_FUSE_UPSTREAM := y
|
|
ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM
|
|
|
|
LINUXINCLUDE += -I$(srctree.nvconftest)
|
|
LINUXINCLUDE += -I$(srctree.hwpm)/include
|
|
LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
|
|
LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm
|
|
|
|
else
|
|
ccflags-y += -I$(srctree.nvidia)/include
|
|
ccflags-y += -I$(srctree.hwpm)/include
|
|
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
|
|
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm
|
|
|
|
endif
|
|
|
|
ifeq ($(NV_BUILD_CONFIGURATION_IS_SAFETY),1)
|
|
obj-${NVHWPM_OBJ} += tegra_hwpm_mock.o
|
|
else
|
|
# Add required objects to nvhwpm object variable
|
|
include $(srctree.hwpm)/drivers/tegra/hwpm/Makefile.sources
|
|
|
|
obj-${NVHWPM_OBJ} += nvhwpm.o
|
|
|
|
endif
|