mirror of
git://nv-tegra.nvidia.com/linux/kernel-devicetree.git
synced 2025-12-24 18:24:06 +03:00
Compare commits
10 Commits
jetson_36.
...
rel-38_eng
| 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,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 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)
|
||||
@@ -13,15 +13,19 @@ include $(oottree)/scripts/Makefile.lib
|
||||
|
||||
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
|
||||
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -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)),)
|
||||
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
|
||||
else
|
||||
endif # end of CONFIG_TEGRA_KLEAF_BUILD
|
||||
else # !CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||
ifneq ($(TEGRA_TOP),)
|
||||
SOURCE_TOP := $(TEGRA_TOP)
|
||||
else ifneq ($(TOP),)
|
||||
@@ -29,9 +33,13 @@ SOURCE_TOP := $(TOP)
|
||||
else
|
||||
$(error TEGRA_TOP or TOP is not defined)
|
||||
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
|
||||
endif
|
||||
|
||||
# Get relative path for tegra-dtstree from this makefile
|
||||
null :=
|
||||
@@ -41,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)/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)/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 :=
|
||||
@@ -60,20 +77,8 @@ DTB_LIST := $(dtb-y)
|
||||
DTBO_LIST := $(dtbo-y)
|
||||
dtb-y :=
|
||||
fdts := $(tegra-dtstree)/t23x
|
||||
|
||||
# Add internal SOCs to scan the DT makefiles
|
||||
ifneq ($(internal_soc_list),)
|
||||
fdts += $(addprefix $(tegra-dtstree)/,$(internal_soc_list))
|
||||
endif
|
||||
|
||||
# Remove the DTs from protected soc list
|
||||
ifneq ($(protected_soc_list),)
|
||||
kdts := $(foreach dt_path, $(fdts), $(if $(filter $(protected_soc_list),$(patsubst -,$(space),$(subst /, $(space),$(dt_path)))),,$(dt_path)))
|
||||
kdts := $(filter-out $(space)$(space),$(kdts))
|
||||
else
|
||||
fdts += $(tegra-dtstree)/t264
|
||||
kdts := $(fdts)
|
||||
endif
|
||||
|
||||
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
|
||||
dts_mfiles = $(call dts_makefile, $(kdts), Makefile)
|
||||
|
||||
@@ -139,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
|
||||
|
||||
@@ -17,7 +17,7 @@ DTC_FLAGS += -Wno-graph_endpoint
|
||||
|
||||
DTC_CPP_FLAGS += $(EXTRA_CPP_FLAGS)
|
||||
|
||||
DTC_CPP_FLAGS += -DLINUX_VERSION=600 -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),)
|
||||
@@ -63,16 +63,7 @@ dtbo-oot-y :=
|
||||
DTB_LIST := $(dtb-oot-y)
|
||||
DTBO_LIST := $(dtbo-oot-y)
|
||||
dtb-oot-y :=
|
||||
fdts := $(shell find $(tegra-dtstree)/platform -name kernel-dts)
|
||||
|
||||
# Remove the DTs from protected soc list
|
||||
ifneq ($(protected_soc_list),)
|
||||
kdts := $(foreach dt_path, $(fdts), $(if $(filter $(protected_soc_list),$(patsubst -,$(space),$(subst /, $(space),$(dt_path)))),,$(dt_path)))
|
||||
kdts := $(filter-out $(space)$(space),$(kdts))
|
||||
else
|
||||
kdts := $(fdts)
|
||||
endif
|
||||
|
||||
kdts := $(shell find $(tegra-dtstree)/platform -name kernel-dts)
|
||||
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
|
||||
dts_mfiles = $(call dts_makefile, $(kdts), Makefile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user