Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/swupdate: add libubootenv as dependency
@ 2022-11-10 10:23 Michael Nosthoff via buildroot
  2022-11-12 20:32 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Nosthoff via buildroot @ 2022-11-10 10:23 UTC (permalink / raw)
  To: buildroot; +Cc: Jörg Krause

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>

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---

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 <peter@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 bfc161d490..ed0c1e56a8 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -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
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/swupdate: add libubootenv as dependency
  2022-11-10 10:23 [Buildroot] [PATCH v2] package/swupdate: add libubootenv as dependency Michael Nosthoff via buildroot
@ 2022-11-12 20:32 ` Thomas Petazzoni via buildroot
  2022-11-13 11:56   ` Michael Nosthoff via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-12 20:32 UTC (permalink / raw)
  To: Michael Nosthoff via buildroot

Hello Michael,

On Thu, 10 Nov 2022 11:23:12 +0100
Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:

> 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>
> 
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot]  [PATCH v2] package/swupdate:  add libubootenv as dependency
  2022-11-12 20:32 ` Thomas Petazzoni via buildroot
@ 2022-11-13 11:56   ` Michael Nosthoff via buildroot
  2022-11-24 12:36     ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Nosthoff via buildroot @ 2022-11-13 11:56 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Michael Nosthoff via buildroot

Hi Thomas,

On Saturday, November 12, 2022 21:32 CET, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello Michael,
> 
> On Thu, 10 Nov 2022 11:23:12 +0100
> Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
> 
> > 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>
> > 
> > Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
> 
> 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=y
CONFIG_BOOTLOADER_DEFAULT_NONE=y

to package/swupdate/swupdate.config an try to build swupdate.

> 
> 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/swupdate: add libubootenv as dependency
  2022-11-13 11:56   ` Michael Nosthoff via buildroot
@ 2022-11-24 12:36     ` Arnout Vandecappelle
  2022-11-27 20:22       ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2022-11-24 12:36 UTC (permalink / raw)
  To: Michael Nosthoff, Thomas Petazzoni; +Cc: Michael Nosthoff via buildroot



On 13/11/2022 12:56, Michael Nosthoff via buildroot wrote:
> Hi Thomas,
> 
> On Saturday, November 12, 2022 21:32 CET, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
>> Hello Michael,
>>
>> On Thu, 10 Nov 2022 11:23:12 +0100
>> Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
>>
>>> 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>
>>>
>>> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>

  I rewrote the commit message completely, taking into account the discussion 
below, and applied to master, thanks.


>>
>> 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.)

  I think that can be considered a bug in swupdate. It would be nice to add a 
HAVE_LIBUBOOTENV and send it upstream. CONFIG_UBOOT should only be visible if 
HAVE_LIBUBOOTENV is set.

> 
> To reproduce you just need to add
> 
> CONFIG_UBOOT=y
> CONFIG_BOOTLOADER_DEFAULT_NONE=y

  The second one is not even needed, simply CONFIG_UBOOT=y is enough.

> 
> to package/swupdate/swupdate.config an try to build swupdate.
> 
>>
>> 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

> 
> Regards,
> Michael
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/swupdate: add libubootenv as dependency
  2022-11-24 12:36     ` Arnout Vandecappelle
@ 2022-11-27 20:22       ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2022-11-27 20:22 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: Thomas Petazzoni, Michael Nosthoff via buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 13/11/2022 12:56, Michael Nosthoff via buildroot wrote:
 >> Hi Thomas,
 >> On Saturday, November 12, 2022 21:32 CET, Thomas Petazzoni
 >> <thomas.petazzoni@bootlin.com> wrote:
 >> 
 >>> Hello Michael,
 >>> 
 >>> On Thu, 10 Nov 2022 11:23:12 +0100
 >>> Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
 >>> 
 >>>> 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>
 >>>> 
 >>>> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>

 >  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.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-11-27 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 10:23 [Buildroot] [PATCH v2] package/swupdate: add libubootenv as dependency Michael Nosthoff via buildroot
2022-11-12 20:32 ` Thomas Petazzoni via buildroot
2022-11-13 11:56   ` Michael Nosthoff via buildroot
2022-11-24 12:36     ` Arnout Vandecappelle
2022-11-27 20:22       ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox