mirror of
git://nv-tegra.nvidia.com/linux/kernel-devicetree.git
synced 2025-12-22 17:26:42 +03:00
kleaf: Adjust dts file path to align with kleaf
There is path difference between kleaf build environment and the existing environment, Use the condition CONFIG_TEGRA_KLEAF_BUILD to adjust the relative path. Bug 4344670 Change-Id: I4fe35944467cd3ed76e111c9c3588bcb9032511f Reviewed-on: https://git-master.nvidia.com/r/c/linux/kernel-devicetree/+/3171629 Reviewed-by: svcacv <svcacv@nvidia.com> Tested-by: Jian-Min Liu <jianminl@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cf5f0c7264
commit
fa7e112eba
22
BUILD.bazel
Normal file
22
BUILD.bazel
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
|
package(
|
||||||
|
default_visibility = [
|
||||||
|
"//visibility:public",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "devicetree.scripts",
|
||||||
|
srcs = glob([
|
||||||
|
"scripts/**/*",
|
||||||
|
]),
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "generic-dts.srcs",
|
||||||
|
srcs = glob([
|
||||||
|
"generic-dts/**/*",
|
||||||
|
]),
|
||||||
|
)
|
||||||
@@ -15,13 +15,17 @@ DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
|
|||||||
|
|
||||||
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
|
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
|
||||||
|
|
||||||
ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
|
ifdef CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||||
|
ifdef CONFIG_TEGRA_KLEAF_BUILD
|
||||||
|
SOURCE_TOP := $(ROOT_DIR)
|
||||||
|
else # !CONFIG_TEGRA_KLEAF_BUILD
|
||||||
ifneq ($(TOP),)
|
ifneq ($(TOP),)
|
||||||
SOURCE_TOP := $(TOP)
|
SOURCE_TOP := $(TOP)
|
||||||
else
|
else
|
||||||
$(error TOP is not defined)
|
$(error TOP is not defined)
|
||||||
endif
|
endif
|
||||||
else
|
endif # end of CONFIG_TEGRA_KLEAF_BUILD
|
||||||
|
else # !CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||||
ifneq ($(TEGRA_TOP),)
|
ifneq ($(TEGRA_TOP),)
|
||||||
SOURCE_TOP := $(TEGRA_TOP)
|
SOURCE_TOP := $(TEGRA_TOP)
|
||||||
else ifneq ($(TOP),)
|
else ifneq ($(TOP),)
|
||||||
@@ -29,9 +33,13 @@ SOURCE_TOP := $(TOP)
|
|||||||
else
|
else
|
||||||
$(error TEGRA_TOP or TOP is not defined)
|
$(error TEGRA_TOP or TOP is not defined)
|
||||||
endif
|
endif
|
||||||
endif
|
endif # end of CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||||
|
|
||||||
|
ifdef CONFIG_TEGRA_KLEAF_BUILD
|
||||||
|
tegra-dtstree := $(SOURCE_TOP)/external/nvidia_dts/hardware/nvidia
|
||||||
|
else
|
||||||
tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia
|
tegra-dtstree := $(SOURCE_TOP)/hardware/nvidia
|
||||||
|
endif
|
||||||
|
|
||||||
# Get relative path for tegra-dtstree from this makefile
|
# Get relative path for tegra-dtstree from this makefile
|
||||||
null :=
|
null :=
|
||||||
@@ -41,7 +49,11 @@ obj-path-from-top := $(subst $(SOURCE_TOP),,$(obj-path))
|
|||||||
rel-top-path := $(subst /, $(space)/,$(obj-path-from-top))
|
rel-top-path := $(subst /, $(space)/,$(obj-path-from-top))
|
||||||
rel-top-path := $(patsubst /%,../,$(rel-top-path))
|
rel-top-path := $(patsubst /%,../,$(rel-top-path))
|
||||||
rel-top-path := $(subst $(space),,$(rel-top-path))
|
rel-top-path := $(subst $(space),,$(rel-top-path))
|
||||||
|
ifdef CONFIG_TEGRA_KLEAF_BUILD
|
||||||
|
tegra-rel-dtstree := $(rel-top-path)/external/nvidia_dts/hardware/nvidia
|
||||||
|
else
|
||||||
tegra-rel-dtstree := $(rel-top-path)/hardware/nvidia
|
tegra-rel-dtstree := $(rel-top-path)/hardware/nvidia
|
||||||
|
endif
|
||||||
|
|
||||||
DTC_INCLUDE :=
|
DTC_INCLUDE :=
|
||||||
# SOC independent common include
|
# SOC independent common include
|
||||||
@@ -145,8 +157,14 @@ dtbs: $(DTB_OBJS) $(DTBO_OBJS) FORCE
|
|||||||
if [ ! -z "$(DTBS_DTBOS)" ] ; then \
|
if [ ! -z "$(DTBS_DTBOS)" ] ; then \
|
||||||
cp -u $(DTB_OBJS) $(DTBO_OBJS) $(obj)/dtbs/ ; \
|
cp -u $(DTB_OBJS) $(DTBO_OBJS) $(obj)/dtbs/ ; \
|
||||||
fi
|
fi
|
||||||
|
ifdef CONFIG_TEGRA_KLEAF_BUILD
|
||||||
|
if [ -d $(obj)/external/nvidia_dts/hardware/ ] ; then \
|
||||||
|
rm -rf $(obj)/external/nvidia_dts/hardware/ ; \
|
||||||
|
fi
|
||||||
|
else
|
||||||
if [ -d $(obj)/hardware/ ] ; then \
|
if [ -d $(obj)/hardware/ ] ; then \
|
||||||
rm -rf $(obj)/hardware/ ; \
|
rm -rf $(obj)/hardware/ ; \
|
||||||
fi
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
clean-files := *.dtb *.dtbo *.tmp
|
clean-files := *.dtb *.dtbo *.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user