package/swupdate: add libubootenv as dependency
PATCH v2 1/1 package/swupdate: add libubootenv as dependency
when using BR2_PER_PACKAGE_DIRECTORIES and configuring swupdate to use uboot the build fails because libubootenv is not a dependency.
Fixes:bootloader/uboot.c:23:10: fatal error: libuboot.h: No such file or directory
23 | #include <libuboot.h>
---
v2:
- exchange "buildroot" with "uboot" in the description
observed on buildroot 2022.08.1 so I guess older version might also need the fix.
CC: Peter Korsgaard <[email protected]>
--- package/swupdate/swupdate.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/swupdate/swupdate.mk +4 -0
@@ -81,6 +81,10 @@ else SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=n endif +ifeq ($(BR2_PACKAGE_LIBUBOOTENV),y) +SWUPDATE_DEPENDENCIES += libubootenv +endif + ifeq ($(BR2_PACKAGE_LIBURIPARSER),y) SWUPDATE_DEPENDENCIES += liburiparser SWUPDATE_MAKE_ENV += HAVE_URIPARSER=y
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Michael,
Quoted 8 lines · On Thu, 10 Nov 2022 11:23:12 +0100 Michael Nosthoff via buildroot…
when using
BR2_PER_PACKAGE_DIRECTORIESand configuring swupdate to use uboot the build fails because libubootenv is not a dependency.Fixes:
bootloader/uboot.c:23:10: fatal error:libuboot.h: No such file or directory
23 | #include <libuboot.h>Signed-off-by Michael Nosthoff <[email protected]>
Could you provide a bit more details? Your change is only making sure libubootenv is built before swupdate *if* libubootenv is eanbled in the Buildroot configuration. This would mean libubootenv is an optional dependency of swupdate.
But your commit log seems to imply otherwise.
We are not seeing any build errors on swupdate in our autobuilders. Could you provide an example Buildroot configuration that exhibits the issue?
Thanks
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Quoted 12 lines · Thomas Petazzoni
Hello Michael,
Quoted 7 lines · On Thu, 10 Nov 2022 11:23:12 +0100 Michael Nosthoff via buildroot…
when using
BR2_PER_PACKAGE_DIRECTORIESand configuring swupdate to use uboot the build fails because libubootenv is not a dependency.Fixes:
bootloader/uboot.c:23:10: fatal error:libuboot.h: No such file or directory
23 | #include <libuboot.h>
Quoted 8 lines
Quoted 1 line
Signed-off-by Michael Nosthoff <[email protected]>Could you provide a bit more details? Your change is only making sure libubootenv is built before swupdate *if* libubootenv is eanbled in the Buildroot configuration. This would mean libubootenv is an optional dependency of swupdate.
But your commit log seems to imply otherwise.
(I just noticed this is also broken when building without PPD if libubootenv is not accidentially built before swupdate)
swupdate has many optional dependencies like libgpiod, libcurl, zstd, zlib (see it's Config.in description). All off them are not configurable from the buildroot kconfig but from the swupdate config (see make swupdate-menuconfig). So for all other mentioned optional dependencies there is already the "if available depend on it" switch set but not for libubootenv.
(Interestingly most of the other dependencies also have a "HAVE_*" configure flag when building swupdate. For libubootenv I didn't see one.)
To reproduce you just need to add
CONFIG_UBOOT=yCONFIG_BOOTLOADER_DEFAULT_NONE=y
to package/swupdate/swupdate.config an try to build swupdate.
Quoted 4 lines
We are not seeing any build errors on swupdate in our autobuilders. Could you provide an example Buildroot configuration that exhibits the issue?
Are the autobuilders trying different swupdate-defconfigs? Then this should turn up...
Regards,
Michael
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 17 lines · Michael Nosthoff via buildroot
Hi Thomas,
Quoted 13 lines · Thomas Petazzoni
Hello Michael,
Quoted 8 lines · On Thu, 10 Nov 2022 11:23:12 +0100 Michael Nosthoff via buildroot…
when using
BR2_PER_PACKAGE_DIRECTORIESand configuring swupdate to use uboot the build fails because libubootenv is not a dependency.Fixes:
bootloader/uboot.c:23:10: fatal error:libuboot.h: No such file or directory23 | #include <libuboot.h>Signed-off-by Michael Nosthoff <[email protected]>
I rewrote the commit message completely, taking into account the discussion
below, and applied to master, thanks.
Quoted 10 lines
Quoted 7 lines
Could you provide a bit more details? Your change is only making sure libubootenv is built before swupdate *if* libubootenv is eanbled in the Buildroot configuration. This would mean libubootenv is an optional dependency of swupdate.
But your commit log seems to imply otherwise.
(I just noticed this is also broken when building without PPD if libubootenv is not accidentially built before swupdate)
Quoted 7 lines
swupdate has many optional dependencies like libgpiod, libcurl, zstd, zlib (see it's Config.in description). All off them are not configurable from the buildroot kconfig but from the swupdate config (see make swupdate-menuconfig). So for all other mentioned optional dependencies there is already the "if available depend on it" switch set but not for libubootenv.
(Interestingly most of the other dependencies also have a "HAVE_*" configure flag when building swupdate. For libubootenv I didn't see one.)
I think that can be considered a bug in swupdate. It would be nice to add aHAVE_LIBUBOOTENV and send it upstream. CONFIG_UBOOT should only be visible if HAVE_LIBUBOOTENV is set.
Quoted 5 lines
To reproduce you just need to add
CONFIG_UBOOT=yCONFIG_BOOTLOADER_DEFAULT_NONE=y
The second one is not even needed, simply CONFIG_UBOOT=y is enough.
Quoted 9 lines
to
package/swupdate/swupdate.configan try to build swupdate.Quoted 4 lines
We are not seeing any build errors on swupdate in our autobuilders. Could you provide an example Buildroot configuration that exhibits the issue?
Are the autobuilders trying different swupdate-defconfigs? Then this should turn up...
No, they only use the default configuration. It would be nice indeed to have
some randomisation of the configuration used by various kconfig packages, but that is going to be extremely difficult to implement in practice.
Regards,
Arnout
Quoted 8 lines
Regards,
Michael_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 12 lines · Michael Nosthoff via buildroot
Hi Thomas,
Quoted 8 lines · Thomas Petazzoni
Hello Michael,
Quoted 3 lines · On Thu, 10 Nov 2022 11:23:12 +0100 Michael Nosthoff via buildroot…
when using
BR2_PER_PACKAGE_DIRECTORIESand configuring swupdate to use uboot the build fails because libubootenv is not a dependency.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Fixes:
bootloader/uboot.c:23:10: fatal error:libuboot.h: No such file or directory 23 | #include <libuboot.h>Signed-off-by Michael Nosthoff <[email protected]>I rewrote the commit message completely, taking into account the discussion below, and applied to master, thanks.
Committed to 2022.08.x and 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot