mirror of
git://nv-tegra.nvidia.com/linux/kernel-devicetree.git
synced 2025-12-24 10:11:31 +03:00
Compare commits
10 Commits
IGX_OS-1.1
...
rel-38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d488feae65 | ||
|
|
cd1c454299 | ||
|
|
a34574ecc9 | ||
|
|
5fc4366307 | ||
|
|
823381077e | ||
|
|
cae046f8ff | ||
|
|
439b3bb090 | ||
|
|
7c2b56d612 | ||
|
|
8d83cca278 | ||
|
|
fb61f96359 |
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/**/*",
|
||||
]),
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
objtree = $(srctree)
|
||||
objtree ?= $(srctree)
|
||||
|
||||
# Redefine the fixdep command
|
||||
cmd_and_fixdep = \
|
||||
@@ -13,12 +13,19 @@ include $(oottree)/scripts/Makefile.lib
|
||||
|
||||
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
|
||||
|
||||
ifneq ($(findstring oot,$(NV_BUILD_KERNEL_OPTIONS)),)
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=515 -DTEGRA_HOST1X_DT_VERSION=2
|
||||
else
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2
|
||||
endif
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
|
||||
|
||||
ifdef CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||
ifdef CONFIG_TEGRA_KLEAF_BUILD
|
||||
SOURCE_TOP := $(ROOT_DIR)
|
||||
else # !CONFIG_TEGRA_KLEAF_BUILD
|
||||
ifneq ($(TOP),)
|
||||
SOURCE_TOP := $(TOP)
|
||||
else
|
||||
$(error TOP is not defined)
|
||||
endif
|
||||
endif # end of CONFIG_TEGRA_KLEAF_BUILD
|
||||
else # !CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||
ifneq ($(TEGRA_TOP),)
|
||||
SOURCE_TOP := $(TEGRA_TOP)
|
||||
else ifneq ($(TOP),)
|
||||
@@ -26,8 +33,13 @@ SOURCE_TOP := $(TOP)
|
||||
else
|
||||
$(error TEGRA_TOP or TOP is not defined)
|
||||
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
|
||||
endif
|
||||
|
||||
# Get relative path for tegra-dtstree from this makefile
|
||||
null :=
|
||||
@@ -37,17 +49,26 @@ obj-path-from-top := $(subst $(SOURCE_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))
|
||||
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
|
||||
endif
|
||||
|
||||
DTC_INCLUDE :=
|
||||
# SOC independent common include
|
||||
DTC_INCLUDE += $(tegra-dtstree)/soc/tegra/generic-dts/include
|
||||
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public
|
||||
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public/include/kernel
|
||||
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public/include/nvidia-oot
|
||||
DTC_INCLUDE += $(tegra-dtstree)/tegra/nv-public/include/platforms
|
||||
|
||||
# SOC T23X specific common include
|
||||
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/tegra/include/kernel
|
||||
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/tegra/include/nvidia-oot
|
||||
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/t23x/include
|
||||
DTC_INCLUDE += $(tegra-dtstree)/soc/generic-dts/t23x/dts
|
||||
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/kernel
|
||||
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/nvidia-oot
|
||||
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public/include/platforms
|
||||
DTC_INCLUDE += $(tegra-dtstree)/t23x/nv-public
|
||||
DTC_INCLUDE += $(tegra-dtstree)/t264/nv-public/include/kernel-t264
|
||||
DTC_INCLUDE += $(tegra-dtstree)/t264/nv-public
|
||||
|
||||
dtb-y :=
|
||||
dtbo-y :=
|
||||
@@ -55,7 +76,9 @@ dtbo-y :=
|
||||
DTB_LIST := $(dtb-y)
|
||||
DTBO_LIST := $(dtbo-y)
|
||||
dtb-y :=
|
||||
kdts := $(shell find $(tegra-dtstree)/platform -name generic-dts)
|
||||
fdts := $(tegra-dtstree)/t23x
|
||||
fdts += $(tegra-dtstree)/t264
|
||||
kdts := $(fdts)
|
||||
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
|
||||
dts_mfiles = $(call dts_makefile, $(kdts), Makefile)
|
||||
|
||||
@@ -121,8 +144,14 @@ dtbs: $(DTB_OBJS) $(DTBO_OBJS) FORCE
|
||||
if [ ! -z "$(DTBS_DTBOS)" ] ; then \
|
||||
cp -u $(DTB_OBJS) $(DTBO_OBJS) $(obj)/dtbs/ ; \
|
||||
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 \
|
||||
rm -rf $(obj)/hardware/ ; \
|
||||
fi
|
||||
endif
|
||||
|
||||
clean-files := *.dtb *.dtbo *.tmp
|
||||
|
||||
@@ -11,10 +11,21 @@ cmd_and_fixdep = \
|
||||
|
||||
include $(oottree)/scripts/Makefile.lib
|
||||
|
||||
# Stop warning of the graph port and graph endpoint
|
||||
DTC_FLAGS += -Wno-graph_port
|
||||
DTC_FLAGS += -Wno-graph_endpoint
|
||||
|
||||
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
|
||||
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=515 -DTEGRA_HOST1X_DT_VERSION=2
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -DTEGRA_HOST1X_DT_VERSION=2 -DOS_LINUX
|
||||
|
||||
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 +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
|
||||
|
||||
Reference in New Issue
Block a user