From owner-svn-src-all@freebsd.org Sat Apr 27 04:12:34 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 2146A1584718; Sat, 27 Apr 2019 04:12:34 +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 B78316D9EA; Sat, 27 Apr 2019 04:12:33 +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 93B501DC75; Sat, 27 Apr 2019 04:12:33 +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 x3R4CXEg062306; Sat, 27 Apr 2019 04:12:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3R4CWNX062303; Sat, 27 Apr 2019 04:12:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201904270412.x3R4CWNX062303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 27 Apr 2019 04:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346781 - in stable/12: share/man/man4 sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/conf X-SVN-Commit-Revision: 346781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B78316D9EA 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.996,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Sat, 27 Apr 2019 04:12:34 -0000 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+=.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: 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: .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 \ @@ -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}