Repository navigation
[Discussion][GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h) #18380
Copy link
Copy link
Open
Labels
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:
- Test ELF loading on current NuttX mainline.
- Build an app update flow where a new version is downloaded and replaces the old one on-board.
- 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 searchpkg installpkg updatepkg removepkg listpkg 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
ppkgintegration 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
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
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:
simfor 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
- Baseline ELF/shared-module validation (
examples/elf,examples/sotest) with reproducible docs/configs. - Reference app v1 and v2 for field update demo.
- Atomic install/update/rollback pipeline.
- Shared-library build support groundwork in NuttX/NuttX-Apps.
- Library loading MVP (one library + one dependent app).
- End-to-end integration script and docs for
sim.
8) Success criteria
- ELF baseline is reproducible on current mainline.
- v1 -> v2 update works on
simand 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:
- Native minimal
pkgMVP first (instead of fullppkgport). - Validation strategy:
sim+ purchasedstm32h745i-disco, with extra ESP32 DevKit v1 checks.
@acassis @halyssonJr @michallenc
References
- NUTTX-20: https://issues.apache.org/jira/browse/NUTTX-20
- Feature thread: [FEATURE] Create a NuttX Distro with dynamic binary (ELF) loading support #17351
- This discussion: [Discussion][GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h) #18380
Verification
- I have verified before submitting the report.
Reactions are currently unavailable
Activity
michallenc commentedon Feb 11, 2026
@acassis
acassis commentedon Feb 11, 2026
@aviralgarg05 I think the scope is well defined, but seems there is too much AI generated data. Remember that you will need to create a proposal to GSoC, so it is better to understand the steps and create a document by yourself.
In #17351 we proposal to use the existing ppkg project to implement the package management, but of course you can create a new pkg mngt as proposed here. Just evaluate the pros and cons of each approach.
For pkg commands, I suggest to use opkg and apt as reference: pkg search, pkg install, etc. ("pkg run" is really strange).
I think you highlighted the most important points, just some other details to keep in mind:
the distro should be a solution totally integrated into our build system, than an external distro. The idea is that using NuttX anyone can enable the right commands and create their own "distro". (So keep in mind Makefile and CMake compatibility)
I liked the idea of using sim for testing/validation, it simplifies tests and allow everybody to test the distro, but I think we need to have a candidate board as real target. This board should have a LCD screen and network compatibility. A good candidate should be stm32h74[5,7]i-disco (it has good driver support, LCD, Audio, Network, etc), ESP32-S3 (like https://aliexpress.com/item/1005007203795807.html it has LCD and WiFi, but this board needs to be added to mainline).
@michallenc @halyssonJr @raiden00pl @xiaoxiang781216 any other suggestion?
halyssonJr commentedon Feb 12, 2026
@acassis, great suggestions.
Considering the proposed roadmap, it's important to delegate some resources to each other and see how that can work. At the moment, we have different projects related to the NuttX distribution, and we need to test them together, for example, @liamHowatt creates and synthesizes an ELF file from scratch.
@aviralgarg05, I liked your roadmap, the details are super important.
aviralgarg05 commentedon Feb 16, 2026
Thanks again for the feedback on this proposal.
I’ve revised the issue body (Proposal V2) and tried to keep it more focused and practical.
What I changed:
search/install/update/remove/list/rollback).pkg runfrom the main command set.ppkgas reference, and proposed a minimal nativepkgMVP first.simfirst, plus purchased LCD+network board (stm32h745i-discopreferred), and ESP32 DevKit v1 for extra network/update checks.If this direction looks right, I’ll use this scope for the final GSoC proposal draft.
@acassis
acassis commentedon Feb 16, 2026
Sounds good for me! Please go ahead!
halyssonJr commentedon Feb 16, 2026
Hey folks,
I got a clear reproduction of the shared object on NuttX. I'm using the Linum Board.
tmedicci commentedon Feb 19, 2026
Hi @aviralgarg05 ,
Nice proposal!
As @acassis , ESP32-S3 is better suited for ELF loading: ESP32 can only use its internal RAM to run code, which limits its capacity. I highly recommend using ESP32-S3 with 8/16MB PSRAM.
Apart from that, the main purpose of this distribution seems to be to create a ready-to-use prototyping device where you can load dynamic applications without the need to re-flash the device. Please consider adding other languages (compiled or not) to the distribution: wasm and Python (which is supported on ESP32-S3) would be highly welcomed.
[-][Discussion] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h)[/-][+][Discussion]{GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h)[/+][-][Discussion]{GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h)[/-][+][Discussion][GSoC 2026] Create a NuttX Distribution with Dynamic Binary (ELF) Loading (350h)[/+]aviralgarg05 commentedon Mar 4, 2026
@halyssonJr thank you for sharing the Linum shared-object reproduction, sample repo, and debug output. This is very useful for me. I’ll include this flow in my baseline validation and align my shared-library test cases with it.
@tmedicci thank you for the practical hardware guidance. I agree that ESP32-S3 with 8/16MB PSRAM is a better fit for ELF-heavy work than ESP32 DevKit v1. I will update my hardware plan accordingly and use ESP32-S3 as the primary ESP target.
I’ll still keep
simas the main reproducible validation target, and keep one LCD+network board target (stm32h745i-disco) for end-to-end demo coverage.For wasm/Python: I really like this direction, but to keep the GSoC scope realistic, I think I should keep the NUTTX-20 core goals as must-have, and treat wasm/Python runtime support as stretch goals after install/update/rollback + library support are stable. Right @acassis ??
acassis commentedon Mar 4, 2026
Yes, let's focus in the basics first, then we extend to more features
acassis commentedon Mar 10, 2026
@aviralgarg05 I suggest you to start aligning about the proposal with @halyssonJr he will be the mentor for this project
aviralgarg05 commentedon Mar 10, 2026
Thanks, @acassis.
Sure, I’ll start aligning the proposal details with @halyssonJr from here.
@halyssonJr I’d really like your input on the proposal direction before I finalize the GSoC draft. In particular, I want to make sure I’m taking the right approach on scope, validation plan, and the shared-library/runtime-loading part.
acassis commentedon Mar 17, 2026
@aviralgarg05 please procedure with the official GSoC candidature: https://summerofcode.withgoogle.com/programs/2026
acassis commentedon Apr 1, 2026
Please confirm if you submitted the proposal before the deadline yesterday?
aviralgarg05 commentedon Apr 1, 2026
Yes, The Proposal has been submitted to Apache Software Foundation for GSoC 2026