Dear Ying-Chun Liu,

In message <20220125135535.224061-1-grandp...@gmail.com> you wrote:
>
> I've implemented A/B firmware update based on eMMC hw partitions.
> Normally we have 2 boot partitions on eMMC. One is active and another
> is inactive. We can then flash the firmware to the inactive one and
> make it active.

We have been doing software updates using U-Boot scripts etc. for
many, many years.  But during that time a large number of
restrictions and shortcomings became clear.  this is why projects
like SWUpdate [1] came into life, and U-Boot supports this only with
very basic features:

- watchdog support to reset a hanging system
- boot counter to switch to an alternate boot command in case of too
  many failed boot attempts

That's all. Not more is needed, and not more should be used in
U-Boot.

I'm not sure if you know SWUpdate - if not, you should definitely
look into it.  I strongly recommend not to try to reinvent that
wheel - poorly - in U-Boot.  We have been there before, and got rid
of this approach for a pretty long list of good reasons.


[1] https://sbabic.github.io/swupdate/


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"More software projects have gone awry for lack of calendar time than
for all other causes combined."
                         - Fred Brooks, Jr., _The Mythical Man Month_

Reply via email to