package/uboot-tools: tools/env/fw_env.h: remove env.h
PATCH 1/2 package/uboot-tools: tools/env/fw_env.h: remove env.h
As reported by Nicolas Carrier on the Buildroot mailing list [1], there is a new build issue while building a program which interacts with the u-boot environment. This program uses the headers of the ubootenv library provided by uboot-tools.
This is an upstream change from uboot [2] adding "#include <env.h>" to fw_env.h. Adding env.h require a board configuration to build.
But only fw_env.h header is installed in the staging directory by uboot-tools package, but since it now include env.h the build is broken because env.h is missing from the staging directory.
It's seems an upstream bug since env_set() is not used in fw_env tool. Nicolas removed env.h from fw_env tool and fixed it's build issue.
This problem is present since uboot v2019.10, so the uboot version present in Buildroot 2020.02 is affected.
It's probably not a problem for upstream uboot but it's a problem for uboot-tools package that build uboot tools without a board configuration for the target.
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6e
--- ...0004-tools-env-fw_env.h-remove-env.h.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch
package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch new file +51 -0
@@ -0,0 +1,51 @@ +From 664ef61e19d6261d8984493b5f22127ec2ad44fc Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sun, 10 May 2020 23:15:32 +0200 +Subject: [PATCH] tools/env/fw_env.h: remove env.h + +As reported by Nicolas Carrier on the Buildroot mailing list [1], +there is a new build issue while building a program which interacts with +the u-boot environment. This program uses the headers of the ubootenv +library provided by uboot-tools. + +This is an upstream change from uboot [2] adding "#include <env.h>" to +fw_env.h. Adding env.h require a board configuration to build. + +But only fw_env.h header is installed in the staging directory by +uboot-tools package, but since it now include env.h the build is broken +because env.h is missing from the staging directory. + +It's seems an upstream bug since env_set() is not used in fw_env tool. + +Adding env.h is an error since it also include compiler.h (and others +uboot internal includes). + +Nicolas removed env.h from fw_env tool and fixed it's build issue. + +This problem is present since uboot v2019.10, so the uboot version +present in Buildroot 2020.02 is affected. + +[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6e + +Reported-by: Nicolas Carrier <[email protected]> +Signed-off-by: Romain Naour <[email protected]> +--- + tools/env/fw_env.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h +index b60fbfc8f8..78c803c944 100644 +--- a/tools/env/fw_env.h ++++ b/tools/env/fw_env.h +@@ -4,7 +4,6 @@ + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + */ + +-#include <env.h> + #include <stdint.h> + + /* +-- +2.25.4 +
Signature · 1 line
2.25.4
PATCH 1/2 package/uboot-tools: tools/env/fw_env.h: remove env.h
Hi,
Le 11/05/2020 ? 23:47, Romain Naour a ?crit?:
Quoted 22 lines
As reported by Nicolas Carrier on the Buildroot mailing list [1], there is a new build issue while building a program which interacts with the u-boot environment. This program uses the headers of the ubootenv library provided by uboot-tools.
This is an upstream change from uboot [2] adding "#include <
env.h>" tofw_env.h. Addingenv.hrequire a board configuration to build.But only
fw_env.hheader is installed in the staging directory by uboot-tools package, but since it now includeenv.hthe build is broken becauseenv.his missing from the staging directory.It's seems an upstream bug since
env_set()is not used infw_envtool. Nicolas removedenv.hfromfw_envtool and fixed it's build issue.This problem is present since uboot v2019.10, so the uboot version present in Buildroot 2020.02 is affected.
It's probably not a problem for upstream uboot but it's a problem for uboot-tools package that build uboot tools without a board configuration for the target.
Quoted 5 lines
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6eReported-by Nicolas Carrier <[email protected]>Signed-off-by Romain Naour <[email protected]>
The patch is now upstream:
https://gitlab.denx.de/u-boot/u-boot/-/commit/2aca8804d8d5f84d2d661e76e8d232c5c12445b5
Best regards,
Romain
Quoted 63 lines
--- ...0004-tools-env-fw_env.h-remove-env.h.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patchpackage/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch new file +51
-0@@ -0,0 +1,51 @@ +From 664ef61e19d6261d8984493b5f22127ec2ad44fc Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sun, 10 May 2020 23:15:32 +0200 +Subject: [PATCH] tools/env/fw_env.h: remove env.h + +As reported by Nicolas Carrier on the Buildroot mailing list [1], +there is a new build issue while building a program which interacts with +the u-boot environment. This program uses the headers of the ubootenv +library provided by uboot-tools. + +This is an upstream change from uboot [2] adding "#include <env.h>" to +fw_env.h. Adding env.h require a board configuration to build. + +But only fw_env.h header is installed in the staging directory by +uboot-tools package, but since it now include env.h the build is broken +because env.h is missing from the staging directory. + +It's seems an upstream bug since env_set() is not used in fw_env tool. + +Adding env.h is an error since it also include compiler.h (and others +uboot internal includes). + +Nicolas removed env.h from fw_env tool and fixed it's build issue. + +This problem is present since uboot v2019.10, so the uboot version +present in Buildroot 2020.02 is affected. + +[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6e + +Reported-by: Nicolas Carrier <[email protected]> +Signed-off-by: Romain Naour <[email protected]> +--- + tools/env/fw_env.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h +index b60fbfc8f8..78c803c944 100644 +--- a/tools/env/fw_env.h ++++ b/tools/env/fw_env.h +@@ -4,7 +4,6 @@ + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + */ + +-#include <env.h> + #include <stdint.h> + + /* +-- +2.25.4 +
PATCH 2/2 support/testing: test_uboot_tools: Add a test building a binary that include fw_env.h
In reply to Romain NaourFrom: Nicolas Carrier <[email protected]>
Nicolas Carrier proposed a package to reproduce the uboot-tools issue he reported [1] with uboot 2020.01 packaged in the Buildroot 2020.02 release.
Add this package to the Buildroot testsuite in order to ckeck in gitlab if fw_env.h doesn't contain any header that require building uboot with a board configuration for the target.
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
--- .../tests/boot/br2-external/uboot-tools/Config.in | 1 + .../boot/br2-external/uboot-tools/external.desc | 1 + .../boot/br2-external/uboot-tools/external.mk | 1 + .../package/uboot-tools-test/Config.in | 6 ++++++ .../package/uboot-tools-test/uboot-env-test.c | 14 ++++++++++++++ .../package/uboot-tools-test/uboot-tools-test.mk | 14 ++++++++++++++ support/testing/tests/boot/test_uboot_tools.py | 15 +++++++++++++++ 7 files changed, 52 insertions(+) create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.desc create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.mk create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk create mode 100644 support/testing/tests/boot/test_uboot_tools.py
support/testing/tests/boot/br2-external/uboot-tools/Config.in new file +1 -0
@@ -0,0 +1 @@ +source "$BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH/package/uboot-tools-test/Config.in"
support/testing/tests/boot/br2-external/uboot-tools/external.desc new file +1 -0
@@ -0,0 +1 @@ +name: UBOOT_TOOLS_TEST
support/testing/tests/boot/br2-external/uboot-tools/external.mk new file +1 -0
@@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH)/package/*/*.mk))
support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_UBOOT_TOOLS_TEST + bool "uboot-tools-test" + select BR2_PACKAGE_UBOOT_TOOLS + help + Test code for fw_env.h inclusion. +
support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Based on http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +*/ + +#include <stdlib.h> +#include <fw_env.h> +#include <stdio.h> + +int main (void ) +{ +puts ("Hello world!" ); + +return EXIT_SUCCESS ; +}
support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# uboot-tools-test +# +################################################################################ + +UBOOT_TOOLS_TEST_DEPENDENCIES = uboot-tools + +define UBOOT_TOOLS_TEST_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lubootenv \ + $(UBOOT_TOOLS_TEST_PKGDIR)/uboot-env-test.c -o $(@D)/uboot-env-test +endef + +$(eval $(generic-package))
support/testing/tests/boot/test_uboot_tools.py new file +15 -0
@@ -0,0 +1,15 @@ + +import infra.basetest + + +class TestUbootToolsEnv(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/boot/br2-external/uboot-tools")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_PACKAGE_UBOOT_TOOLS_TEST=y + """ + + def test_run(self): + pass
Signature · 1 line
2.25.4
PATCH 2/2 support/testing: test_uboot_tools: Add a test building a binary that include fw_env.h
Romain, Nicolas,
On 2020-05-11 23:47 +0200, Romain Naour spake thusly:
Quoted 9 lines
From: Nicolas Carrier <[email protected]>
Nicolas Carrier proposed a package to reproduce the uboot-tools issue he reported [1] with uboot 2020.01 packaged in the Buildroot 2020.02 release.
Add this package to the Buildroot testsuite in order to ckeck in gitlab if
fw_env.hdoesn't contain any header that require building uboot with a board configuration for the target.
Thanks for this test.
However, our runtime infra is there to test that the integration of a package in Buildroot is working as expected, not as a build-test or regression test-suite ofr the upstream packages.
So I've marked that patch as rejected.
Regards,
Yann E. MORIN.
Quoted 122 lines
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
Signed-off-by Romain Naour <[email protected]>Cc Nicolas Carrier <[email protected]>--- .../tests/boot/br2-external/uboot-tools/Config.in | 1 + .../boot/br2-external/uboot-tools/external.desc | 1 + .../boot/br2-external/uboot-tools/external.mk | 1 + .../package/uboot-tools-test/Config.in | 6 ++++++ .../package/uboot-tools-test/uboot-env-test.c | 14 ++++++++++++++ .../package/uboot-tools-test/uboot-tools-test.mk | 14 ++++++++++++++ support/testing/tests/boot/test_uboot_tools.py | 15 +++++++++++++++ 7 files changed, 52 insertions(+) create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.desc create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.mk create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk create mode 100644 support/testing/tests/boot/test_uboot_tools.pysupport/testing/tests/boot/br2-external/uboot-tools/Config.in new file +1
-0@@ -0,0 +1 @@ +source "$BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH/package/uboot-tools-test/Config.in"support/testing/tests/boot/br2-external/uboot-tools/external.desc new file +1
-0@@ -0,0 +1 @@ +name: UBOOT_TOOLS_TESTsupport/testing/tests/boot/br2-external/uboot-tools/external.mk new file +1
-0@@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH)/package/*/*.mk))support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in new file +6
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_UBOOT_TOOLS_TEST + bool "uboot-tools-test" + select BR2_PACKAGE_UBOOT_TOOLS + help + Test code for fw_env.h inclusion. +support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c new file +14
-0@@ -0,0 +1,14 @@ +/* +* Based on http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +*/ + +#include <stdlib.h> +#include <fw_env.h> +#include <stdio.h> + +int main (void ) +{ +puts ("Hello world!" ); + +return EXIT_SUCCESS ; +}support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk new file +14
-0@@ -0,0 +1,14 @@ +################################################################################ +# +# uboot-tools-test +# +################################################################################ + +UBOOT_TOOLS_TEST_DEPENDENCIES = uboot-tools + +define UBOOT_TOOLS_TEST_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lubootenv \ + $(UBOOT_TOOLS_TEST_PKGDIR)/uboot-env-test.c -o $(@D)/uboot-env-test +endef + +$(eval $(generic-package))support/testing/tests/boot/test_uboot_tools.py new file +15
-0@@ -0,0 +1,15 @@ + +import infra.basetest + + +class TestUbootToolsEnv(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/boot/br2-external/uboot-tools")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_PACKAGE_UBOOT_TOOLS_TEST=y + """ + + def test_run(self): + passSignature · 6 lines
2.25.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 support/testing: test_uboot_tools: Add a test building a binary that include fw_env.h
Hi Yann,
Le 26/05/2020 ? 22:59, Yann E. MORIN a ?crit?:
Quoted 13 lines
Romain, Nicolas,
On 2020-05-11 23:47 +0200, Romain Naour spake thusly:
Quoted 9 lines
From: Nicolas Carrier <[email protected]>
Nicolas Carrier proposed a package to reproduce the uboot-tools issue he reported [1] with uboot 2020.01 packaged in the Buildroot 2020.02 release.
Add this package to the Buildroot testsuite in order to ckeck in gitlab if
fw_env.hdoesn't contain any header that require building uboot with a board configuration for the target.
Quoted 5 lines
Thanks for this test.
However, our runtime infra is there to test that the integration of a package in Buildroot is working as expected, not as a build-test or regression test-suite ofr the upstream packages.
Is this patch (or similar) useful for you as maintainer to review/test the issue fixed by the previous patch ?
Maybe it's too much for this small one.
Best regards,
Romain
Quoted 129 lines
So I've marked that patch as rejected.
Regards,
Yann E. MORIN.Quoted 122 lines
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
Signed-off-by Romain Naour <[email protected]>Cc Nicolas Carrier <[email protected]>--- .../tests/boot/br2-external/uboot-tools/Config.in | 1 + .../boot/br2-external/uboot-tools/external.desc | 1 + .../boot/br2-external/uboot-tools/external.mk | 1 + .../package/uboot-tools-test/Config.in | 6 ++++++ .../package/uboot-tools-test/uboot-env-test.c | 14 ++++++++++++++ .../package/uboot-tools-test/uboot-tools-test.mk | 14 ++++++++++++++ support/testing/tests/boot/test_uboot_tools.py | 15 +++++++++++++++ 7 files changed, 52 insertions(+) create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.desc create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.mk create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk create mode 100644 support/testing/tests/boot/test_uboot_tools.pysupport/testing/tests/boot/br2-external/uboot-tools/Config.in new file +1
-0@@ -0,0 +1 @@ +source "$BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH/package/uboot-tools-test/Config.in"support/testing/tests/boot/br2-external/uboot-tools/external.desc new file +1
-0@@ -0,0 +1 @@ +name: UBOOT_TOOLS_TESTsupport/testing/tests/boot/br2-external/uboot-tools/external.mk new file +1
-0@@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH)/package/*/*.mk))support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in new file +6
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_UBOOT_TOOLS_TEST + bool "uboot-tools-test" + select BR2_PACKAGE_UBOOT_TOOLS + help + Test code for fw_env.h inclusion. +support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c new file +14
-0@@ -0,0 +1,14 @@ +/* +* Based on http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +*/ + +#include <stdlib.h> +#include <fw_env.h> +#include <stdio.h> + +int main (void ) +{ +puts ("Hello world!" ); + +return EXIT_SUCCESS ; +}support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk new file +14
-0@@ -0,0 +1,14 @@ +################################################################################ +# +# uboot-tools-test +# +################################################################################ + +UBOOT_TOOLS_TEST_DEPENDENCIES = uboot-tools + +define UBOOT_TOOLS_TEST_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lubootenv \ + $(UBOOT_TOOLS_TEST_PKGDIR)/uboot-env-test.c -o $(@D)/uboot-env-test +endef + +$(eval $(generic-package))support/testing/tests/boot/test_uboot_tools.py new file +15
-0@@ -0,0 +1,15 @@ + +import infra.basetest + + +class TestUbootToolsEnv(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/boot/br2-external/uboot-tools")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_PACKAGE_UBOOT_TOOLS_TEST=y + """ + + def test_run(self): + passSignature · 6 lines
2.25.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/2 support/testing: test_uboot_tools: Add a test building a binary that include fw_env.h
Romain, All,
On 2020-05-26 23:19 +0200, Romain Naour spake thusly:
Quoted 14 lines
Le 26/05/2020 ? 22:59, Yann E. MORIN a ?crit?:
Quoted 13 lines
Romain, Nicolas,
On 2020-05-11 23:47 +0200, Romain Naour spake thusly:
Quoted 9 lines
From: Nicolas Carrier <[email protected]>
Nicolas Carrier proposed a package to reproduce the uboot-tools issue he reported [1] with uboot 2020.01 packaged in the Buildroot 2020.02 release.
Add this package to the Buildroot testsuite in order to ckeck in gitlab if
fw_env.hdoesn't contain any header that require building uboot with a board configuration for the target.
Quoted 8 lines
Quoted 5 lines
Thanks for this test.
However, our runtime infra is there to test that the integration of a package in Buildroot is working as expected, not as a build-test or regression test-suite ofr the upstream packages.
Is this patch (or similar) useful for you as maintainer to review/test the issue fixed by the previous patch ?
No it is not. A test-case that there is a failure without a known fix is interesting to investiogate, but when a fix is known, I won't bother with the test-case, unless the fix smells fishy...
What was important for me was that you pointed at an upstream commit which accepted your patch.
Quoted 1 line
Maybe it's too much for this small one.
Yes.
Note that having a test-cae to prove a point is important, but essentially for upstream.
Thanks! :-)
Regards,
Yann E. MORIN.
Quoted 133 lines
Best regards,
RomainQuoted 129 lines
So I've marked that patch as rejected.
Regards,
Yann E. MORIN.Quoted 122 lines
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
Signed-off-by Romain Naour <[email protected]>Cc Nicolas Carrier <[email protected]>--- .../tests/boot/br2-external/uboot-tools/Config.in | 1 + .../boot/br2-external/uboot-tools/external.desc | 1 + .../boot/br2-external/uboot-tools/external.mk | 1 + .../package/uboot-tools-test/Config.in | 6 ++++++ .../package/uboot-tools-test/uboot-env-test.c | 14 ++++++++++++++ .../package/uboot-tools-test/uboot-tools-test.mk | 14 ++++++++++++++ support/testing/tests/boot/test_uboot_tools.py | 15 +++++++++++++++ 7 files changed, 52 insertions(+) create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.desc create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/external.mk create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c create mode 100644 support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk create mode 100644 support/testing/tests/boot/test_uboot_tools.pysupport/testing/tests/boot/br2-external/uboot-tools/Config.in new file +1
-0@@ -0,0 +1 @@ +source "$BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH/package/uboot-tools-test/Config.in"support/testing/tests/boot/br2-external/uboot-tools/external.desc new file +1
-0@@ -0,0 +1 @@ +name: UBOOT_TOOLS_TESTsupport/testing/tests/boot/br2-external/uboot-tools/external.mk new file +1
-0@@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_UBOOT_TOOLS_TEST_PATH)/package/*/*.mk))support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/Config.in new file +6
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_UBOOT_TOOLS_TEST + bool "uboot-tools-test" + select BR2_PACKAGE_UBOOT_TOOLS + help + Test code for fw_env.h inclusion. +support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-env-test.c new file +14
-0@@ -0,0 +1,14 @@ +/* +* Based on http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +*/ + +#include <stdlib.h> +#include <fw_env.h> +#include <stdio.h> + +int main (void ) +{ +puts ("Hello world!" ); + +return EXIT_SUCCESS ; +}support/testing/tests/boot/br2-external/uboot-tools/package/uboot-tools-test/uboot-tools-test.mk new file +14
-0@@ -0,0 +1,14 @@ +################################################################################ +# +# uboot-tools-test +# +################################################################################ + +UBOOT_TOOLS_TEST_DEPENDENCIES = uboot-tools + +define UBOOT_TOOLS_TEST_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lubootenv \ + $(UBOOT_TOOLS_TEST_PKGDIR)/uboot-env-test.c -o $(@D)/uboot-env-test +endef + +$(eval $(generic-package))support/testing/tests/boot/test_uboot_tools.py new file +15
-0@@ -0,0 +1,15 @@ + +import infra.basetest + + +class TestUbootToolsEnv(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/boot/br2-external/uboot-tools")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_PACKAGE_UBOOT_TOOLS_TEST=y + """ + + def test_run(self): + passSignature · 6 lines
2.25.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Yann E. MORIN
AppliedPATCH 1/2 package/uboot-tools: tools/env/fw_env.h: remove env.h
In reply to Romain NaourRomain, All,
On 2020-05-11 23:47 +0200, Romain Naour spake thusly:
Quoted 22 lines
As reported by Nicolas Carrier on the Buildroot mailing list [1], there is a new build issue while building a program which interacts with the u-boot environment. This program uses the headers of the ubootenv library provided by uboot-tools.
This is an upstream change from uboot [2] adding "#include <
env.h>" tofw_env.h. Addingenv.hrequire a board configuration to build.But only
fw_env.hheader is installed in the staging directory by uboot-tools package, but since it now includeenv.hthe build is broken becauseenv.his missing from the staging directory.It's seems an upstream bug since
env_set()is not used infw_envtool. Nicolas removedenv.hfromfw_envtool and fixed it's build issue.This problem is present since uboot v2019.10, so the uboot version present in Buildroot 2020.02 is affected.
It's probably not a problem for upstream uboot but it's a problem for uboot-tools package that build uboot tools without a board configuration for the target.
Quoted 5 lines
[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html
[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6eReported-by Nicolas Carrier <[email protected]>Signed-off-by Romain Naour <[email protected]>
Applied to master, thanks.
I've just added the URL to the upstream commit.
Regards,
Yann E. MORIN.
Quoted 69 lines
--- ...0004-tools-env-fw_env.h-remove-env.h.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patchpackage/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch new file +51
-0@@ -0,0 +1,51 @@ +From 664ef61e19d6261d8984493b5f22127ec2ad44fc Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sun, 10 May 2020 23:15:32 +0200 +Subject: [PATCH] tools/env/fw_env.h: remove env.h + +As reported by Nicolas Carrier on the Buildroot mailing list [1], +there is a new build issue while building a program which interacts with +the u-boot environment. This program uses the headers of the ubootenv +library provided by uboot-tools. + +This is an upstream change from uboot [2] adding "#include <env.h>" to +fw_env.h. Adding env.h require a board configuration to build. + +But only fw_env.h header is installed in the staging directory by +uboot-tools package, but since it now include env.h the build is broken +because env.h is missing from the staging directory. + +It's seems an upstream bug since env_set() is not used in fw_env tool. + +Adding env.h is an error since it also include compiler.h (and others +uboot internal includes). + +Nicolas removed env.h from fw_env tool and fixed it's build issue. + +This problem is present since uboot v2019.10, so the uboot version +present in Buildroot 2020.02 is affected. + +[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6e + +Reported-by: Nicolas Carrier <[email protected]> +Signed-off-by: Romain Naour <[email protected]> +--- + tools/env/fw_env.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h +index b60fbfc8f8..78c803c944 100644 +--- a/tools/env/fw_env.h ++++ b/tools/env/fw_env.h +@@ -4,7 +4,6 @@ + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + */ + +-#include <env.h> + #include <stdint.h> + + /* +-- +2.25.4 +Signature · 6 lines
2.25.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'