From owner-freebsd-current@FreeBSD.ORG Fri Apr 25 14:57:13 2014 Return-Path: Delivered-To: freebsd-current@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 A0272442 for ; Fri, 25 Apr 2014 14:57:13 +0000 (UTC) Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E3CE1D3D for ; Fri, 25 Apr 2014 14:57:12 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id a108so4022942qge.4 for ; Fri, 25 Apr 2014 07:57:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=qAHL6XN9S4Kc2AM5cDS+8y7jaoT65Km0zjfch/HU8Qo=; b=J6323B9tRKtBEVpVfxklBSpyrZlhY/z+kUHLrXZgO9gB0MMD9ON98EKazDWwp7hB1F P3VyrLjz8UIaDkwJ35JjzGCFZ7l/YvLVt8AkEyjPN/2Fzt/nyj6w21is4mOmRbM5tAN2 JV5AfpgjOSJnslkswDPQ3DyYYYyIYJ+4Yla4tK5l4nmzLAi3qUJqVFo+mZ0XQKNzyPA7 mIzuoq0pb8lzL65seu4flmRujrmaoUMDJaJWa9z4C/lBHqMe9O8eJ7Pip/vwmY3fOk4s izC7hKlN0V3b5e3bsxiTGHH1DUYW+xVlFWRs4Gxk33nZBDwraXqF8v67G6DJ+P1UvaOp ffBg== X-Gm-Message-State: ALoCoQlkuz4DCT5iMcY+0LiFegR9H2L/yh+2YIvvQD8POTAiF3/z50zXPS904K9QUYmo8CvBYKw6 X-Received: by 10.140.109.70 with SMTP id k64mr3286576qgf.92.1398437826506; Fri, 25 Apr 2014 07:57:06 -0700 (PDT) Received: from [192.168.108.129] (173-14-186-155-NewEngland.hfc.comcastbusiness.net. [173.14.186.155]) by mx.google.com with ESMTPSA id r15sm836003qgr.15.2014.04.25.07.57.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 07:57:05 -0700 (PDT) Message-ID: <535A77BB.1070600@arcserv.com> Date: Fri, 25 Apr 2014 10:56:59 -0400 From: Ron Brown User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Stand-alone DTB build fails Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 25 Apr 2014 15:42:53 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 14:57:13 -0000 The FreeBSD Wiki at https://wiki.freebsd.org/FlattenedDeviceTree refers to building a dtb in the following manner: -- On platforms capable of running loader(8) the default scenario is to use a stand-alone DTB file, which is handled by the loader and handed over to kernel at boot time. In this approach, a DTB should be created at kernel build time: If FDT_DTS_FILE is specified in the kernel config file, the DTB is compiled automatically as part of the buildkernel stage. The user does not have to perform any explicit steps. If the default DTS file is not specified in the kernel config file, the DTB needs to be created separately by the user with the builddtb target: $ make builddtb FDT_DTS_FILE=mpc8572ds.dts -- However, this fails with: ERROR: Specified DTS File (zedboard.dts) does not exist! This is because /usr/src/Makefile.inc1 uses the MACHINE environment variable to find FDT_DTS_FILE: Starting at line 1836: if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${MACHINE}/${FDT_DTS_FILE} ]; ... echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ exist!"; \ MACHINE refers to the currently running system, however most of the ARM development is cross-compiled and the zedboard .dts resides in the dts/arm directory while MACHINE points if to the dts/amd64 directory. Should Makefile.inc1 instead refer to TARGET or something similar? if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${TARGET}/${FDT_DTS_FILE} ]; ... - Ron