dc4636133f
This allows for directives such as makeoptions DTS+=/out/of/tree/myboard.dts # in tree! Same rules applied as if this were in a dtb/ module makeoptions DTS+=otherboard.dts to be specified in config(5) and have these built/installed alongside th kernel. The assumption that overlays live in an overlays/ directory is only made for in-tree DTSO, but we still make the assumption that out-of-tree arm64 DTS will be in vendored directories (for now). This lowers the cost to hacking on an overlay or dts by being able to quickly throw it in a custom config, especially if it doesn't fit one of the current dtb/modules quite appropriately or it's not intended for commit there. The build/install targets were split out of dtb.mk to centralize the build logic and leave out the all/realinstall/CLEANFILES additions... it was believed that we didn't want to pollute the kernel build with these. The build rules were converted to suffix rules at the suggestion of Ian to clean things up a little bit in a world where we can have mixed in-tree/out-of-tree DTS/DTSO specified. Reviewed by: ian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19351
46 lines
1.1 KiB
Makefile
46 lines
1.1 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# The include file <dtb.mk> handles building and installing dtb files.
|
|
#
|
|
# +++ variables +++
|
|
#
|
|
# DTC The Device Tree Compiler to use
|
|
#
|
|
# DTS List of the dts files to build and install.
|
|
#
|
|
# DTSO List of the dts overlay files to build and install.
|
|
#
|
|
# DTBDIR Base path for dtb modules [/boot/dtb]
|
|
#
|
|
# DTBOWN .dtb file owner. [${BINOWN}]
|
|
#
|
|
# DTBGRP .dtb file group. [${BINGRP}]
|
|
#
|
|
# DTBMODE Module file mode. [${BINMODE}]
|
|
#
|
|
# DESTDIR The tree where the module gets installed. [not set]
|
|
#
|
|
# +++ targets +++
|
|
#
|
|
# install:
|
|
# install the kernel module; if the Makefile
|
|
# does not itself define the target install, the targets
|
|
# beforeinstall and afterinstall may also be used to cause
|
|
# actions immediately before and after the install target
|
|
# is executed.
|
|
#
|
|
|
|
.include "dtb.build.mk"
|
|
|
|
.if !target(install) && !target(realinstall)
|
|
all: ${DTB} ${DTBO}
|
|
realinstall: _dtbinstall
|
|
.ORDER: beforeinstall _dtbinstall
|
|
|
|
CLEANFILES+=${DTB} ${DTBO}
|
|
.endif # !target(install) && !target(realinstall)
|
|
|
|
.include <bsd.dep.mk>
|
|
.include <bsd.obj.mk>
|
|
.include <bsd.links.mk>
|