svn commit: r346307 - in head: share/man/man4 sys/conf
Kyle Evans
kevans at FreeBSD.org
Wed Apr 17 03:29:18 UTC 2019
Author: kevans
Date: Wed Apr 17 03:29:16 2019
New Revision: 346307
URL: https://svnweb.freebsd.org/changeset/base/346307
Log:
fdt: further consolidate DTB building and revise manpage
FDT_DTS_FILE was built separately with a rule in sys/conf/files and
recreated the rules we used in dtb.mk. Now that we have other infrastructure
to build a DTB along with the kernel, fold FDT_DTS_FILE into that since it
doesn't have any special requirements.
fdt(4) never got revised to mention the DTS/DTSO make options, so do that
now.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19736
Modified:
head/share/man/man4/fdt.4
head/sys/conf/files
head/sys/conf/kern.post.mk
Modified: head/share/man/man4/fdt.4
==============================================================================
--- head/share/man/man4/fdt.4 Tue Apr 16 23:08:54 2019 (r346306)
+++ head/share/man/man4/fdt.4 Wed Apr 17 03:29:16 2019 (r346307)
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 12, 2010
+.Dd March 28, 2019
.Dt FDT 4
.Os
.Sh NAME
@@ -139,6 +139,21 @@ support at the
.Fx
kernel level.
.Bl -tag -width Ar
+.It Va makeoptions DTS+=<board name>.dts
+Specifies device tree source (DTS) files for a given kernel.
+The indicated DTS files will be converted (compiled) into a binary form
+along with building the kernel itself.
+Any DTS file names not written as an absolute path must be specified relative
+to the default location of DTS sources i.e.,
+.Pa sys/dts .
+.It Va makeoptions DTSO+=<overlay name>.dtso
+Specifies device tree source overlay (DTSO) files for a given kernel.
+Overlay files will be built with the kernel as with the makeoption
+.Va DTS
+described above.
+Overlay files specified as relative paths will be relative to the default
+location of DTS overlays for the platform being built i.e.,
+.Pa sys/dts/arm/overlays .
.It Va options FDT
The primary option for enabling
.Nm
@@ -153,10 +168,9 @@ drivers, as well as helper routines and libraries.
.It Va makeoptions FDT_DTS_FILE=<board name>.dts
Specifies a preferred (default) device tree source (DTS) file for a given
kernel.
-The indicated DTS file will be converted (compiled) into a binary form
-along with building the kernel itself.
-The DTS file name is relative to the default location of DTS sources i.e.
-.Pa sys/dts .
+It will be built along with the kernel as if it were supplied via the makeoption
+.Va DTS
+described above.
This makeoption is not mandatory unless FDT_DTB_STATIC is also defined (see
below).
.It Va options FDT_DTB_STATIC
Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files Tue Apr 16 23:08:54 2019 (r346306)
+++ head/sys/conf/files Wed Apr 17 03:29:16 2019 (r346307)
@@ -19,17 +19,9 @@ bhnd_nvram_map_data.h optional bhnd \
compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \
no-obj no-implicit-rule before-depend \
clean "bhnd_nvram_map_data.h"
-#
-# The 'fdt_dtb_file' target covers an actual DTB file name, which is derived
-# from the specified source (DTS) file: <platform>.dts -> <platform>.dtb
-#
-fdt_dtb_file optional fdt fdt_dtb_static \
- compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}'" \
- no-obj no-implicit-rule before-depend \
- clean "${FDT_DTS_FILE:R}.dtb"
fdt_static_dtb.h optional fdt fdt_dtb_static \
compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \
- dependency "fdt_dtb_file" \
+ dependency "${FDT_DTS_FILE:T:R}.dtb" \
no-obj no-implicit-rule before-depend \
clean "fdt_static_dtb.h"
feeder_eq_gen.h optional sound \
@@ -1723,7 +1715,7 @@ dev/fdt/fdt_pinctrl.c optional fdt fdt_pinctrl
dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl
dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand | fdt mx25l | fdt n25q | fdt at45d
dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \
- dependency "fdt_dtb_file"
+ dependency "${FDT_DTS_FILE:T:R}.dtb"
dev/fdt/simplebus.c optional fdt
dev/fdt/simple_mfd.c optional fdt
dev/fe/if_fe.c optional fe
Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk Tue Apr 16 23:08:54 2019 (r346306)
+++ head/sys/conf/kern.post.mk Wed Apr 17 03:29:16 2019 (r346307)
@@ -8,6 +8,9 @@
# should be defined in the kern.pre.mk so that port makefiles can
# override or augment them.
+.if !empty(FDT_DTS_FILE)
+DTS+= ${FDT_DTS_FILE}
+.endif
.if defined(DTS) || defined(DTSO)
.include "dtb.build.mk"
More information about the svn-src-head
mailing list