From owner-svn-src-all@freebsd.org Wed Apr 17 03:29:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6B3C1584E35; Wed, 17 Apr 2019 03:29:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 868308C6D7; Wed, 17 Apr 2019 03:29:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 637D8139B; Wed, 17 Apr 2019 03:29:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3H3THsH054320; Wed, 17 Apr 2019 03:29:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3H3TGZp054318; Wed, 17 Apr 2019 03:29:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904170329.x3H3TGZp054318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 17 Apr 2019 03:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346307 - in head: share/man/man4 sys/conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: share/man/man4 sys/conf X-SVN-Commit-Revision: 346307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 868308C6D7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2019 03:29:18 -0000 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+=.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+=.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=.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: .dts -> .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"