On Sun, Jul 2, 2023 at 12:42 AM Gregory Nutt <spudan...@gmail.com> 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/). > > Some recent added board ioctl is designed to fix this problem: https://github.com/apache/nuttx/blob/master/include/sys/boardctl.h#L209C9-L211 The real boot could delegate to the board specific code. > Ideally it would run in supervisor mode with a FLAT memory model. > >