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
This commit is contained in:
parent
f52ce0326c
commit
924f8189b0
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user