From patchwork Wed Nov 28 23:54:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 202576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 946242C0081 for ; Thu, 29 Nov 2012 10:55:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 623A0101866; Wed, 28 Nov 2012 23:55:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d5Yk4Rm9e4LH; Wed, 28 Nov 2012 23:55:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3490B101827; Wed, 28 Nov 2012 23:55:21 +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 AB28A8F74A for ; Wed, 28 Nov 2012 23:55:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7DFFC8A35F for ; Wed, 28 Nov 2012 23:55:25 +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 SQ1uslcoDXZA for ; Wed, 28 Nov 2012 23:55:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7BAEF8A812 for ; Wed, 28 Nov 2012 23:55:13 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id e12so4689610wge.10 for ; Wed, 28 Nov 2012 15:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Av41fAUmJyJyCB38W3pc/6/8UoBhwlPm3E8MolymfPg=; b=mat7Xc46Yrj7wsVvYC2ij/Gs892yeBCvkrEHbD54PIj/VrF6duVf3+NTeD3LV+EyBB ycvhpFSBZqFu0oZ/FcccbS/s6daKI2YLQDlnQgxQZwL8DZFwI4ErRYvt4bzpg46uyRdC J32oSxI7Itp5T0x+sU7aamh9r4Q4OYNIuTwzyfbSyf4INvHm7rO4qI1C/quc3eHebfoV iavlPFdClJxPx9FSQkWk8bZJmPUWVV/DpmQ0gi6tjjWYb57oAh0nMrNVYjip2OkCTV1U 7nyYh2MtdlsFcL7UjpyYgDxWiUMDSqxEOVwNKpbhiJVgfLaUZ8qqoVjWNSBxolqPgJhL EenA== Received: by 10.216.220.30 with SMTP id n30mr8402593wep.89.1354146911489; Wed, 28 Nov 2012 15:55:11 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-141-45.w90-32.abo.wanadoo.fr. [90.32.252.45]) by mx.google.com with ESMTPS id i6sm9076156wix.5.2012.11.28.15.55.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Nov 2012 15:55:11 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Thu, 29 Nov 2012 00:54:02 +0100 Message-Id: <1354146890-27380-4-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1354146890-27380-1-git-send-email-yann.morin.1998@free.fr> References: <1354146890-27380-1-git-send-email-yann.morin.1998@free.fr> MIME-Version: 1.0 Cc: "Yann E. MORIN" Subject: [Buildroot] =?utf-8?q?=5BPATCH_03/51=5D_package/dtc=3A_add_option?= =?utf-8?q?_to_install_programs?= 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 By default, we only install the libfdt library. As suggested by Arnout, add an option that also installs the few dtc programs. Cc: Arnout Vandecappelle Signed-off-by: "Yann E. MORIN" --- There is some (minor?) issues wrt the licensing terms. The libfdt library is dual-licensed GPLv2+/BSD-2c, and the executables are licensed GPLv2+. There is no way in BR to properly convey this information. So I decided to add some explanatory comments in the .mk file, in retaliation. ;-) --- package/dtc/Config.in | 20 ++++++++++++++++++-- package/dtc/dtc.mk | 14 +++++++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/package/dtc/Config.in b/package/dtc/Config.in index 96225e3..04edab2 100644 --- a/package/dtc/Config.in +++ b/package/dtc/Config.in @@ -1,9 +1,25 @@ config BR2_PACKAGE_DTC - bool "dtc" + bool "dtc (libfdt)" help The Device Tree Compiler, dtc, takes as input a device-tree in a given format and outputs a device-tree in another format. - Note that only the library is installed for now. + Note that only the library is installed. + If you want the programs, say 'y' here, and to "dtc programs", below. http://git.jdl.com/gitweb/?p=dtc.git (no home page) + +if BR2_PACKAGE_DTC + +config BR2_PACKAGE_DTC_BINARY + bool "dtc programs" + help + Say 'y' here if you also want the programs on the target: + - convert-dtsv0 convert from version 0 to version 1 + - dtc the device tree compiler + - dtdiff compare two device trees (needs bash) + - fdtdump print a readable version of a flat device tree + - fdtget read values from device tree + - fdtput write a property value to a device tree + +endif diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk index a0e1e35..1ffd341 100644 --- a/package/dtc/dtc.mk +++ b/package/dtc/dtc.mk @@ -6,25 +6,29 @@ DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef DTC_SITE = git://git.jdl.com/software/dtc.git -DTC_LICENSE = GPLv2+/BSD-2c +DTC_LICENSE = GPLv2+/BSD-2c GPLv2+ DTC_LICENSE_FILES = README.license GPL # Note: the dual-license only applies to the library. -# The DT compiler (dtc) is GPLv2+, but we do not install it. +# The DT compiler (dtc) is GPLv2+. DTC_INSTALL_STAGING = YES +# libfdt_install is our own install rule added by our patch +DTC_BUILD_RULE=$(if $(BR2_PACKAGE_DTC_BINARY),,libfdt) +DTC_INSTALL_RULE=$(if $(BR2_PACKAGE_DTC_BINARY),install,libfdt_install) + define DTC_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ - $(MAKE) -C $(@D) PREFIX=/usr libfdt + $(MAKE) -C $(@D) PREFIX=/usr $(DTC_BUILD_RULE) endef -# libfdt_install is our own install rule added by our patch +# For staging, only the library is needed define DTC_INSTALL_STAGING_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install endef define DTC_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_RULE) endef define DTC_CLEAN_CMDS