device-tree/Makefile: Tune relative path

The relative path from the device-tree/platform to $TOP
varies between local and GVS build. The folder "nvidia"
in out folder is introduced in the local build which is
not there in the GVs build.

Check the relative path of $TOP and adjust accordingly.

Bug 3787936

Change-Id: I5a34e64a8903f662153c361c2fc7e3ee432d6c14
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2775081
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2022-09-12 06:40:28 +00:00
committed by mobile promotions
parent d01fe66eb1
commit 7ebe440eb4

View File

@@ -17,8 +17,15 @@ DTC_CPP_FLAGS += -DLINUX_VERSION=504 -DTEGRA_HOST1X_DT_VERSION=1
tegra-dtstree := $(TOP)/hardware/nvidia tegra-dtstree := $(TOP)/hardware/nvidia
# From out/l4t-t186ref-debug-aarch64/nvidia/kernel-nvidia-oot/nvidia-oot/device-tree/platform # Get relative path for tegra-dtstree from this makefile
tegra-rel-dtstree := ../../../../../../../hardware/nvidia null :=
space :=$(null) $(null)
obj-path := $(obj)
obj-path-from-top := $(subst $(TOP),,$(obj-path))
rel-top-path := $(subst /, $(space)/,$(obj-path-from-top))
rel-top-path := $(patsubst /%,../,$(rel-top-path))
rel-top-path := $(subst $(space),,$(rel-top-path))
tegra-rel-dtstree := $(rel-top-path)/hardware/nvidia
DTC_INCLUDE := DTC_INCLUDE :=
# SOC independent common include # SOC independent common include