From patchwork Tue May 15 18:18:25 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: 159407 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 98321B6FAB for ; Wed, 16 May 2012 04:19:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6657E8CE80; Tue, 15 May 2012 18:19:08 +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 7-A3GiydDzoU; Tue, 15 May 2012 18:19:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B05FC8CE70; Tue, 15 May 2012 18:19:04 +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 78DAA8F76A for ; Tue, 15 May 2012 18:19:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6E6428CE77 for ; Tue, 15 May 2012 18:19:03 +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 Yh3Qg-3S9dQB for ; Tue, 15 May 2012 18:19:02 +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 3C4958CD28 for ; Tue, 15 May 2012 18:19:02 +0000 (UTC) Received: by eaaa12 with SMTP id a12so2834259eaa.16 for ; Tue, 15 May 2012 11:19:00 -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=sfp+R20yJqEt7u1CpIX5kMzO9WRGBYyxTNj873MCEEA=; b=UqliWC+y0aKhIuVx3MXvViD3Fs4QNzmjZrlbOUHvxiB3JhqS91LAIfriSNSnt4GaH4 JANND4AqGnP/+HUh/c7itHju78OxpFRb+YJIQBY1rEqMBSYQcI7ljMy/1hUVf7pHVlk1 bnvjjrHeRhI2VlUh4ys4s6NVOYsc0HNv3SgwXlaivCmqce/RqDi9zIS6FUEa3c1xjrA2 j6Q6IeefYFmviomsxHgJx964XjcEaItobU+q/WzIlQbtuZM/947e4c7k+o4JBHfcm9Vx TztQN2LdKdGGhnRlnlQVbDsKS1b+c27UQGzTlUhkxk4sUjwcPrpdvBO4t554gz8CL3ba dXtQ== Received: by 10.213.142.66 with SMTP id p2mr717604ebu.150.1337105940451; Tue, 15 May 2012 11:19:00 -0700 (PDT) Received: from [127.0.1.1] (d54C62A5A.access.telenet.be. [84.198.42.90]) by mx.google.com with ESMTPS id a16sm16611082eeg.0.2012.05.15.11.18.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 May 2012 11:18:59 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: ade945be4a66da0c3b8068cf4540ab190a1974e5 Message-Id: User-Agent: Mercurial-patchbomb/1.9.1 Date: Tue, 15 May 2012 20:18:25 +0200 From: Thomas De Schampheleire To: buildroot@busybox.net Subject: [Buildroot] [PATCH v4-resend] linux: install dtc (device tree compiler) as host tool if selected 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 Having dtc as a 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 Acked-by: Thomas Petazzoni --- v2: remove old parameters to GENTARGETS call, sorry. v3: rename Config.in.host and depend on Linux (comments Arnout) v4: no need for a separate package, just put the logic in linux.mk (suggestion of Alexandre Pereira da Silva, thanks!) linux/linux.mk | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk --- a/linux/linux.mk +++ b/linux/linux.mk @@ -183,6 +183,15 @@ define LINUX_INSTALL_KERNEL_IMAGE_TO_TAR endef endif + +define LINUX_INSTALL_HOST_TOOLS + # Installing dtc (device tree compiler) as host tool, if selected + if grep -q "CONFIG_DTC=y" $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ; \ + fi +endef + + define LINUX_INSTALL_IMAGES_CMDS cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) endef @@ -197,6 +206,7 @@ define LINUX_INSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \ rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \ fi + $(LINUX_INSTALL_HOST_TOOLS) endef include linux/linux-ext-*.mk