From owner-svn-src-head@freebsd.org Sat Jun 17 23:34:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAE48C31E0A; Sat, 17 Jun 2017 23:34:54 +0000 (UTC) (envelope-from manu@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 mx1.freebsd.org (Postfix) with ESMTPS id B556A7BC7E; Sat, 17 Jun 2017 23:34:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5HNYrOG019634; Sat, 17 Jun 2017 23:34:53 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5HNYrNE019631; Sat, 17 Jun 2017 23:34:53 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201706172334.v5HNYrNE019631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 17 Jun 2017 23:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320064 - in head: share/man/man5 sys/conf sys/tools/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jun 2017 23:34:55 -0000 Author: manu Date: Sat Jun 17 23:34:53 2017 New Revision: 320064 URL: https://svnweb.freebsd.org/changeset/base/320064 Log: make.conf: Add the possibility to use another DTC Add a make.conf DTC variable that control which DTC (Device Tree Compiler) to use. Reviewed by: bdrewery, imp Differential Revision: https://reviews.freebsd.org/D9577 Modified: head/share/man/man5/make.conf.5 head/sys/conf/dtb.mk head/sys/tools/fdt/make_dtb.sh Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Sat Jun 17 22:52:23 2017 (r320063) +++ head/share/man/man5/make.conf.5 Sat Jun 17 23:34:53 2017 (r320064) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2016 +.Dd February 23, 2017 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -176,6 +176,11 @@ value, use .Dq Li += instead of .Dq Li = . +.It Va DTC +.Pq Vt str +Select the compiler for DTS (Device Tree Syntax) file. +.Va DTC +is initially set to the value of dtc .It Va INSTALL .Pq Vt str the default install command. Modified: head/sys/conf/dtb.mk ============================================================================== --- head/sys/conf/dtb.mk Sat Jun 17 22:52:23 2017 (r320063) +++ head/sys/conf/dtb.mk Sat Jun 17 23:34:53 2017 (r320064) @@ -4,6 +4,8 @@ # # +++ variables +++ # +# DTC The Device Tree Compiler to use +# # DTS List of the dts files to build and install. # # DTBDIR Base path for dtb modules [/boot/dtb] @@ -31,6 +33,8 @@ # do this after bsd.own.mk. .include "kern.opts.mk" +DTC?= dtc + # Search for kernel source tree in standard places. .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) @@ -50,6 +54,7 @@ DTB=${DTS:R:S/$/.dtb/} all: ${DTB} .if defined(DTS) +.export DTC .for _dts in ${DTS} ${_dts:R:S/$/.dtb/}: ${_dts} ${OP_META} @echo Generating ${.TARGET} from ${_dts} Modified: head/sys/tools/fdt/make_dtb.sh ============================================================================== --- head/sys/tools/fdt/make_dtb.sh Sat Jun 17 22:52:23 2017 (r320063) +++ head/sys/tools/fdt/make_dtb.sh Sat Jun 17 23:34:53 2017 (r320064) @@ -16,9 +16,11 @@ if [ -z "${MACHINE}" ]; then MACHINE=$(uname -m) fi +: ${DTC:=dtc} + for d in ${dts}; do dtb=${dtb_path}/`basename $d .dts`.dtb echo "converting $d -> $dtb" cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null | - dtc -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} + ${DTC} -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} done