All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libubootenv: add new package
@ 2019-05-05 19:52 Pierre-Jean Texier
  2019-05-06 13:02 ` Matthew Weber
  2019-05-20 20:59 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Pierre-Jean Texier @ 2019-05-05 19:52 UTC (permalink / raw)
  To: buildroot

Libubootenv is a library that provides a hardware independent
way to access to U-Boot environment.

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
 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 <pjtexier@koncepto.io>
+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 <pjtexier@koncepto.io>
+[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))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/libubootenv: add new package
  2019-05-05 19:52 [Buildroot] [PATCH 1/1] package/libubootenv: add new package Pierre-Jean Texier
@ 2019-05-06 13:02 ` Matthew Weber
  2019-05-06 13:13   ` Pierre-Jean Texier
  2019-05-20 20:59 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Matthew Weber @ 2019-05-06 13:02 UTC (permalink / raw)
  To: buildroot

On Sun, May 5, 2019 at 2:53 PM Pierre-Jean Texier <pjtexier@koncepto.io> wrote:
>
> Libubootenv is a library that provides a hardware independent
> way to access to U-Boot environment.
>
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
>  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 <pjtexier@koncepto.io>
> +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 <pjtexier@koncepto.io>
> +[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.

Curious why this project isn't just upstreaming changes to the u-boot
project.  I.e. Then the uboot-tools package already in Buildroot would
provide the latest u-boot tools with those updates.

> +
> +         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))
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 

Matthew Weber | Pr. Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber at collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber at corp.rockwellcollins.com address.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/libubootenv: add new package
  2019-05-06 13:02 ` Matthew Weber
@ 2019-05-06 13:13   ` Pierre-Jean Texier
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre-Jean Texier @ 2019-05-06 13:13 UTC (permalink / raw)
  To: buildroot

Hi, Matthew,

Le 06/05/2019 ? 15:02, Matthew Weber a ?crit?:
> On Sun, May 5, 2019 at 2:53 PM Pierre-Jean Texier <pjtexier@koncepto.io> wrote:
>> Libubootenv is a library that provides a hardware independent
>> way to access to U-Boot environment.
>>
>> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
>> ---
>>   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 <pjtexier@koncepto.io>
>> +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 <pjtexier@koncepto.io>
>> +[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.
> Curious why this project isn't just upstreaming changes to the u-boot
> project.  I.e. Then the uboot-tools package already in Buildroot would
> provide the latest u-boot tools with those updates.
In fact, this is the goal for several reasons:

- Licensing (U-Boot is GPLv2 vs LGPLv2.1 for libubootenv)
- The fw_printenv / fw_setenv tools from U-Boot must be always be built
for exactly the same hardware as the bootloader. Libubootenv is hardware 
independent.
- And so on

For more details, you can read more at [1].

Thanks

Pierre-Jean


[1] 
https://groups.google.com/forum/#!searchin/swupdate/libubootenv%7Csort:date/swupdate/2wcIyfexOro/iADiuQRtBQAJ

>
>> +
>> +         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))
>> --
>> 2.7.4
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
-- 
Koncepto

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/libubootenv: add new package
  2019-05-05 19:52 [Buildroot] [PATCH 1/1] package/libubootenv: add new package Pierre-Jean Texier
  2019-05-06 13:02 ` Matthew Weber
@ 2019-05-20 20:59 ` Thomas Petazzoni
  2019-05-21 16:20   ` Pierre-Jean Texier
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-05-20 20:59 UTC (permalink / raw)
  To: buildroot

Hello,

I have applied your new package to next, after doing a few minor
changes, see below.

First, the canonical title for patches adding a new package is:

	package/libubootenv: new package

On Sun,  5 May 2019 21:52:27 +0200
Pierre-Jean Texier <pjtexier@koncepto.io> wrote:

> Libubootenv is a library that provides a hardware independent
> way to access to U-Boot environment.
> 
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
>  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(+)

You forgot to update the DEVELOPERS file with this new package, so I've
done that.

> 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 <pjtexier@koncepto.io>
> +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 <pjtexier@koncepto.io>
> +[Upstream status: http://patchwork.ozlabs.org/patch/1092851/]

I've replaced this with the actual upstream commit, now that your patch
has been merged upstream.

> 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

It would be nice to ask Stefano Babic if he could add a license file.

> +LIBUBOOTENV_INSTALL_STAGING = YES
> +
> +LIBUBOOTENV_DEPENDENCIES += zlib

= was sufficient, no need for += here.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/libubootenv: add new package
  2019-05-20 20:59 ` Thomas Petazzoni
@ 2019-05-21 16:20   ` Pierre-Jean Texier
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre-Jean Texier @ 2019-05-21 16:20 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

Thanks a lot for all your comments, really appreciated for a first 
package submission.

Le 20/05/2019 ? 22:59, Thomas Petazzoni a ?crit?:
> Hello,
>
> I have applied your new package to next, after doing a few minor
> changes, see below.
>
> First, the canonical title for patches adding a new package is:
>
> 	package/libubootenv: new package
>
> On Sun,  5 May 2019 21:52:27 +0200
> Pierre-Jean Texier <pjtexier@koncepto.io> wrote:
>
>> Libubootenv is a library that provides a hardware independent
>> way to access to U-Boot environment.
>>
>> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
>> ---
>>   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(+)
> You forgot to update the DEVELOPERS file with this new package, so I've
> done that.

Oops, sorry for that, I thought I should send it once the patch was applied.
>
>> 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 <pjtexier@koncepto.io>
>> +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 <pjtexier@koncepto.io>
>> +[Upstream status: http://patchwork.ozlabs.org/patch/1092851/]
> I've replaced this with the actual upstream commit, now that your patch
> has been merged upstream.

Thanks !
>
>> 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
> It would be nice to ask Stefano Babic if he could add a license file.

Sure, I will do !
>
>> +LIBUBOOTENV_INSTALL_STAGING = YES
>> +
>> +LIBUBOOTENV_DEPENDENCIES += zlib
> = was sufficient, no need for += here.

Ok

Another point, I don't know why but it seems, I have I forgot to add 
some dependencies
in the first patch.

In local, my build is fine :

$. ./utils/test-pkg -c libuboot.config -p libubootenv -d 
libubootenv-integration

 ???????????????????????????? br-arm-full [1/6]: OK
 ????????????????? br-arm-cortex-a9-glibc [2/6]: OK
 ?????????????????? br-arm-cortex-m4-full [3/6]: SKIPPED
 ????????????????????????? br-x86-64-musl [4/6]: SKIPPED
 ????????????????????? br-arm-full-static [5/6]: SKIPPED
 ??????????????????????????? sourcery-arm [6/6]: OK
6 builds, 3 skipped, 0 build failed, 0 legal-info failed

I just sent a patch [1], let me know if it's ok for you.

Sorry for that,

Thanks again !

Pierre-Jean

[1] http://patchwork.ozlabs.org/patch/1102919/

>
> Thanks!
>
> Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-21 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-05 19:52 [Buildroot] [PATCH 1/1] package/libubootenv: add new package Pierre-Jean Texier
2019-05-06 13:02 ` Matthew Weber
2019-05-06 13:13   ` Pierre-Jean Texier
2019-05-20 20:59 ` Thomas Petazzoni
2019-05-21 16:20   ` Pierre-Jean Texier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.