mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
documentation: add docs for romfs defconfig on Espressif devices
Update the documentation for ESP32-S2|S3|C3|C6|H2, supporting romfs defconfig. Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit is contained in:
committed by
Alan C. Assis
parent
eb00c1317d
commit
dda00d30bf
@@ -475,6 +475,59 @@ This same configuration enables the usage of the RMT peripheral and the example
|
||||
Please note that this board contains an on-board WS2812 LED connected to GPIO18
|
||||
and, by default, this config configures the RMT transmitter in the same pin.
|
||||
|
||||
romfs
|
||||
-----
|
||||
|
||||
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
|
||||
automated system initialization and startup scripts. ROMFS allows embedding a read-only
|
||||
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
|
||||
|
||||
**What ROMFS provides:**
|
||||
|
||||
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
|
||||
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
|
||||
|
||||
**Default behavior:**
|
||||
|
||||
When this configuration is used, NuttX will:
|
||||
|
||||
1. Create a read-only RAM disk containing the ROMFS filesystem
|
||||
2. Mount the ROMFS at ``/etc``
|
||||
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
|
||||
4. Execute ``/etc/init.d/rcS`` for application startup
|
||||
|
||||
**Customizing startup scripts:**
|
||||
|
||||
The startup scripts are located in:
|
||||
``boards/xtensa/esp32s2/common/src/etc/init.d/``
|
||||
|
||||
* ``rc.sysinit`` - System initialization script
|
||||
* ``rcS`` - Application startup script
|
||||
|
||||
To customize these scripts:
|
||||
|
||||
1. **Edit the script files** in ``boards/xtensa/esp32s2/common/src/etc/init.d/``
|
||||
2. **Add your initialization commands** using any NSH-compatible commands
|
||||
|
||||
**Example customizations:**
|
||||
|
||||
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
|
||||
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
|
||||
|
||||
Example output::
|
||||
|
||||
*** Booting NuttX ***
|
||||
[...]
|
||||
rc.sysinit is called!
|
||||
rcS file is called!
|
||||
NuttShell (NSH) NuttX-12.8.0
|
||||
nsh> ls /etc/init.d
|
||||
/etc/init.d:
|
||||
.
|
||||
..
|
||||
rc.sysinit
|
||||
rcS
|
||||
|
||||
rtc
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user