Having got u-boot to work and, now, also got lvgldemo to run automatically at startup, I have taken some rough timings of the boot time on my sama5d27 board and thought others might be interested.
power->at91bootstrap->uboot (autoboot with 0s timeout)->nuttx->graphics on the screen: 6 seconds If I use the bootstrap program to boot NuttX directly however: power->at91bootstrap->nuttx->graphics on the screen: 2 seconds It seems uboot is not really a very good choice as a bootloader for an embedded system, where boot time is important (I was looking for <3s). From this discussion (thank you everyone) I believe I will be OK using USB/dfu/RNDIS tools/utilities directly from NuttX in my main app, to load and check new binaries to a secondary flash area without needing u-boot or MCUboot. I will try mcuboot if it does prove necessary to have an intermediate bootloader, or use a simple designed-for-purpose program. On 01/07/2023 10:56, Tim Hardisty wrote: > Not directly related to NuttX but I hope you don't mind me asking here. > > Bottom line: has anyone used any bootloader other than u-boot to allow usb > dfu or RNDIS-type firmware updates, and that easily boot NuttX? > > My board uses the usual SAMA5 methodology of AT91 bootstrap->u-boot->NuttX. > It all works as expected, as far as running code is concerned, but I simply > cannot get u-boot to enable the USB port for DFU or RNDIS functions and I > need the product to have user-friendly in-field updates, ideally without me > having to write any PC update software. > > U-boot has defeated me for over 2 weeks now, and simply refuses to even > "activate" the USB (i.e. a PC never even sees the connect let alone any > functionality: yes, the USB port does work for NuttX and sam-ba code > flashing); device trees are the invention of the devil; and an unholy > apparent mish mash of driver model and "legacy" modes; no SAM boards in the > u-boot trees appearing to have relevant config options I can copy. Add to > that: using latest u-boot rather than the 2020 version I currently have > "working"means it won't even find a console serial port any more, the lack of > response on the relevant AT91 u-boot github to questions, and I am just about > ready to give up :( > > But I need a bootloader! >