[FEATURE] Create a NuttX Distro with dynamic binary (ELF) loading support
Is your feature request related to a problem? Please describe.
These are the steps to reach this goal
First steps (basic validation):
- [x] Test ELF Loading in the current NuttX mainline
- [ ] Create an LVGL library (use Meadow main/Source/tflite-micro-spresense-examples-1.0.0/Makefile as reference)
- [ ] Create the LVGL initial application (that will be replaced in the field)
- [ ] Create the new LVGL application that will replace the original application
- [ ] Create an application (or script) that will download the new LVGL application from server to replace the original
Advanced steps:
- [ ] Add Library support on NuttX/NuttX-Apps (use Android Makefile Library building as reference)
- [ ] Create a package manager to install, update or remove packages
- [ ] Host a demo distro in the Apache NuttX server
Desired features:
- [ ] Port dropbear (tiny SSH Server/Client) to NuttX to remote maintenance
Describe the solution you'd like
Steps aboves
Describe alternatives you've considered
No response
Verification
- [x] I have verified before submitting the report.
ping @halyssonJr @kisvegabor @liamHowatt
@acassis Binary Loader, it's working fine. For this test, I used the Linum (STM32H7), considering this board doesn't have an MMU, other option would be the reallocation ELF.
- Config:
./tools/configure.sh linum-stm32h753bi:sdcard
- NSH Output :
NuttShell (NSH) NuttX-12.11.0
nsh> mount -t vfat /dev/mmcsd0 /bin
nsh> ls bin
/bin:
hello
nsh> hello
Hello, World!!
nsh> cd bin
nsh> hello
Hello from ELF program
Start to counting to 10 ...
Counter = 0
Counter = 1
Counter = 2
Counter = 3
Counter = 4
Counter = 5
Counter = 6
Counter = 7
Counter = 8
Counter = 9
Bye Bye NuttX
- Reference : https://github.com/lupyuen/quickjs-nuttx#full-linking-for-nuttx-apps Huge thanks @lupyuen
It makes perfect sense to me. As the basic technology for elf loading is already working the basic steps seem quite doable to me.
However the advanced steps are really advanced. 🙂 We need to make sure that it's really worth the effort.
@kisvegabor you are right, these are very ambitious advanced steps, but if we want to have a real distro where people can install and remove packages, we will need some kind of package management. Unfortunately ipkg/opkg license is incompatible with NuttX.
Maybe we can port ppkg (https://github.com/leleliu008/ppkg) it is a package manager alternative for Unix/POSIX systems. This package manager seems very promising.
Let us focus on our "baby steps" first, it will be worth for NuttX and LVGL projects!