From patchwork Fri Mar 23 14:37:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 148446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 2E0D7B6EE8 for ; Sat, 24 Mar 2012 01:38:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5581F8F78E; Fri, 23 Mar 2012 14:38:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wC+HSyUdJaOt; Fri, 23 Mar 2012 14:37:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 82B6F8F732; Fri, 23 Mar 2012 14:37:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4D6208F753 for ; Fri, 23 Mar 2012 14:37:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 40FA38BED3 for ; Fri, 23 Mar 2012 14:37:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qorVkmLNvaXY for ; Fri, 23 Mar 2012 14:37:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ey0-f171.google.com (mail-ey0-f171.google.com [209.85.215.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4D85C8F777 for ; Fri, 23 Mar 2012 14:37:52 +0000 (UTC) Received: by eaal11 with SMTP id l11so1300866eaa.16 for ; Fri, 23 Mar 2012 07:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:user-agent:date:from:to:cc; bh=WNBqZyIoXiBOIMSDScoMyQEkyj+DzXaNXfdTou7AZvQ=; b=QQiG7TQE8W1h5MNnMyPiElKqTFV25tprASyf6RlzPne87CQdyoOGIcavwDhPV8DqGD cVhoczI8QiLCpIv6N7Sv0QPzk2qlhRNGnu1/asc7Gffzc0E3wPgXZSWlWM+HUo5DPG3I nOIF2nnZqTltd1mwNIEfcCNWHUWyJYXmJ1meOGtNhOT/Io8GpBQUXRiUzrumd3wMiRMY hlYswRn2hxhUz4W5LfVcGV6A579Qh0GZjYZlNLyCvat49aET7YKW0Is9LWX7uCTiriEz JKKAvNSmQSuQe7I1p4wgOs3d7ZVtBCxBeClDWnrmGWNnfDdQq90sJaKQaoY/BXqxBGiX eT4Q== Received: by 10.213.96.5 with SMTP id f5mr933987ebn.83.1332513470211; Fri, 23 Mar 2012 07:37:50 -0700 (PDT) Received: from [127.0.1.1] (94-227-97-70.access.telenet.be. [94.227.97.70]) by mx.google.com with ESMTPS id x8sm28802693eea.10.2012.03.23.07.37.48 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Mar 2012 07:37:48 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 0e9c281db61ec6c47a7a40f9206c760afa7dace5 Message-Id: <0e9c281db61ec6c47a7a.1332513454@beantl019720> User-Agent: Mercurial-patchbomb/1.9.1 Date: Fri, 23 Mar 2012 15:37:34 +0100 From: Thomas De Schampheleire To: buildroot@busybox.net Subject: [Buildroot] [PATCH v3] Add dtc (device tree compiler) as host tool X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The dtc is taken from the Linux kernel sources and simply copied to the host directory. Having dtc as a separate host tool can be useful for users that have a custom boot scenario where the device tree is not embedded in the kernel. Signed-off-by: Thomas De Schampheleire --- v2: remove old parameters to GENTARGETS call, sorry. v3: rename Config.in.host and depend on Linux (comments Arnout) package/Config.in.host | 1 + package/dtc/Config.in.host | 8 ++++++++ package/dtc/dtc.mk | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 0 deletions(-) diff --git a/package/Config.in.host b/package/Config.in.host --- a/package/Config.in.host +++ b/package/Config.in.host @@ -1,5 +1,6 @@ menu "Host utilities" +source "package/dtc/Config.in.host" source "package/lpc3250loader/Config.in.host" source "package/openocd/Config.in.host" source "package/sam-ba/Config.in.host" diff --git a/package/dtc/Config.in.host b/package/dtc/Config.in.host new file mode 100644 --- /dev/null +++ b/package/dtc/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_DTC + bool "Device Tree Compiler (dtc)" + depends on BR2_LINUX_KERNEL + help + Device Tree Compiler for flattened-device trees. + +comment "The dtc device tree compiler depends on the Linux kernel sources." + depends on !BR2_LINUX_KERNEL diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk new file mode 100644 --- /dev/null +++ b/package/dtc/dtc.mk @@ -0,0 +1,14 @@ +############################################################# +# +# dtc +# +############################################################# + +HOST_DTC_SOURCE = +HOST_DTC_DEPENDENCIES = linux + +define HOST_DTC_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(LINUX_DIR)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc +endef + +$(eval $(call GENTARGETS,host))