From patchwork Wed Dec 6 11:19:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 845134 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.136; helo=silver.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="sHXlHf3S"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ysGNk3fNLz9sPk for ; Wed, 6 Dec 2017 22:19:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E79352FD5B; Wed, 6 Dec 2017 11:19:47 +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 Q86DTiKojFF4; Wed, 6 Dec 2017 11:19:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DC2D2307E5; Wed, 6 Dec 2017 11:19:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5F4A81C0621 for ; Wed, 6 Dec 2017 11:19:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 585C38800A for ; Wed, 6 Dec 2017 11:19:45 +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 vMKv3OKxP6va for ; Wed, 6 Dec 2017 11:19:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id ED06487DE9 for ; Wed, 6 Dec 2017 11:19:43 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id b76so6498832wmg.1 for ; Wed, 06 Dec 2017 03:19:43 -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=H2QhsfKV7YEujVokAEbrTQOPfKzYnNQXZnPr+LUxJD0=; b=sHXlHf3So5gAtjaYvv8GTMjlmmfqwlWoDygs8/A3Zdpo9MmtXWuxqrWWPwZwJkmi+1 oP8fzpggjIUtlPA+F+pCe6BX5QQ93tqqfPFKvpiR4ziJs1fSSb4MarCtYSwjDVmSgJ/1 vyX8edHylP0NLBMQ2DC+LJPSar0QL1UcYmGKYKNaFcMLG9S277/AObUhfhsiZqQR8J6z xiJ8Ms5P4pTmEnrVSTiTYiuxQ/eb3Bu7rZQmXnpMzplQvLaagehtKbP9OZPpYKeDYnzd lOLUX3R9WTteiN59GPXvA89uZz2BCUVo1m2RhISRYew60K705893t8QzcpD7q1FsnjA1 5VgA== 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=H2QhsfKV7YEujVokAEbrTQOPfKzYnNQXZnPr+LUxJD0=; b=tnGHhza2rkADLZZ9hzc0I5RYunx0MdxUSbzmvtTYP/XAMDZPcuAs3Bbao+e3Ze6VXj UnJ6bIcIi4nBbBBfJmoAb66zZGpvwJ4ysCY1K91dti8Llsxi0TiJi0sUVbp67rJ3aTjM 4kwiOkSdjwFGhyKgFp3kFF/3eHx9QAjS0PcyLKxM1ZrpChIbKP6ruzfX1ZhrqFU8LZmq vv5Pq9RvOPJ9c9heVufMUvdfcoKSAZSsbAzjtEk3f5oJhUhtMu+5R+Rmj/HryhOtFQeY UipP9M5zRXCDMdDkAJ0cIzGdiR98bAOI0sszfyAVkK46HTWyqCyAOlhhxU8gucXbH0CH 9/QA== X-Gm-Message-State: AKGB3mLcH5Lj3AkjWuLCxhGokb1UKXZvuYbpzqz0p87IwTXLHi5XHfcF 4thZVoFXQLEs0VUPNRHw+KpGfyxXkLU= X-Google-Smtp-Source: AGs4zMZPAvVOIMocF6vvaaL1PvTKpoYgvsxuThSwm30eGIava+yRGoYD6uzYNhq/WteZ5rj+bQ8WlA== X-Received: by 10.28.51.133 with SMTP id z127mr9125906wmz.84.1512559182085; Wed, 06 Dec 2017 03:19:42 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id r14sm2450503wra.71.2017.12.06.03.19.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 03:19:41 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 6 Dec 2017 12:19:26 +0100 Message-Id: <1512559166-5399-1-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH v2] 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 new command named i2ctransfer. 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 ...efile-Add-flag-to-disable-dynamic-library.patch | 64 ++++++++++++++++++++++ package/i2c-tools/i2c-tools.hash | 2 +- package/i2c-tools/i2c-tools.mk | 14 ++++- 3 files changed, 76 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..66b1657 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,12 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y) I2C_TOOLS_DEPENDENCIES += busybox endif +ifeq ($(BR2_STATIC_LIBS),y) +ifeq ($(BR2_SHARED_STATIC_LIBS),) +I2C_TOOLS_MAKE_OPTS += BUILD_DYNAMIC_LIB=0 USE_STATIC_LIB=1 +endif +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 +54,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