[Buildroot] [git commit branch/2022.02.x] package/swupdate: add libubootenv as optional dependency

Peter Korsgaard peter at korsgaard.com
Sun Nov 27 20:08:21 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=cd4658b25ea54c2e5c0e066623ca1b6d6a2b0259
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x

If the swupdate configuration contains CONFIG_UBOOT=y it uses
libubootenv to access the U-Boot environment.

We don't have Buildroot config options for all the different optional
dependencies of swupdate, instead we rely on the user to select the
appropriate packages and simply add the dependency in the .mk file. Do
this for libubootenv as well. swupdate doesn't have anything like
HAVE_LIBUBOOTENV, it just assumes libubootenv is available.

Fixes:
bootloader/uboot.c:23:10: fatal error: libuboot.h: No such file or directory
   23 | #include <libuboot.h>

Note that libubootenv is normally built before swupdate (alphabetical
ordering), so the error only occrus with BR2_PER_PACKAGE_DIRECTORIES or
when building swupdate directly.

Note that the autobuilders don't have this error, because they only
build swupdate with a default configuration that doesn't have U-Boot
support.

Signed-off-by: Michael Nosthoff <buildroot at heine.tech>
Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
(cherry picked from commit a11b36089b34dcf0c1b90835a436f50efec3d8fb)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/swupdate/swupdate.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 5917c93f6a..012e64f71f 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -88,6 +88,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



More information about the buildroot mailing list