diff --git a/device-tree/platform/generic-dts/Makefile b/device-tree/platform/generic-dts/Makefile index 14084226..82cd58cc 100644 --- a/device-tree/platform/generic-dts/Makefile +++ b/device-tree/platform/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/device-tree/platform/legacy-dts/Makefile b/device-tree/platform/legacy-dts/Makefile index 5d28af9a..a4584754 100644 --- a/device-tree/platform/legacy-dts/Makefile +++ b/device-tree/platform/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