* [PATCH 0/2] libubootenv improvements @ 2025-06-23 7:35 AdrianF 2025-06-23 7:35 ` [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env AdrianF 2025-06-23 7:35 ` [PATCH 2/2] libubootenv: do not drop debug symbols AdrianF 0 siblings, 2 replies; 6+ messages in thread From: AdrianF @ 2025-06-23 7:35 UTC (permalink / raw) To: openembedded-core; +Cc: stefano.babic, Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> This series tries to clean up the handling of the configuration files which are required by the libubootenv. Further patches (going to meta-yocto-bsp) will provide a complete example for the beaglebone-yocto machine which just works with OE-core and meta-yocto-bsp. Adrian Freihofer (2): libubootenv: add rrecommends from libubootenv to u-boot-env libubootenv: do not drop debug symbols meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.49.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env 2025-06-23 7:35 [PATCH 0/2] libubootenv improvements AdrianF @ 2025-06-23 7:35 ` AdrianF 2025-06-23 8:17 ` [OE-core] " Antonin Godard 2025-06-23 7:35 ` [PATCH 2/2] libubootenv: do not drop debug symbols AdrianF 1 sibling, 1 reply; 6+ messages in thread From: AdrianF @ 2025-06-23 7:35 UTC (permalink / raw) To: openembedded-core; +Cc: stefano.babic, Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> Without /etc/fw_env.config, the fw_printenv and fw_setenv utilities fail with an error, as they cannot locate the U-Boot environment. This limitation also affects any application linking against libubootenv. To address this, add an RRECOMMENDS from libubootenv to the u-boot-env package, which provides the necessary configuration files. While this could be an RDEPENDS, using RRECOMMENDS allows users with custom implementations to more easily override the dependency if needed. Some examples suggest bbappending fw_env.config directly to the libubootenv recipe. However, /etc/fw_env.config is machine-specific, whereas libubootenv is not. Additionally, the default U-Boot environment, which can be used by libubootenv, is also provided by the machine-specific u-boot-env package. Therefore, it is preferable to provide fw_env.config via the machine-specific u-boot recipe. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb index 35678e2361f..a193872b83b 100644 --- a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb @@ -21,4 +21,8 @@ DEPENDS = "zlib libyaml" PROVIDES += "u-boot-fw-utils" RPROVIDES:${PN}-bin += "u-boot-fw-utils" +# libubootenv needs /etc/fw_env.config and /etc/u-boot-initial-env configuration +# files which are usually provided by the MACHINE specific u-boot-env package +RRECOMMENDS:${PN} += "u-boot-env" + BBCLASSEXTEND = "native" -- 2.49.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env 2025-06-23 7:35 ` [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env AdrianF @ 2025-06-23 8:17 ` Antonin Godard 2025-06-23 11:53 ` Antonin Godard 0 siblings, 1 reply; 6+ messages in thread From: Antonin Godard @ 2025-06-23 8:17 UTC (permalink / raw) To: adrian.freihofer, openembedded-core; +Cc: stefano.babic On Mon Jun 23, 2025 at 9:35 AM CEST, Adrian Freihofer via lists.openembedded.org wrote: > From: Adrian Freihofer <adrian.freihofer@siemens.com> > > Without /etc/fw_env.config, the fw_printenv and fw_setenv utilities fail > with an error, as they cannot locate the U-Boot environment. > This limitation also affects any application linking against > libubootenv. To address this, add an RRECOMMENDS from libubootenv to the > u-boot-env package, which provides the necessary configuration files. > > While this could be an RDEPENDS, using RRECOMMENDS allows users with > custom implementations to more easily override the dependency if needed. > > Some examples suggest bbappending fw_env.config directly to the > libubootenv recipe. However, /etc/fw_env.config is machine-specific, > whereas libubootenv is not. Additionally, the default U-Boot > environment, which can be used by libubootenv, is also provided by the > machine-specific u-boot-env package. Therefore, it is preferable to > provide fw_env.config via the machine-specific u-boot recipe. > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > --- > meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb > index 35678e2361f..a193872b83b 100644 > --- a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb > +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb > @@ -21,4 +21,8 @@ DEPENDS = "zlib libyaml" > PROVIDES += "u-boot-fw-utils" > RPROVIDES:${PN}-bin += "u-boot-fw-utils" > > +# libubootenv needs /etc/fw_env.config and /etc/u-boot-initial-env configuration > +# files which are usually provided by the MACHINE specific u-boot-env package > +RRECOMMENDS:${PN} += "u-boot-env" > + > BBCLASSEXTEND = "native" Hi, I think this patch produces the following warnings: stdio: WARNING: Nothing RPROVIDES 'u-boot-env-native' (but virtual:native:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) stdio: WARNING: Nothing RPROVIDES 'libubootenv-native' (but virtual:native:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) stdio: WARNING: Nothing RPROVIDES 'libubootenv-dev-native' (but virtual:native:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) Happens on `bitbake universe -c fetch -k`. Can you have a look? Full log: https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2765656/raw_inline Antonin -- Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env 2025-06-23 8:17 ` [OE-core] " Antonin Godard @ 2025-06-23 11:53 ` Antonin Godard 0 siblings, 0 replies; 6+ messages in thread From: Antonin Godard @ 2025-06-23 11:53 UTC (permalink / raw) To: adrian.freihofer, openembedded-core; +Cc: stefano.babic On Mon Jun 23, 2025 at 10:17 AM CEST, Antonin Godard wrote: > On Mon Jun 23, 2025 at 9:35 AM CEST, Adrian Freihofer via lists.openembedded.org wrote: >> From: Adrian Freihofer <adrian.freihofer@siemens.com> >> >> Without /etc/fw_env.config, the fw_printenv and fw_setenv utilities fail >> with an error, as they cannot locate the U-Boot environment. >> This limitation also affects any application linking against >> libubootenv. To address this, add an RRECOMMENDS from libubootenv to the >> u-boot-env package, which provides the necessary configuration files. >> >> While this could be an RDEPENDS, using RRECOMMENDS allows users with >> custom implementations to more easily override the dependency if needed. >> >> Some examples suggest bbappending fw_env.config directly to the >> libubootenv recipe. However, /etc/fw_env.config is machine-specific, >> whereas libubootenv is not. Additionally, the default U-Boot >> environment, which can be used by libubootenv, is also provided by the >> machine-specific u-boot-env package. Therefore, it is preferable to >> provide fw_env.config via the machine-specific u-boot recipe. >> >> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> >> --- >> meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb >> index 35678e2361f..a193872b83b 100644 >> --- a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb >> +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb >> @@ -21,4 +21,8 @@ DEPENDS = "zlib libyaml" >> PROVIDES += "u-boot-fw-utils" >> RPROVIDES:${PN}-bin += "u-boot-fw-utils" >> >> +# libubootenv needs /etc/fw_env.config and /etc/u-boot-initial-env configuration >> +# files which are usually provided by the MACHINE specific u-boot-env package >> +RRECOMMENDS:${PN} += "u-boot-env" >> + >> BBCLASSEXTEND = "native" > > Hi, > > I think this patch produces the following warnings: > > stdio: WARNING: Nothing RPROVIDES 'u-boot-env-native' (but virtual:native:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) > stdio: WARNING: Nothing RPROVIDES 'libubootenv-native' (but virtual:native:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) > stdio: WARNING: Nothing RPROVIDES 'libubootenv-dev-native' (but virtual:native:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) > > Happens on `bitbake universe -c fetch -k`. > > Can you have a look? > > Full log: > https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2765656/raw_inline Also triggers the following errors I believe: ERROR: Nothing RPROVIDES 'lib32-u-boot-env' (but virtual:multilib:lib32:/srv/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) u-boot RPROVIDES lib32-u-boot-env but was skipped: PREFERRED_PROVIDER_virtual/lib32-bootloader set to lib32-u-boot, not u-boot NOTE: Runtime target 'lib32-u-boot-env' is unbuildable, removing... Missing or unbuildable dependency chain was: ['lib32-u-boot-env'] ERROR: Nothing RPROVIDES 'lib32-libubootenv-dev' (but virtual:multilib:lib32:/srv/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'lib32-libubootenv-dev' NOTE: Runtime target 'lib32-libubootenv-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['lib32-libubootenv-dev'] ERROR: Nothing RPROVIDES 'lib32-libubootenv' (but virtual:multilib:lib32:/srv/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'lib32-libubootenv' NOTE: Runtime target 'lib32-libubootenv' is unbuildable, removing... Missing or unbuildable dependency chain was: ['lib32-libubootenv'] ERROR: Nothing RPROVIDES 'u-boot-env' (but /srv/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) u-boot RPROVIDES u-boot-env but was skipped: We shouldn't have multilib variants for u-boot u-boot RPROVIDES u-boot-env but was skipped: PREFERRED_PROVIDER_virtual/lib32-bootloader set to lib32-u-boot, not u-boot NOTE: Runtime target 'u-boot-env' is unbuildable, removing... Missing or unbuildable dependency chain was: ['u-boot-env'] ERROR: Nothing RPROVIDES 'libubootenv' (but /srv/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'libubootenv' NOTE: Runtime target 'libubootenv' is unbuildable, removing... Missing or unbuildable dependency chain was: ['libubootenv'] ERROR: Nothing RPROVIDES 'libubootenv-dev' (but /srv/pokybuild/yocto-worker/qemux86-world-alt/build/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'libubootenv-dev' NOTE: Runtime target 'libubootenv-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['libubootenv-dev'] https://autobuilder.yoctoproject.org/valkyrie/#/builders/17/builds/1742 Antonin -- Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] libubootenv: do not drop debug symbols 2025-06-23 7:35 [PATCH 0/2] libubootenv improvements AdrianF 2025-06-23 7:35 ` [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env AdrianF @ 2025-06-23 7:35 ` AdrianF 2025-06-23 8:15 ` Stefano Babic 1 sibling, 1 reply; 6+ messages in thread From: AdrianF @ 2025-06-23 7:35 UTC (permalink / raw) To: openembedded-core; +Cc: stefano.babic, Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> Usually the debug symbols are split into a libubootenv-dbg package. Dropping them already at compile time is not needed and causes problems when debugging libubootenv. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb index a193872b83b..4da9c44c921 100644 --- a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb @@ -15,8 +15,6 @@ SRCREV = "5507339628b5caf244e1ff9d58cb3fa534b16beb" inherit cmake lib_package -EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" - DEPENDS = "zlib libyaml" PROVIDES += "u-boot-fw-utils" RPROVIDES:${PN}-bin += "u-boot-fw-utils" -- 2.49.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] libubootenv: do not drop debug symbols 2025-06-23 7:35 ` [PATCH 2/2] libubootenv: do not drop debug symbols AdrianF @ 2025-06-23 8:15 ` Stefano Babic 0 siblings, 0 replies; 6+ messages in thread From: Stefano Babic @ 2025-06-23 8:15 UTC (permalink / raw) To: AdrianF, openembedded-core Hi Adrian, On 6/23/25 09:35, AdrianF wrote: > From: Adrian Freihofer <adrian.freihofer@siemens.com> > > Usually the debug symbols are split into a libubootenv-dbg package. > Dropping them already at compile time is not needed and causes problems > when debugging libubootenv. > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > --- > meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb > index a193872b83b..4da9c44c921 100644 > --- a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb > +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb > @@ -15,8 +15,6 @@ SRCREV = "5507339628b5caf244e1ff9d58cb3fa534b16beb" > > inherit cmake lib_package > > -EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" > - > DEPENDS = "zlib libyaml" > PROVIDES += "u-boot-fw-utils" > RPROVIDES:${PN}-bin += "u-boot-fw-utils" I fear this is not enough because it has a side effect. MAKE_BUILD_TYPE is set here not to drop the debug files, but to avoid debug output. Cmake sets automatically NDEBUG if CMAKE_BUILD_TYPE=Release, and this is the goal of the EXTRA_OECMAKE because NDEBUG is used in code. The change here will break user's scripts. Regards, Stefano ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-06-24 12:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-23 7:35 [PATCH 0/2] libubootenv improvements AdrianF 2025-06-23 7:35 ` [PATCH 1/2] libubootenv: add rrecommends from libubootenv to u-boot-env AdrianF 2025-06-23 8:17 ` [OE-core] " Antonin Godard 2025-06-23 11:53 ` Antonin Godard 2025-06-23 7:35 ` [PATCH 2/2] libubootenv: do not drop debug symbols AdrianF 2025-06-23 8:15 ` Stefano Babic
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox