From 439b3bb0907d1bf1245546da23d3bc42dc867a84 Mon Sep 17 00:00:00 2001 From: Akshay Tigga Date: Wed, 10 May 2023 11:45:09 -0700 Subject: [PATCH] Set correct path for tegra-dtstree in ACK builds Bug 3974840 Change-Id: I1d5b96e07396071e1d267ae4f5d767aab32b675d Signed-off-by: Bruce Xu (cherry picked from commit de06f79e350dbe169aaecdcac1a562838cd8ca92) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910052 Reviewed-by: svcacv Reviewed-by: Ankita Garg Reviewed-by: Laxman Dewangan Tested-by: Ankita Garg GVS: Gerrit_Virtual_Submit --- generic-dts/Makefile | 8 ++++++++ legacy-dts/Makefile | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/generic-dts/Makefile b/generic-dts/Makefile index cf27688..6729b08 100644 --- a/generic-dts/Makefile +++ b/generic-dts/Makefile @@ -15,6 +15,13 @@ DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS) DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 +ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),) +ifneq ($(TOP),) +SOURCE_TOP := $(TOP) +else +$(error TOP is not defined) +endif +else ifneq ($(TEGRA_TOP),) SOURCE_TOP := $(TEGRA_TOP) else ifneq ($(TOP),) @@ -22,6 +29,7 @@ SOURCE_TOP := $(TOP) else $(error TEGRA_TOP or TOP is not defined) endif +endif tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia diff --git a/legacy-dts/Makefile b/legacy-dts/Makefile index 36e3c09..3ecef8a 100644 --- a/legacy-dts/Makefile +++ b/legacy-dts/Makefile @@ -19,6 +19,13 @@ DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS) DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 +ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),) +ifneq ($(TOP),) +SOURCE_TOP := $(TOP) +else +$(error TOP is not defined) +endif +else ifneq ($(TEGRA_TOP),) SOURCE_TOP := $(TEGRA_TOP) else ifneq ($(TOP),) @@ -26,6 +33,7 @@ SOURCE_TOP := $(TOP) else $(error TEGRA_TOP or TOP is not defined) endif +endif tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia # Get relative path for tegra-dtstree from this makefile