Yes, I've done similar on another product and it worked well. I have allowed myself to get blinkered by the plethora of supposedly easy/good that options u-boot offered.

Note to self: KISS ;-)

On 01/07/2023 18:05, Gregory Nutt wrote:

What I am trying to cater for is the inevitable occasion where a customer does a firmware update that goes wrong and seems to "brick" the device, as the "app" nor-flash is corrupted and an in-app updater can't be run.

Back in the day when I was doing set-top boxes we would support updating many thousands of boxes via cable overnight.  Of course, many of the updates would fail for some reason or another.

So we kept two copies of the FLASH image in the filesystem:  The newest download and the last known good.  On reset, the bootloader would load the newest download first if is is present; otherwise it would load the last known good.  If the newest download failed to boot, it was removed (and be updated again the next night).  If it booted successfully, it would mark itself as the "last known good."

That logic is pretty simple and worked well.  Lots of other people in this list have dealt with this and perhaps have developed some better solutions.



--

Regards,

Tim Hardisty


A picture containing text, clipart Description automatically generated

        

+44 (0) 1305 534535

        

<http://www.jti.uk.com/>

        

JTi.uk.com <https://www.jti.uk.com/>

        

<https://www.facebook.com/JTinnovations/>

        

\JTinnovations <https://www.facebook.com/JTinnovations/>

JT Innovations Ltd.

Registered office: 36 East St, Weymouth, Dorset, DT3 4DT, UK.

Company number 7619086

VAT Registration GB 111 7906 35

Reply via email to