svn commit: r346781 - in stable/12: share/man/man4 sys/conf
Kyle Evans
kevans at FreeBSD.org
Sat Apr 27 04:12:34 UTC 2019
Author: kevans
Date: Sat Apr 27 04:12:32 2019
New Revision: 346781
URL: https://svnweb.freebsd.org/changeset/base/346781
Log:
MFC r346307, r346618: Further DTB building consolidation/documentation
r346307:
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.
r346618:
fdt: stop installing FDT_DTS_FILE
r346307 inadvertently started installing FDT_DTS_FILE along with the kernel.
While this isn't necessarily bad, it was not intended or discussed and it
actively breaks some current setups that don't anticipate any .dtb being
installed when it's using static fdt. This change could be reconsidered down
the line, but it needs to be done with prior discussion.
Fix it by pushing FDT_DTS_FILE build down into the raw dtb.build.mk bits.
This technically allows modules building DTS to accidentally specify an
FDT_DTS_FILE that gets built but isn't otherwise useful (since it's not
installed), but I suspect this isn't a big deal and would get caught with
any kind of testing -- and perhaps this might end up useful in some other
way, for example by some module wanting to embed fdt in some other way than
our current/normal mechanism.
Modified:
stable/12/share/man/man4/fdt.4
stable/12/sys/conf/dtb.build.mk
stable/12/sys/conf/files
stable/12/sys/conf/kern.post.mk
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/share/man/man4/fdt.4
==============================================================================
--- stable/12/share/man/man4/fdt.4 Sat Apr 27 04:00:50 2019 (r346780)
+++ stable/12/share/man/man4/fdt.4 Sat Apr 27 04:12:32 2019 (r346781)
@@ -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: stable/12/sys/conf/dtb.build.mk
==============================================================================
--- stable/12/sys/conf/dtb.build.mk Sat Apr 27 04:00:50 2019 (r346780)
+++ stable/12/sys/conf/dtb.build.mk Sat Apr 27 04:12:32 2019 (r346781)
@@ -43,7 +43,7 @@ DTBO=${DTSO:T:R:S/$/.dtbo/}
# Add dependencies on the source file so that out-of-tree things can be included
# without any .PATH additions.
-.for _dts in ${DTS}
+.for _dts in ${DTS} ${FDT_DTS_FILE}
${_dts:R:T}.dtb: ${_dts}
.endfor
Modified: stable/12/sys/conf/files
==============================================================================
--- stable/12/sys/conf/files Sat Apr 27 04:00:50 2019 (r346780)
+++ stable/12/sys/conf/files Sat Apr 27 04:12:32 2019 (r346781)
@@ -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 \
@@ -1786,7 +1778,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/fe/if_fe.c optional fe
dev/fe/if_fe_pccard.c optional fe pccard
Modified: stable/12/sys/conf/kern.post.mk
==============================================================================
--- stable/12/sys/conf/kern.post.mk Sat Apr 27 04:00:50 2019 (r346780)
+++ stable/12/sys/conf/kern.post.mk Sat Apr 27 04:12:32 2019 (r346781)
@@ -8,7 +8,7 @@
# should be defined in the kern.pre.mk so that port makefiles can
# override or augment them.
-.if defined(DTS) || defined(DTSO)
+.if defined(DTS) || defined(DTSO) || defined(FDT_DTS_FILE)
.include "dtb.build.mk"
KERNEL_EXTRA+= ${DTB} ${DTBO}
More information about the svn-src-all
mailing list