From patchwork Sun May 5 19:52:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Jean Texier X-Patchwork-Id: 1095540 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@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; dmarc=fail (p=quarantine dis=none) header.from=koncepto.io Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=koncepto.io header.i=@koncepto.io header.b="e/oXLIxO"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44xxQ86nTnz9s9G for ; Mon, 6 May 2019 05:53:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AFC23231CB; Sun, 5 May 2019 19:53:49 +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 eoa-4MPqeof2; Sun, 5 May 2019 19:53:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3117C2274A; Sun, 5 May 2019 19:53:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id BE6461BF378 for ; Sun, 5 May 2019 19:53:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BB8BA2274A for ; Sun, 5 May 2019 19:53:44 +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 u+PqMtMLuq2L for ; Sun, 5 May 2019 19:53:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from koncepto.io (koncepto.io [195.154.119.111]) by silver.osuosl.org (Postfix) with ESMTPS id 50D7B22708 for ; Sun, 5 May 2019 19:53:43 +0000 (UTC) Received: from localhost.localdomain (lfbn-1-8938-37.w193-250.abo.wanadoo.fr [193.250.79.37]) by koncepto.io (Postfix) with ESMTPSA id BC501600BB; Sun, 5 May 2019 21:53:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=koncepto.io; s=default; t=1557086019; bh=QvOCIoubZ12OpRDZl+GPLpTA9uuRG/lZGkrVsjlfZyQ=; h=From:To:Cc:Subject:Date:From; b=e/oXLIxOFUBVG3a5xAb+jP0PnNNN8fqted7nfTL4VHOg3ue6l424+BzI772N4b8l/ oTtI9PWuNZ+IRpgpY/yN2yKUB0VnzuUhHpIf5WPSGJfnQHTluh6T0/u7Z+5GZbqzNz p+uP6N6Kj3R5wNtBoRDuq2pa/W38mTacG8kwyVoLYZ+X07k28hjQUCU0hw9R5ImC+9 c0bY8lg0h22bfkRVPw/zK1AGs3qpVpNcQSGBilYVOubRmwYK0V9q6m+0G3KTlXb7uj zCBpDaLEdmffLHWii5faCHUfJ05bUnQzCcYq+lpP/89GAWw7GDf1hqe7Hjgmypq057 H8DFCyioRJmyg== From: Pierre-Jean Texier To: buildroot@buildroot.org Date: Sun, 5 May 2019 21:52:27 +0200 Message-Id: <1557085947-25842-1-git-send-email-pjtexier@koncepto.io> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/libubootenv: add new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre-Jean Texier Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Libubootenv is a library that provides a hardware independent way to access to U-Boot environment. Signed-off-by: Pierre-Jean Texier --- package/Config.in | 1 + ...w_printenv-remove-declaration-in-for-loop.patch | 53 ++++++++++++++++++++++ package/libubootenv/Config.in | 11 +++++ package/libubootenv/libubootenv.hash | 2 + package/libubootenv/libubootenv.mk | 14 ++++++ 5 files changed, 81 insertions(+) create mode 100644 package/libubootenv/0001-fw_printenv-remove-declaration-in-for-loop.patch create mode 100644 package/libubootenv/Config.in create mode 100644 package/libubootenv/libubootenv.hash create mode 100644 package/libubootenv/libubootenv.mk diff --git a/package/Config.in b/package/Config.in index f592e74..b920554 100644 --- a/package/Config.in +++ b/package/Config.in @@ -458,6 +458,7 @@ endmenu source "package/iucode-tool/Config.in" source "package/kbd/Config.in" source "package/lcdproc/Config.in" + source "package/libubootenv/Config.in" source "package/libuio/Config.in" source "package/linuxconsoletools/Config.in" source "package/linux-backports/Config.in" diff --git a/package/libubootenv/0001-fw_printenv-remove-declaration-in-for-loop.patch b/package/libubootenv/0001-fw_printenv-remove-declaration-in-for-loop.patch new file mode 100644 index 0000000..1ec908a --- /dev/null +++ b/package/libubootenv/0001-fw_printenv-remove-declaration-in-for-loop.patch @@ -0,0 +1,53 @@ +From ffca94e6f84956838a2d88824b37fcd3b0d0694b Mon Sep 17 00:00:00 2001 +From: Pierre-Jean Texier +Date: Sun, 5 May 2019 21:42:48 +0200 +Subject: [PATCH] fw_printenv: remove declaration in for loop +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This commit fixes : + +src/fw_printenv.c:142:4: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode + for (int i = 0; i < argc; i++) { + +Signed-off-by: Pierre-Jean Texier +[Upstream status: http://patchwork.ozlabs.org/patch/1092851/] +--- + src/fw_printenv.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/fw_printenv.c b/src/fw_printenv.c +index 361d150..4236eaa 100644 +--- a/src/fw_printenv.c ++++ b/src/fw_printenv.c +@@ -59,7 +59,7 @@ int main (int argc, char **argv) { + char *cfgfname = NULL; + char *defenvfile = NULL; + char *scriptfile = NULL; +- int c; ++ int c, i; + int ret = 0; + void *tmp; + const char *name, *value; +@@ -139,7 +139,7 @@ int main (int argc, char **argv) { + fprintf(stdout, "%s=%s\n", name, value); + } + } else { +- for (int i = 0; i < argc; i++) { ++ for (i = 0; i < argc; i++) { + value = libuboot_get_env(ctx, argv[i]); + if (noheader) + fprintf(stdout, "%s\n", value ? value : ""); +@@ -151,7 +151,7 @@ int main (int argc, char **argv) { + if (scriptfile) + libuboot_load_file(ctx, scriptfile); + else { +- for (int i = 0; i < argc; i += 2) { ++ for (i = 0; i < argc; i += 2) { + if (i + 1 == argc) + libuboot_set_env(ctx, argv[i], NULL); + else +-- +2.7.4 + diff --git a/package/libubootenv/Config.in b/package/libubootenv/Config.in new file mode 100644 index 0000000..9be52c4 --- /dev/null +++ b/package/libubootenv/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBUBOOTENV + bool "libubootenv" + select BR2_PACKAGE_ZLIB + help + libubootenv is a library that provides a hardware independent + way to access to U-Boot environment. + + The package provides the fw_printenv / fw_setenv utilities, + new tools build from the library and not from U-Boot. + + https://github.com/sbabic/libubootenv/ diff --git a/package/libubootenv/libubootenv.hash b/package/libubootenv/libubootenv.hash new file mode 100644 index 0000000..79aaac7 --- /dev/null +++ b/package/libubootenv/libubootenv.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 82c6966af5feae8726bd78a2cde4c4c2f69e81f8fdc548098063f8a35eaad090 libubootenv-8a7d4030bcb106de11632e85b6a0e7b7d4cb47af.tar.gz diff --git a/package/libubootenv/libubootenv.mk b/package/libubootenv/libubootenv.mk new file mode 100644 index 0000000..d74e823 --- /dev/null +++ b/package/libubootenv/libubootenv.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libubootenv +# +################################################################################ + +LIBUBOOTENV_VERSION = 8a7d4030bcb106de11632e85b6a0e7b7d4cb47af +LIBUBOOTENV_SITE = $(call github,sbabic,libubootenv,$(LIBUBOOTENV_VERSION)) +LIBUBOOTENV_LICENSE = LGPL-2.1 +LIBUBOOTENV_INSTALL_STAGING = YES + +LIBUBOOTENV_DEPENDENCIES += zlib + +$(eval $(cmake-package))