Skip to content

[FEATURE] Developing bootloaders for NuttX #18384

@Laczen

Description

@Laczen

Is your feature request related to a problem? Please describe.

NuttX has several bootloaders that are supported in nuttx-apps. However when creating bootloaders there seem to be some basic items missing:

  1. Bootloaders typically use a dedicated linker file that is optimized for its purpose. E.g. to allow ram loading of images a bootloader will use a part or ram at the "end" so that the image that is loaded can be as large as possible. For devices that are started by loading the bootloader to ram the image needs to be as small as possible and only contain the bare minimum.
  2. To allow a dedicated bootloader script to be used there should be some kconfig value "IS_BOOTLOADER" or similar, this does not seem to exist in NuttX.
  3. To achieve a minimal size bootloader many parts of NuttX are unnecessary, a dedicated "entry" could be used when a bootloader is created.

Describe the solution you'd like

  1. Introduce a Kconfig "IS_BOOTLOADER" and allow a dedicated linker script to be associated with this config.
  2. Allow the dedicated bootloader "entry" routine to skip most of the NuttX support. When this is allowed this could also result in the nuttx build system creating a almost baremetal application.

I am looking for feedback on this.

Describe alternatives you've considered

Create a bootloader for NuttX without any usage of the NuttX build system and completely separate from NuttX.

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions