mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
Make the copy of Makefile.build and Makefile.lib from kernel to modify them as per OOT DTBs compilation requirements. This copy is done to avoid any change in the kernel repo. bug 3680329 Change-Id: I782c6aae67c85b7d5363177014468b3b3744bfbb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2734084 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
objtree = $(srctree)
|
|
|
|
# Redefine the fixdep command
|
|
cmd_and_fixdep = \
|
|
$(cmd); \
|
|
$(objtree)/scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\
|
|
rm -f $(depfile)
|
|
|
|
include $(oottree)/scripts/Makefile.lib
|
|
|
|
oot-dtstree = $(oottree)/arch/arm64/boot/dts/nvidia
|
|
|
|
DTB_LIST := $(dtb-y)
|
|
DTBO_LIST := $(dtbo-y)
|
|
dtb-y :=
|
|
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
|
|
dts_mfiles = $(call dts_makefile, $(oot-dtstree), Makefile)
|
|
|
|
ifneq ($(dts_mfiles),)
|
|
dts-include :=
|
|
include $(dts_mfiles)
|
|
dtb-y := $(addprefix nvidia/,$(dtb-y))
|
|
dtbo-y := $(addprefix nvidia/,$(dtbo-y))
|
|
endif
|
|
|
|
DTC_INCLUDE := $(oottree)/include
|
|
|
|
DTB_LIST += $(dtb-y)
|
|
DTBO_LIST += $(dtbo-y)
|
|
DTB_OBJS := $(addprefix $(obj)/,$(DTB_LIST))
|
|
DTBO_OBJS := $(addprefix $(obj)/,$(DTBO_LIST))
|
|
|
|
dtbs: $(DTB_OBJS) $(DTBO_OBJS) FORCE
|
|
|
|
dtbsclean:
|
|
find $(oot-dtstree) -name *.dtb | xargs rm -rf
|
|
find $(oot-dtstree) -name *.dtbo | xargs rm -rf
|
|
find $(oot-dtstree) -name *.tmp | xargs rm -rf
|