swupdate, uboot and fw-utils compatibility

294 views
Skip to first unread message

Paul Guillén

unread,
Mar 2, 2021, 4:34:55 AM3/2/21
to swup...@googlegroups.com

Hi.

 

I hope everybody is well.

 

I have a question regarding swupdate and uboot. I hope you can help me.

 

Is there any incompatibility to use swupdate and uboot fw-utils (fw_printenv and fw_setenv) on a board with different uboot?

Do I have to compile specific uboot fw-utils for an specific swupdate?

 

For instance,

If I have uboot 2013 version installed on an imx6 board. This board normally boot from eMMC.

Uboot and its environment are on SPI NOR memory.

The rootfs is on eMMC memory.

 

Then, I want to update the system on eMMC.

Therefore I’ve compiled swupdate 2016.10 with uboot 2016.01 fw-utils.

 

I run the system from and SD with swupdate 2016 to update the rootfs on emmc and some uboot variables.

But as  I said before I have different uboots on SD and eMMC, also the fw-utils are from uboot 2016.

 

Is there any problem to do this?

 

Thank you so much.

Best regards.

 

Paul Guillén

Stefano Babic

unread,
Mar 2, 2021, 5:42:02 AM3/2/21
to Paul Guillén, swup...@googlegroups.com
Hi Paul,

On 02.03.21 10:34, Paul Guillén wrote:
> Hi.
>
> I hope everybody is well.
>
> I have a question regarding swupdate and uboot. I hope you can help me.
>
> Is there any incompatibility to use swupdate and uboot fw-utils
> (fw_printenv and fw_setenv) on a board with different uboot?
>
> Do I have to compile specific uboot fw-utils for an specific swupdate?
>

http://u-boot.10912.n7.nabble.com/SWUpdate-U-Boot-environment-library-dependency-tt340530.html

You need a specific u-boot-fw-utils for your specific u-boot because
u-boot-fw-utils was not hardware independent. Anyway, u-boot-fw-utils
was replaced since -dunfell with libubootenv, switch to it.

> For instance,
>
> If I have uboot 2013 version

????

I cannot stop myself to get a look at you Company's Website with "Let’s
make it into the history of innovation together.". Be consistent then
and switch to a current U-Boot Version, to libubootenv and current
SWUpdate version.

> installed on an imx6 board. This board
> normally boot from eMMC.
>
> Uboot and its environment are on SPI NOR memory.
>
> The rootfs is on eMMC memory.
>
> Then, I want to update the system on eMMC.
>
> Therefore I’ve compiled swupdate 2016.10 with uboot 2016.01 fw-utils.

????????

No, get SWUpdate 2020.11 - I do not know myself how many fixes were
merged since then. Is it not scary enough to run "git log -p
2016.10..2020.11" ?

>
> I run the system from and SD with swupdate 2016 to update the rootfs on
> emmc and some uboot variables.

You get in big troublt if the emmc boots without a stored environment in
flash and SWUpdate or fw_setenv sets a variable. Board bricked.

>
> But as  I said before I have different uboots on SD and eMMC, also the
> fw-utils are from uboot 2016.
>
> Is there any problem to do this?

I think you already know the answer.

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

Paul Guillén

unread,
Mar 2, 2021, 9:13:53 AM3/2/21
to Stefano Babic, swup...@googlegroups.com
Hi Stefano.

Thank you so much for your fast answer.

You are right, maybe I didn't explain very well. I agree with you to use the latest software version as possible. But sometimes we have to work with a specific uboot for a target, and we don't have the option to update it.

fw-utils modify only the environment, but I wasn't sure if I would use uboot fw-utils from an specific uboot version, on a system with another uboot version. This could generate a problem. The board could become bricked. Is it correct?
It would mean I should use the swupdate with fw-utils compiled from the same source code of uboot installed on the board.

Thank you so much.
Best regards.

-----Mensaje original-----
De: Stefano Babic <sba...@denx.de>
Enviado el: martes, 2 de marzo de 2021 11:42
Para: Paul Guillén <pgui...@matrix.es>; swup...@googlegroups.com
Asunto: Re: [swupdate] swupdate, uboot and fw-utils compatibility

Stefano Babic

unread,
Mar 2, 2021, 9:49:40 AM3/2/21
to Paul Guillén, Stefano Babic, swup...@googlegroups.com
Hi Paul,

On 02.03.21 15:13, Paul Guillén wrote:
> Hi Stefano.
>
> Thank you so much for your fast answer.
>
> You are right, maybe I didn't explain very well.

You did.

> I agree with you to use the latest software version as possible. But sometimes we have to work with a specific uboot for a target, and we don't have the option to update it.

The whole MX6 family is full supported in u-boot - and let me say, I
know what I mean, I am the U-Boot maintainer for i.MX. Of course, you
have to port it from your ancient version, it looks like even before the
switch to Device Tree.

>
> fw-utils modify only the environment, but I wasn't sure if I would use uboot fw-utils from an specific uboot version, on a system with another uboot version. This could generate a problem. The board could become bricked. Is it correct?

It is correct - and your old U-Boot uses maybe just one copy of the
environment, that is CONFIG_ENV_REDUND is not set. Then your board is
not power-cut safe at all and you need to update U-Boot in any case.

> It would mean I should use the swupdate with fw-utils compiled from the same source code of uboot installed on the board.

You should use SWUpdate with libubootenv, because you can configure it
with a file instead of using a compiled environment - please read
accurately the link I sent previously for the details.

Best regards,
Stefano Babic

Paul Guillén

unread,
Mar 2, 2021, 10:02:23 AM3/2/21
to Stefano Babic, swup...@googlegroups.com
Hi Stefano.

Everything clear.
Thank you so much for the support.

Best regards
Paul Guillén


-----Mensaje original-----
De: Stefano Babic <sba...@denx.de>
Enviado el: martes, 2 de marzo de 2021 15:50
Para: Paul Guillén <pgui...@matrix.es>; Stefano Babic <sba...@denx.de>; swup...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages