swupdate not updating bootenv

474 views
Skip to first unread message

ltke...@gmail.com

unread,
Aug 10, 2018, 11:25:53 AM8/10/18
to swupdate
I am running swupdate from the Morty branch of Yocto on my board. I am finding that swupdate is not updating bootloader environmental variables I specify via the sw-description:

i.e.

bootenv: (
{
name = "myvariable1";
value = "01234";
},
{
name = "myvariable2";
value = "56789";
}
);

I do have u-boot-fw-utils installed and configured correctly and can manually set and read variables in Linux and u-boot successfully via fw_setenv/fw_printenv. My update image runs, but it does not set the variables. What am I missing here? Is there some additional config or recipe directive I need to add? My update image recipe is based on the swupdate-image one from Morty.

Something curious as well, if I remove u-boot-fw-utils from my userspace, swupdate will complain that it can't find the fw_env.config which must mean it is checking for that at least.

Somebody else mentioned here they were having similar trouble in the final post:
https://groups.google.com/forum/#!topic/swupdate/yZNlV7Uc-jA

Stefano Babic

unread,
Aug 10, 2018, 11:36:02 AM8/10/18
to ltke...@gmail.com, swupdate
Hi Ltkenbo0,

On 10/08/2018 17:25, ltke...@gmail.com wrote:
> I am running swupdate from the Morty branch of Yocto on my board. I am finding that swupdate is not updating bootloader environmental variables I specify via the sw-description:
>
> i.e.
>
> bootenv: (
> {
> name = "myvariable1";
> value = "01234";
> },
> {
> name = "myvariable2";
> value = "56789";
> }
> );
>

Whci version are you running ? The generic bootloader interface was
introduce in commit b3943a507273e2f2d9c6e6d9b8517e840cda35fb, that means
after 2017.04-rc2. And there is not this version in official -morty.

Use "u-boot" instead of "bootenv".


> I do have u-boot-fw-utils installed and configured correctly and can manually set and read variables in Linux and u-boot successfully via fw_setenv/fw_printenv. My update image runs, but it does not set the variables. What am I missing here? Is there some additional config or recipe directive I need to add? My update image recipe is based on the swupdate-image one from Morty.

See above.

>
> Something curious as well, if I remove u-boot-fw-utils from my userspace, swupdate will complain that it can't find the fw_env.config which must mean it is checking for that at least.
>

SWUpdate sets the variable "recovery_status" to indicate a transaction.
If you power-off your system during an update and checks the variables
in U-Boot, you should see this variable. If it is set, it means that
SWUpdate is able to set variables but your sw-description is wrong (see
above).

> Somebody else mentioned here they were having similar trouble in the final post:
> https://groups.google.com/forum/#!topic/swupdate/yZNlV7Uc-jA
>

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

ltke...@gmail.com

unread,
Aug 10, 2018, 12:00:40 PM8/10/18
to swupdate

Hi Stefano,

I am running v2017.1.0 - thanks for the quick response I will try these things.

ltke...@gmail.com

unread,
Aug 10, 2018, 12:17:26 PM8/10/18
to swupdate
This worked, thanks Stefano. FYI, the syntax is "uboot" not "u-boot." Come to think of it I did see something regarding this in the docs "For backward compatibility with previously built .swu images, the “uboot” group name is still supported as an alias. However, its usage is deprecated."

Thanks again!
Reply all
Reply to author
Forward
0 new messages