From patchwork Wed Oct 24 21:25:28 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: 193958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id DE1E02C009B for ; Thu, 25 Oct 2012 08:27:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 949783105A; Wed, 24 Oct 2012 21:27:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EzFElpx7aQvh; Wed, 24 Oct 2012 21:27:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A157B3101C; Wed, 24 Oct 2012 21:26:57 +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 810758F74A for ; Wed, 24 Oct 2012 21:26:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 331B78C8FB for ; Wed, 24 Oct 2012 21:26:36 +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 44l9sgsxtGLv for ; Wed, 24 Oct 2012 21:26:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id 454C18C8CA for ; Wed, 24 Oct 2012 21:26:24 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hq12so757034wib.10 for ; Wed, 24 Oct 2012 14:26:22 -0700 (PDT) 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=tR9uHLhPodaAQ0kFL3J/aNEDfqIrAJdsd6nfzTBDMlE=; b=NqRNdhvocMD0IX6gMcj3ARd4/17y508EER0NnhLJswABgWRccB3ZrWcfGFfvCokYY/ a2O2J6MkQL5yR7XYy2W2vnx9Ndqa/B6huMi716Snp7Vs12guAKTY7PJGOAUnsx4bWJ4z HqSd/sDcncPwfqDXJJXEHeOzg0BBZrAJPOpZXNNo7KCQClVuoqRV1zChGsTnOosjhIH4 1lwWdN+5x/zW6zQvJFyu4CbWVWD3xJat6RMXushcibPK2lHYNrKYi+7u+vffQm5IlPiz eyd2gRoD/BTsVF/tLMaz6Otx4M5OI8tXCrC9dVHPdwnP/qY+YvHZoyJw7nofFsFBfoa+ vCcg== Received: by 10.216.214.92 with SMTP id b70mr11007306wep.86.1351113982300; Wed, 24 Oct 2012 14:26:22 -0700 (PDT) Received: from localhost.localdomain (ARennes-256-1-66-54.w90-32.abo.wanadoo.fr. [90.32.145.54]) by mx.google.com with ESMTPS id hb6sm6371161wib.7.2012.10.24.14.26.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Oct 2012 14:26:21 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Wed, 24 Oct 2012 23:25:28 +0200 Message-Id: <1351113973-17237-3-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1351113973-17237-1-git-send-email-yann.morin.1998@free.fr> References: <1351113973-17237-1-git-send-email-yann.morin.1998@free.fr> MIME-Version: 1.0 Cc: bjornar.ness@gmail.com, "Yann E. MORIN" Subject: [Buildroot] =?utf-8?q?=5BPATCH_02/47=5D_package/libfdt=3A_new_pac?= =?utf-8?q?kage?= 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 libfdt allows one to manipulate a Flat Device Tree. Signed-off-by: "Yann E. MORIN" --- package/Config.in | 1 + package/dtc/Config.in | 9 +++++++ package/dtc/dtc-extra_cflags.patch | 12 +++++++++ package/dtc/dtc-separate-lib-install.patch | 28 +++++++++++++++++++++ package/dtc/dtc.mk | 36 ++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 0 deletions(-) create mode 100644 package/dtc/Config.in create mode 100644 package/dtc/dtc-extra_cflags.patch create mode 100644 package/dtc/dtc-separate-lib-install.patch create mode 100644 package/dtc/dtc.mk diff --git a/package/Config.in b/package/Config.in index 1650c71..c9cb3ed 100644 --- a/package/Config.in +++ b/package/Config.in @@ -396,6 +396,7 @@ source "package/libaio/Config.in" source "package/libraw1394/Config.in" source "package/tslib/Config.in" source "package/libfreefare/Config.in" +source "package/dtc/Config.in" source "package/libftdi/Config.in" source "package/libhid/Config.in" source "package/libiqrf/Config.in" diff --git a/package/dtc/Config.in b/package/dtc/Config.in new file mode 100644 index 0000000..7b86c60 --- /dev/null +++ b/package/dtc/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DTC + bool "dtc" + help + dtc is the Device Tree Compiler, to generate Device Trees. + libfdt if a library to manipulate Flat Device Trees. + + Note that only the library is installed for now. + + http://git.jdl.com/gitweb/?p=dtc.git (no home page) diff --git a/package/dtc/dtc-extra_cflags.patch b/package/dtc/dtc-extra_cflags.patch new file mode 100644 index 0000000..03225e7 --- /dev/null +++ b/package/dtc/dtc-extra_cflags.patch @@ -0,0 +1,12 @@ +diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile +--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile 2012-10-22 22:02:47.541240846 +0200 ++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile 2012-10-22 22:03:21.151047833 +0200 +@@ -18,7 +18,7 @@ + CPPFLAGS = -I libfdt -I . + WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) $(EXTRA_CFLAGS) + + BISON = bison + LEX = flex diff --git a/package/dtc/dtc-separate-lib-install.patch b/package/dtc/dtc-separate-lib-install.patch new file mode 100644 index 0000000..c86d587 --- /dev/null +++ b/package/dtc/dtc-separate-lib-install.patch @@ -0,0 +1,28 @@ +Makefile: add a rule to only install libfdt + +Signed-off-by: "Yann E. MORIN" + +--- +Patch not sent upstream. + +It's really specific to buildroot, and is probably not +good (aka generic) enough to be pushed upstream. + +diff --git a/Makefile b/Makefile +index 1169e6c..39e7190 100644 +--- a/Makefile ++++ b/Makefile +@@ -160,10 +160,12 @@ endif + # intermediate target and building them again "for real" + .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) + +-install: all $(SCRIPTS) ++install: all $(SCRIPTS) libfdt_install + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) ++ ++libfdt_install: libfdt + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) + ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk new file mode 100644 index 0000000..d53e78a --- /dev/null +++ b/package/dtc/dtc.mk @@ -0,0 +1,36 @@ +############################################################# +# +# libcurl +# +############################################################# + +DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef +DTC_SITE = git://git.jdl.com/software/dtc.git +DTC_LICENSE = GPLv2+/BSD-2c +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. +DTC_INSTALL_STAGING = YES + +# Need -fPIC for x86-64 +define DTC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + PREFIX=/usr \ + libfdt +endef + +# libfdt_install is our own install rule added by our patch +define DTC_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install +endef + +define DTC_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install +endef + +define DTC_CLEAN_CMDS + $(MAKE) -C $(@D) libfdt_clean +endef + +$(eval $(generic-package))