[meta-swupdate][PATCH] libubootenv: remove u-boot-default-env from RRECOMENDS

884 views
Skip to first unread message

Artem Panfilov

unread,
Feb 1, 2021, 9:54:27 AM2/1/21
to swup...@googlegroups.com, Artem Panfilov
This patch fixes the issue with missing u-boot-default-env in OE-Core.
The default environment (u-boot-default-env) was introduced in dunfell.
(From OE-Core rev: 4882a93566f2ef24787777d33950f12a9cc5db4e)

Signed-off-by: Artem Panfilov <panfilo...@gmail.com>
---
recipes-bsp/libubootenv/libubootenv_0.3.1.bb | 2 --
1 file changed, 2 deletions(-)

diff --git a/recipes-bsp/libubootenv/libubootenv_0.3.1.bb b/recipes-bsp/libubootenv/libubootenv_0.3.1.bb
index 613e316..c47c945 100644
--- a/recipes-bsp/libubootenv/libubootenv_0.3.1.bb
+++ b/recipes-bsp/libubootenv/libubootenv_0.3.1.bb
@@ -25,6 +25,4 @@ RPROVIDES_${PN}-bin += "u-boot-fw-utils"

PACKAGE_ARCH = "${MACHINE_ARCH}"

-RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
-
BBCLASSEXTEND = "native"
--
2.25.1

Stefano Babic

unread,
Feb 1, 2021, 11:15:32 AM2/1/21
to Artem Panfilov, swup...@googlegroups.com
Hi Artem,
Well, you have not defined for which branch you ask to apply this.

Anyway, even if what you stated in the commit message is correct, thsi
patch hides the cause instead of fix it. In fact, SWUpdate does not
support anymore the old u-boot-fw-utils, but just libubootenv, whose
recipe was added to older meta-swupdate branches (thud, zeus). The
correct fix is to fix u-boot to export the initial environment as done
starting from dunfell, but this cannot be done satisfactory in
meta-swupdate due to the large number of different versions in BSPs for
u-boot and due to the forks created by some verndors (u-boot-<vendorname>).

The fix for these branches (thud, zeus) can be easier done in own layer
with a .bbappend, adding /etc/u-boot-initial-env to rootfs and providing
u-boot-default-env.

The patch here has the bad side effect on the target that bricks the
board if it is started without any environment in flash, and you have
even not any advise what happen - you get at least a build error now,
and you decide yourself how to fix it.

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

Topper

unread,
Mar 18, 2022, 7:41:12 AM3/18/22
to swupdate
I'm also switching to latest thud branch commit and face same error.
If I understood properly we need to make in own layer .bbapend to change libubootenv_0.3.1.bb
Is that right way

libubootenv_%d.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/swupdate:"
SRC_URI = "file://u-boot-initial-env"

PROVIDES += "/etc/u-boot-default-env"
RRECOMMENDS_${PN}-bin_append_class-target = "/etc/u-boot-default-env"

do_install() {
    install -m 0666 u-boot-initial-env ${D}/etc/u-boot-default-env
}

in ../swupdate/u-boot-initial-env is initial u-boot env printed from working board (dart-mx6) with printenv

If that's the way I'm still facing the error:
ERROR: Nothing RPROVIDES 'u-boot-default-env/etc/u-boot-default-env'
NOTE: Runtime target 'u-boot-default-env/etc/u-boot-default-env' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['u-boot-default-env/etc/u-boot-default-env']
NOTE: Runtime target 'swupdate' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['swupdate', 'libubootenv', 'u-boot-default-env/etc/u-boot-default-env']

But such provider missing in Thud branch ?

Topper

unread,
Mar 18, 2022, 7:44:40 AM3/18/22
to swupdate
Copied old commit of libubootenv_%d.bbappend, actual content is:

FILESEXTRAPATHS_prepend := "${THISDIR}/swupdate:"
SRC_URI = "file://u-boot-initial-env"

PROVIDES = " u-boot-default-env "

do_install() {
    install -m 0666 u-boot-initial-env ${D}${sysconfdir}/u-boot-default-env
}

Reply all
Reply to author
Forward
0 new messages