From patchwork Fri Apr 6 20:10:30 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: 151263 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 EB4DDB700A for ; Sat, 7 Apr 2012 06:12:05 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D0BC08FEDC; Fri, 6 Apr 2012 20:12:00 +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 ORPcrojoGp94; Fri, 6 Apr 2012 20:12:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id F034A8FE03; Fri, 6 Apr 2012 20:11: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 E8B4A8F753 for ; Fri, 6 Apr 2012 20:11:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 72AFF8F990 for ; Fri, 6 Apr 2012 20:11: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 HJ0La8d1Lvct for ; Fri, 6 Apr 2012 20:11:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5F8218BC6E for ; Fri, 6 Apr 2012 20:11:52 +0000 (UTC) Received: by eekc13 with SMTP id c13so991620eek.16 for ; Fri, 06 Apr 2012 13:11: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=sfp+R20yJqEt7u1CpIX5kMzO9WRGBYyxTNj873MCEEA=; b=aTcYyBxK1ZHSZoMV/9nkUyXpy2gCKahVBXB/TPKv4GOmI3+KR/oFhOaxTOXZZVLO+y Nypa46wb4UYVE+OWGWxEXnr9znwVaeYdlO7DPB9cOY/yDIyAGBLmsWPFzAkgimapG4Zx raJ2w9H11/T87DyRhovXhXwxuLUMRnjEGDYy6zEDHQV0Fkx5ZbwzXHenxY3PuLdoZhcq UhoRMoqa12HwlAodINrqbzv7dyaDV+ukcrp9Fb0i7jhIKGB8t8sW0z0iMJouRqQr9VvW S2WG7aapBjslBuTERi6mM2EhgZ1K/TNM0MMbH8vxuqSxK/qGI9xiekQq3YlNiK4MmKnp Obtw== Received: by 10.213.13.138 with SMTP id c10mr794461eba.116.1333743110394; Fri, 06 Apr 2012 13:11: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 p57sm29701969eei.8.2012.04.06.13.11.49 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Apr 2012 13:11:49 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 6099ad9232bcbe718d3a825bdb9c9ddb8f45b95a Message-Id: <6099ad9232bcbe718d3a.1333743030@beantl019720> User-Agent: Mercurial-patchbomb/1.9.1 Date: Fri, 06 Apr 2012 22:10:30 +0200 From: Thomas De Schampheleire To: buildroot@busybox.net Subject: [Buildroot] [PATCH v4] 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 --- 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