From patchwork Wed Dec 6 14:19:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 845192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=amarulasolutions-com.20150623.gappssmtp.com header.i=@amarulasolutions-com.20150623.gappssmtp.com header.b="ObYaVAi3"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ysLNN3bKKz9sCZ for ; Thu, 7 Dec 2017 01:19:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8934088A9D; Wed, 6 Dec 2017 14:19:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kag+cvrakVMW; Wed, 6 Dec 2017 14:19:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 030BF886BF; Wed, 6 Dec 2017 14:19:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 253511C3F90 for ; Wed, 6 Dec 2017 14:19:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1BD6088DA0 for ; Wed, 6 Dec 2017 14:19:40 +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 qx-C9vM7Yi1a for ; Wed, 6 Dec 2017 14:19:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6A75888D2D for ; Wed, 6 Dec 2017 14:19:36 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id v105so4088978wrc.3 for ; Wed, 06 Dec 2017 06:19:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=JhO3jirHIjbBvZgDqJsfca1Fonyz1d2dd2rdJAOdHJ4=; b=ObYaVAi37we6si8SHH6XDqRMoPacpPdGCHLc+LsgRRQ55LJqkMiZAAgwzBXw74AssG wC7u7PyUzgkwsJ2gs11OFyACFuCCCcD2jDxqtScpCDcwGbX5K3xECtJuaC30Wn6au5Yt tGXFabfjgi1kLKlWeJ9NWNOB7OUMhsQgepbBDM7kGL/AdKfod894kEazzyLXN8T7353k 5FhDnS1FVGjT1fW0UYdqbQjIwX+G/U1+rl8hXG6YG+dgvyGwZVXy8MJcyUNHU1tWsr8w BKUFTaHD6DNsvLUoMerQZUShQjHTQHyMhPlP/FDBP1mVmvzF5lDLZHg/+u/jQKgsCgma YG2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JhO3jirHIjbBvZgDqJsfca1Fonyz1d2dd2rdJAOdHJ4=; b=jhwSuwkrvnMPlkP+vxbJMoq+634b27yCUESAJD6RrK944sqYDQaPwHy5thO1t+yqGI J4ot+c1W2Cg7No6kzw3k3Q3kA+DKXeY6OmXShxt5Wm0uFQqN8mfdN0ngEhnkZ+lXSoXM oXR+2q5mWNYZn775X0cLVMGipSsclmnxqSafIPRKCL+Dsbp8GUkgpskRu3JyQnrjp03h M81KH2no4rsyiBU65+omX2mpGxCZBxCnfXLO3JcC5LkTZvcAxIge4H0CGsfxTtogTIRS qp8G+uxYKElnkB7cLnLx3386iOzZt+fFjHIfgzsoWWY9cXZyVgWJ5MGIoVg9XBlmWbbg V7og== X-Gm-Message-State: AJaThX41z5I8EVuOYmw7c26ApiaZNEPiyC/X1eVlMdblOru1RvIAY7Dv HmNz7PPQr7EGhtRO2iy7Zn2k004zHvs= X-Google-Smtp-Source: AGs4zMbF36x6I66dEpKkF9HfZyXI7zKfF5kGEMc4g6TWZpAoSj0V2fTwud5naGTLyI9zE8EJRY2XLg== X-Received: by 10.223.150.118 with SMTP id c51mr18710541wra.202.1512569974675; Wed, 06 Dec 2017 06:19:34 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id o27sm2954467wro.9.2017.12.06.06.19.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 06:19:33 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 6 Dec 2017 15:19:23 +0100 Message-Id: <1512569963-7256-1-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH v3] package/i2c-tools: bump to version 4.0 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch bumps i2c-tools to version 4.0 and adds a couple of new commands named i2ctransfer and eeprog. It adds also an upstream commit not included in the release that fixing a static compilation issue. Signed-off-by: Angelo Compagnucci --- Changes: v1 -> v2: added upstream commit to fix static compilation issues v2 -> v3: fixing logic around BR2_SHARED_STATIC_LIBS (suggested by Baruch Siach) ...efile-Add-flag-to-disable-dynamic-library.patch | 64 ++++++++++++++++++++++ package/i2c-tools/i2c-tools.hash | 2 +- package/i2c-tools/i2c-tools.mk | 16 +++++- 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 package/i2c-tools/0001-Makefile-Add-flag-to-disable-dynamic-library.patch diff --git a/package/i2c-tools/0001-Makefile-Add-flag-to-disable-dynamic-library.patch b/package/i2c-tools/0001-Makefile-Add-flag-to-disable-dynamic-library.patch new file mode 100644 index 0000000..5a585b2 --- /dev/null +++ b/package/i2c-tools/0001-Makefile-Add-flag-to-disable-dynamic-library.patch @@ -0,0 +1,64 @@ +From 9906b2ecb6aec02d6348d6237b784135e6930d0b Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Wed, 6 Dec 2017 10:12:07 +0100 +Subject: [PATCH 1/2] Makefile: Add flag to disable dynamic library + +In such cases where you need to disable entirely the dynamic +library compilation, now you can use the BUILD_DYNAMIC_LIB=0 +flag. + +Signed-off-by: Angelo Compagnucci +Signed-off-by: Jean Delvare +--- + Makefile | 10 +++++++++- + lib/Module.mk | 6 +++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index c85317c..1bb5572 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,12 +32,20 @@ CFLAGS ?= -O2 + CFLAGS += -Wall + SOCFLAGS := -fpic -D_REENTRANT $(CFLAGS) + +-USE_STATIC_LIB ?= 0 ++BUILD_DYNAMIC_LIB ?= 1 + BUILD_STATIC_LIB ?= 1 ++USE_STATIC_LIB ?= 0 ++ + ifeq ($(USE_STATIC_LIB),1) + BUILD_STATIC_LIB := 1 + endif + ++ifeq ($(BUILD_DYNAMIC_LIB),0) ++ifeq ($(BUILD_STATIC_LIB),0) ++$(error BUILD_DYNAMIC_LIB and BUILD_STATIC_LIB cannot be disabled at the same time) ++endif ++endif ++ + KERNELVERSION := $(shell uname -r) + + .PHONY: all strip clean install uninstall +diff --git a/lib/Module.mk b/lib/Module.mk +index fd2c8c4..44fa938 100644 +--- a/lib/Module.mk ++++ b/lib/Module.mk +@@ -27,9 +27,13 @@ LIB_SHSONAME := $(LIB_SHBASENAME).$(LIB_MAINVER) + LIB_SHLIBNAME := $(LIB_SHBASENAME).$(LIB_VER) + LIB_STLIBNAME := libi2c.a + +-LIB_TARGETS := $(LIB_SHLIBNAME) + LIB_LINKS := $(LIB_SHSONAME) $(LIB_SHBASENAME) + LIB_OBJECTS := smbus.o ++ ++LIB_TARGETS := ++ifeq ($(BUILD_DYNAMIC_LIB),1) ++LIB_TARGETS += $(LIB_SHLIBNAME) ++endif + ifeq ($(BUILD_STATIC_LIB),1) + LIB_TARGETS += $(LIB_STLIBNAME) + LIB_OBJECTS += smbus.ao +-- +2.7.4 + diff --git a/package/i2c-tools/i2c-tools.hash b/package/i2c-tools/i2c-tools.hash index 464219d..3475d20 100644 --- a/package/i2c-tools/i2c-tools.hash +++ b/package/i2c-tools/i2c-tools.hash @@ -1,5 +1,5 @@ # Locally computed -sha256 6d6079153cd49a62d4addacef4c092db1a46ba60b2807070a3fbe050262aef87 i2c-tools-3.1.2.tar.xz +sha256 d900ca1c11c51ea20caa50b096f948008b8a7ad832311b23353e21baa7af28d6 i2c-tools-4.0.tar.xz # License file sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/i2c-tools/i2c-tools.mk b/package/i2c-tools/i2c-tools.mk index 3bbaf38..e1a1f98 100644 --- a/package/i2c-tools/i2c-tools.mk +++ b/package/i2c-tools/i2c-tools.mk @@ -4,11 +4,12 @@ # ################################################################################ -I2C_TOOLS_VERSION = 3.1.2 +I2C_TOOLS_VERSION = 4.0 I2C_TOOLS_SOURCE = i2c-tools-$(I2C_TOOLS_VERSION).tar.xz I2C_TOOLS_SITE = https://www.kernel.org/pub/software/utils/i2c-tools I2C_TOOLS_LICENSE = GPL-2.0+, GPL-2.0 (py-smbus) I2C_TOOLS_LICENSE_FILES = COPYING +I2C_TOOLS_MAKE_OPTS = EXTRA="eeprog" ifeq ($(BR2_PACKAGE_PYTHON),y) I2C_TOOLS_DEPENDENCIES += python @@ -22,6 +23,14 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y) I2C_TOOLS_DEPENDENCIES += busybox endif +ifeq ($(BR2_STATIC_LIBS),y) +I2C_TOOLS_MAKE_OPTS += BUILD_DYNAMIC_LIB=0 USE_STATIC_LIB=1 +endif + +ifeq ($(BR2_SHARED_LIBS),y) +I2C_TOOLS_MAKE_OPTS += BUILD_STATIC_LIB=0 +endif + # Build/install steps mirror the distutil python package type in the python package # infrastructure ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) @@ -47,15 +56,16 @@ endef endif # BR2_PACKAGE_PYTHON define I2C_TOOLS_BUILD_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) -C $(@D) $(I2C_TOOLS_BUILD_PYSMBUS) endef define I2C_TOOLS_INSTALL_TARGET_CMDS - for i in i2cdump i2cget i2cset i2cdetect; \ + for i in i2cdump i2cget i2cset i2cdetect i2ctransfer; \ do \ $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/sbin/$$i; \ done + $(INSTALL) -m 755 -D $(@D)/eeprog/eeprog $(TARGET_DIR)/usr/bin/eeprog; $(I2C_TOOLS_INSTALL_PYSMBUS) endef