apache / apache/nuttx

[FEATURE] Developing bootloaders for NuttX

Open
#18,384 7 comments 0 reactions 0 assignees View on GitHub
Type: Enhancement
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### 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

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.