I usually only ever find very deep water...

u-boot does all the clever/arch stuff well but I think (for the not-so-popular Cortex A5) has buggy and undocumented "clever" stuff such as RNDIS/DFU/etc.

One possibility that occurs to me is to use an additional boot stage, as an alternative boot, from u-boot to a NuttX "updater app" rather than the "main" app, that handles this after the normal boot sequence is interrupted by some method. The "method" is working with u-boot just not the subsequent firmware download methods.

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. Current product (AT91SAM9261 based) suffers that as it doesn't have enough ram to download a complete image before doing the erase/program function. I expect to be left with MUCH more memory on this one so can hopefully rely on dfu to RAM before the flash is ever touched. And enough flash to store 2 images as well.

Plenty of options that mean I don't have to write a PC app and go through all the signing malarkey etc.

On 01/07/2023 17:41, Gregory Nutt wrote:
On 7/1/2023 10:27 AM, Tim Hardisty wrote:
Lots of work to do a full u-boot replacement, yes. But a basic one using existing NuttX stuff such as RNDIS, dfu, mtd etc. - for MY board at least - would not be much work. He said...naively!

You often can't know how deep the water is until you get a little wet.

One thing I would mention.  A bootloader is an app alright.  But it may need to use some of internal OS interfaces to control things like interrupts, MMU, caches, etc. it may need to reset the CPU or other actions that normal applications would not do.  That raises a few architectural issues (and explains why those primitive loaders are in the board src/ directory and not in apps/).

Ideally it would run in supervisor mode with a FLAT memory model.


--

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