From owner-freebsd-arm@FreeBSD.ORG Sat Aug 30 22:43:42 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FDDC44E; Sat, 30 Aug 2014 22:43:42 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C47A71316; Sat, 30 Aug 2014 22:43:41 +0000 (UTC) Received: from [192.168.1.200] (p54818E06.dip0.t-ipconnect.de [84.129.142.6]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id CB5471C104674; Sun, 31 Aug 2014 00:43:37 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Problem running make_dtb.sh From: Michael Tuexen In-Reply-To: <1409438402.1150.189.camel@revolution.hippie.lan> Date: Sun, 31 Aug 2014 00:43:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <591AF701-C2AF-4D70-9BFF-46D40083963D@freebsd.org> References: <1409320716.1150.169.camel@revolution.hippie.lan> <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> <1409438402.1150.189.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) 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:43:42 -0000 On 31 Aug 2014, at 00:40, Ian Lepore wrote: > On Fri, 2014-08-29 at 20:45 +0200, Michael Tuexen wrote: >> On 29 Aug 2014, at 15:58, Ian Lepore wrote: >>=20 >>> On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: >>>> Dear all, >>>>=20 >>>> 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 >>>>=20 >>>> Stop. >>>>=20 >>>> 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? >>>>=20 >>>> Best regards >>>> Michael >>>=20 >>> 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. >>>=20 >>> -- Ian >>>=20 >>> Index: sys/tools/fdt/make_dtb.sh >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- 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 >>>=20 >>> +if [ -z "${MACHINE}" ]; then >>> + MACHINE=3D$(uname -m) >>> +fi >>> + >>> for d in ${dts}; do >>> dtb=3D${dtb_path}/`basename $d .dts`.dtb >>> echo "converting $d -> $dtb" >> That resolves the issue. Will you commit it? >=20 > Done, r270863. Thanks. Michael >=20 > -- Ian >=20 >=20 >=20