[Discussion][GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h)
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
### Description
# [GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (Proposal V2)
Thanks for the feedback on February 11 and February 12, 2026.
I have rewritten this proposal to keep the scope tighter and practical for GSoC.
## 1) Goals (NUTTX-20)
I want to deliver these 3 goals first:
1. Test ELF loading on current NuttX mainline.
2. Build an app update flow where a new version is downloaded and replaces the old one on-board.
3. Add library support in NuttX/NuttX-Apps (using Android Makefile shared-library approach as reference).
## 2) Scope for GSoC
In scope:
- Reproducible ELF and shared-library validation.
- Minimal package workflow: install, update, remove, rollback.
- Integration with NuttX build systems (Makefile + CMake).
Out of scope for core delivery:
- Full apt/dnf-style dependency solver.
- Full dynamic linker parity.
- Secure-boot redesign.
- Optional extras like signatures or Dropbear (only if time allows).
## 3) Package manager direction
Command set will follow familiar package-manager style:
- `pkg search`
- `pkg install`
- `pkg update`
- `pkg remove`
- `pkg list`
- `pkg rollback`
I removed `pkg run` from the primary command set.
## 4) `ppkg` decision
I checked `ppkg` as suggested.
- It is promising and license-compatible.
- But for this GSoC timeline, I think a full on-device `ppkg` integration is higher risk.
So for this proposal, I am choosing a minimal native `pkg` MVP first, and I will reuse ideas from `ppkg` where useful.
## 5) Minimal design
### Package layout
```mermaid
flowchart TB
Root["/data/pkgs"] --> Name["package-name"]
Name --> V1["version-A"]
Name --> V2["version-B"]
Name --> Cur["current -> active version"]
Name --> Prev["previous -> last known good"]
```
### Atomic update flow
```mermaid
stateDiagram-v2
[*] --> Download
Download --> Verify
Verify --> Unpack
Unpack --> Activate
Activate --> Success
Success --> [*]
Verify --> Fail
Unpack --> Fail
Activate --> Fail
Fail --> Rollback
Rollback --> Success
```
Main rule: if update fails, the current working version must still run.
## 6) Validation plan and hardware
Primary validation:
- `sim` for reproducible end-to-end testing.
Hardware validation:
- I will buy an LCD + network board.
- Preferred target: `stm32h745i-disco`.
Hardware already available:
- ESP32 DevKit v1 (extra network/update-path checks).
- Raspberry Pi 5 (local build and HTTP demo repo hosting).
- I will also coordinate validation with related ongoing distro/ELF efforts in the community so testing is not isolated.
## 7) Planned PR sequence
1. Baseline ELF/shared-module validation (`examples/elf`, `examples/sotest`) with reproducible docs/configs.
2. Reference app v1 and v2 for field update demo.
3. Atomic install/update/rollback pipeline.
4. Shared-library build support groundwork in NuttX/NuttX-Apps.
5. Library loading MVP (one library + one dependent app).
6. End-to-end integration script and docs for `sim`.
## 8) Success criteria
- ELF baseline is reproducible on current mainline.
- v1 -> v2 update works on `sim` and hardware target.
- rollback restores last working version.
- one packaged shared library + dependent app runs.
- Makefile/CMake integration is documented and reproducible.
## 9) Feedback request
Please confirm if this revised scope looks right:
1. Native minimal `pkg` MVP first (instead of full `ppkg` port).
2. Validation strategy: `sim` + purchased `stm32h745i-disco`, with extra ESP32 DevKit v1 checks.
@acassis @halyssonJr @michallenc
### References
- NUTTX-20: https://issues.apache.org/jira/browse/NUTTX-20
- Feature thread: https://github.com/apache/nuttx/issues/17351
- This discussion: https://github.com/apache/nuttx/issues/18380
### Verification
- [x] I have verified before submitting the report.
Contributor guide
Research direction
Start by reviewing the existing examples/elf and examples/sotest paths and the sim validation setup, then compare the proposed work with NUTTX-20 and the linked feature thread. The intended result is a reproducible ELF/shared-library baseline followed by package install, update, removal, and rollback, with Makefile/CMake integration documented across NuttX and NuttX-Apps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system, embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100