From owner-freebsd-arm@FreeBSD.ORG Sat Aug 30 22:40:04 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39373F6; Sat, 30 Aug 2014 22:40:04 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96B741281; Sat, 30 Aug 2014 22:40:04 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XNrJT-000FVL-IR; Sat, 30 Aug 2014 22:40:03 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7UMe2DK006425; Sat, 30 Aug 2014 16:40:02 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+QmrP1pR4A0IX3BGO8v0w1 X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: Problem running make_dtb.sh From: Ian Lepore To: Michael Tuexen In-Reply-To: <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> References: <1409320716.1150.169.camel@revolution.hippie.lan> <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 30 Aug 2014 16:40:02 -0600 Message-ID: <1409438402.1150.189.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2014 22:40:04 -0000 On Fri, 2014-08-29 at 20:45 +0200, Michael Tuexen wrote: > On 29 Aug 2014, at 15:58, Ian Lepore wrote: > > > On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: > >> Dear all, > >> > >> when trying to build the kernel on a Wandboard the traditional way as described in > >> https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#kernelbuild-traditional > >> a make results in > >> ... > >> sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD > >> converting wandboard-quad.dts -> /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb > >> :159:10: fatal error: 'wandboard-quad.dts' file not found > >> #include "wandboard-quad.dts" > >> ^ > >> 1 error generated. > >> Error: :1.1-2.1 syntax error > >> FATAL ERROR: Unable to parse input tree > >> *** Error code 1 > >> > >> Stop. > >> > >> The reason is that make_dtb.sh uses $MACHINE which is not set. If I set it to arm, the make completes > >> successfully. How is this fixed in the best way? > >> > >> Best regards > >> Michael > > > > IMO, the best way to fix it would be to update the handbook to say that > > the "traditional" way of building a kernel is no longer supported. > > Since that won't fly due to a small but very vocal minority, maybe the > > attached patch would be a good fix. > > > > -- Ian > > > > Index: sys/tools/fdt/make_dtb.sh > > =================================================================== > > --- sys/tools/fdt/make_dtb.sh (revision 270064) > > +++ sys/tools/fdt/make_dtb.sh (working copy) > > @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then > > exit 1 > > fi > > > > +if [ -z "${MACHINE}" ]; then > > + MACHINE=$(uname -m) > > +fi > > + > > for d in ${dts}; do > > dtb=${dtb_path}/`basename $d .dts`.dtb > > echo "converting $d -> $dtb" > That resolves the issue. Will you commit it? Done, r270863. -- Ian