Skip to content

Commit dda00d3

Browse files
fdcavalcantiacassis
authored andcommitted
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>
1 parent eb00c13 commit dda00d3

File tree

7 files changed

+374
-3
lines changed

7 files changed

+374
-3
lines changed

Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,59 @@ This same configuration enables the usage of the RMT peripheral and the example
399399
Please note that this board contains an on-board WS2812 LED connected to GPIO8
400400
and, by default, this config configures the RMT transmitter in the same pin.
401401

402+
romfs
403+
-----
404+
405+
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
406+
automated system initialization and startup scripts. ROMFS allows embedding a read-only
407+
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
408+
409+
**What ROMFS provides:**
410+
411+
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
412+
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
413+
414+
**Default behavior:**
415+
416+
When this configuration is used, NuttX will:
417+
418+
1. Create a read-only RAM disk containing the ROMFS filesystem
419+
2. Mount the ROMFS at ``/etc``
420+
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
421+
4. Execute ``/etc/init.d/rcS`` for application startup
422+
423+
**Customizing startup scripts:**
424+
425+
The startup scripts are located in:
426+
``boards/risc-v/esp32c3/common/src/etc/init.d/``
427+
428+
* ``rc.sysinit`` - System initialization script
429+
* ``rcS`` - Application startup script
430+
431+
To customize these scripts:
432+
433+
1. **Edit the script files** in ``boards/risc-v/esp32c3/common/src/etc/init.d/``
434+
2. **Add your initialization commands** using any NSH-compatible commands
435+
436+
**Example customizations:**
437+
438+
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
439+
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
440+
441+
Example output::
442+
443+
*** Booting NuttX ***
444+
[...]
445+
rc.sysinit is called!
446+
rcS file is called!
447+
NuttShell (NSH) NuttX-12.8.0
448+
nsh> ls /etc/init.d
449+
/etc/init.d:
450+
.
451+
..
452+
rc.sysinit
453+
rcS
454+
402455
rtc
403456
---
404457

Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,59 @@ This same configuration enables the usage of the RMT peripheral and the example
423423
Please note that this board contains an on-board WS2812 LED connected to GPIO8
424424
and, by default, this config configures the RMT transmitter in the same pin.
425425

426+
romfs
427+
-----
428+
429+
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
430+
automated system initialization and startup scripts. ROMFS allows embedding a read-only
431+
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
432+
433+
**What ROMFS provides:**
434+
435+
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
436+
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
437+
438+
**Default behavior:**
439+
440+
When this configuration is used, NuttX will:
441+
442+
1. Create a read-only RAM disk containing the ROMFS filesystem
443+
2. Mount the ROMFS at ``/etc``
444+
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
445+
4. Execute ``/etc/init.d/rcS`` for application startup
446+
447+
**Customizing startup scripts:**
448+
449+
The startup scripts are located in:
450+
``boards/risc-v/esp32c6/common/src/etc/init.d/``
451+
452+
* ``rc.sysinit`` - System initialization script
453+
* ``rcS`` - Application startup script
454+
455+
To customize these scripts:
456+
457+
1. **Edit the script files** in ``boards/risc-v/esp32c6/common/src/etc/init.d/``
458+
2. **Add your initialization commands** using any NSH-compatible commands
459+
460+
**Example customizations:**
461+
462+
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
463+
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
464+
465+
Example output::
466+
467+
*** Booting NuttX ***
468+
[...]
469+
rc.sysinit is called!
470+
rcS file is called!
471+
NuttShell (NSH) NuttX-12.8.0
472+
nsh> ls /etc/init.d
473+
/etc/init.d:
474+
.
475+
..
476+
rc.sysinit
477+
rcS
478+
426479
rtc
427480
---
428481

Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,59 @@ This same configuration enables the usage of the RMT peripheral and the example
338338
Please note that this board contains an on-board WS2812 LED connected to GPIO8
339339
and, by default, this config configures the RMT transmitter in the same pin.
340340

341+
romfs
342+
-----
343+
344+
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
345+
automated system initialization and startup scripts. ROMFS allows embedding a read-only
346+
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
347+
348+
**What ROMFS provides:**
349+
350+
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
351+
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
352+
353+
**Default behavior:**
354+
355+
When this configuration is used, NuttX will:
356+
357+
1. Create a read-only RAM disk containing the ROMFS filesystem
358+
2. Mount the ROMFS at ``/etc``
359+
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
360+
4. Execute ``/etc/init.d/rcS`` for application startup
361+
362+
**Customizing startup scripts:**
363+
364+
The startup scripts are located in:
365+
``boards/risc-v/esp32c6/common/src/etc/init.d/``
366+
367+
* ``rc.sysinit`` - System initialization script
368+
* ``rcS`` - Application startup script
369+
370+
To customize these scripts:
371+
372+
1. **Edit the script files** in ``boards/risc-v/esp32c6/common/src/etc/init.d/``
373+
2. **Add your initialization commands** using any NSH-compatible commands
374+
375+
**Example customizations:**
376+
377+
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
378+
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
379+
380+
Example output::
381+
382+
*** Booting NuttX ***
383+
[...]
384+
rc.sysinit is called!
385+
rcS file is called!
386+
NuttShell (NSH) NuttX-12.8.0
387+
nsh> ls /etc/init.d
388+
/etc/init.d:
389+
.
390+
..
391+
rc.sysinit
392+
rcS
393+
341394
rtc
342395
---
343396

Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,59 @@ This same configuration enables the usage of the RMT peripheral and the example
355355
Please note that this board contains an on-board WS2812 LED connected to GPIO8
356356
and, by default, this config configures the RMT transmitter in the same pin.
357357

358+
romfs
359+
-----
360+
361+
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
362+
automated system initialization and startup scripts. ROMFS allows embedding a read-only
363+
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
364+
365+
**What ROMFS provides:**
366+
367+
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
368+
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
369+
370+
**Default behavior:**
371+
372+
When this configuration is used, NuttX will:
373+
374+
1. Create a read-only RAM disk containing the ROMFS filesystem
375+
2. Mount the ROMFS at ``/etc``
376+
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
377+
4. Execute ``/etc/init.d/rcS`` for application startup
378+
379+
**Customizing startup scripts:**
380+
381+
The startup scripts are located in:
382+
``boards/risc-v/esp32h2/common/src/etc/init.d/``
383+
384+
* ``rc.sysinit`` - System initialization script
385+
* ``rcS`` - Application startup script
386+
387+
To customize these scripts:
388+
389+
1. **Edit the script files** in ``boards/risc-v/esp32h2/common/src/etc/init.d/``
390+
2. **Add your initialization commands** using any NSH-compatible commands
391+
392+
**Example customizations:**
393+
394+
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
395+
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
396+
397+
Example output::
398+
399+
*** Booting NuttX ***
400+
[...]
401+
rc.sysinit is called!
402+
rcS file is called!
403+
NuttShell (NSH) NuttX-12.8.0
404+
nsh> ls /etc/init.d
405+
/etc/init.d:
406+
.
407+
..
408+
rc.sysinit
409+
rcS
410+
358411
rtc
359412
---
360413

Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,59 @@ to ESP32 GPIO 4 and run::
924924

925925
nsh> ws2812esp32 0 <number_of_leds_on_strip>
926926

927+
romfs
928+
-----
929+
930+
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
931+
automated system initialization and startup scripts. ROMFS allows embedding a read-only
932+
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
933+
934+
**What ROMFS provides:**
935+
936+
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
937+
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
938+
939+
**Default behavior:**
940+
941+
When this configuration is used, NuttX will:
942+
943+
1. Create a read-only RAM disk containing the ROMFS filesystem
944+
2. Mount the ROMFS at ``/etc``
945+
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
946+
4. Execute ``/etc/init.d/rcS`` for application startup
947+
948+
**Customizing startup scripts:**
949+
950+
The startup scripts are located in:
951+
``boards/xtensa/esp32/common/src/etc/init.d/``
952+
953+
* ``rc.sysinit`` - System initialization script
954+
* ``rcS`` - Application startup script
955+
956+
To customize these scripts:
957+
958+
1. **Edit the script files** in ``boards/xtensa/esp32/common/src/etc/init.d/``
959+
2. **Add your initialization commands** using any NSH-compatible commands
960+
961+
**Example customizations:**
962+
963+
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
964+
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
965+
966+
Example output::
967+
968+
*** Booting NuttX ***
969+
[...]
970+
rc.sysinit is called!
971+
rcS file is called!
972+
NuttShell (NSH) NuttX-12.8.0
973+
nsh> ls /etc/init.d
974+
/etc/init.d:
975+
.
976+
..
977+
rc.sysinit
978+
rcS
979+
927980
rtc
928981
---
929982

Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,59 @@ This same configuration enables the usage of the RMT peripheral and the example
475475
Please note that this board contains an on-board WS2812 LED connected to GPIO18
476476
and, by default, this config configures the RMT transmitter in the same pin.
477477

478+
romfs
479+
-----
480+
481+
This configuration demonstrates the use of ROMFS (Read-Only Memory File System) to provide
482+
automated system initialization and startup scripts. ROMFS allows embedding a read-only
483+
filesystem directly into the NuttX binary, which is mounted at ``/etc`` during system startup.
484+
485+
**What ROMFS provides:**
486+
487+
* **System initialization script** (``/etc/init.d/rc.sysinit``): Executed after board bring-up
488+
* **Startup script** (``/etc/init.d/rcS``): Executed after system init, typically used to start applications
489+
490+
**Default behavior:**
491+
492+
When this configuration is used, NuttX will:
493+
494+
1. Create a read-only RAM disk containing the ROMFS filesystem
495+
2. Mount the ROMFS at ``/etc``
496+
3. Execute ``/etc/init.d/rc.sysinit`` during system initialization
497+
4. Execute ``/etc/init.d/rcS`` for application startup
498+
499+
**Customizing startup scripts:**
500+
501+
The startup scripts are located in:
502+
``boards/xtensa/esp32s2/common/src/etc/init.d/``
503+
504+
* ``rc.sysinit`` - System initialization script
505+
* ``rcS`` - Application startup script
506+
507+
To customize these scripts:
508+
509+
1. **Edit the script files** in ``boards/xtensa/esp32s2/common/src/etc/init.d/``
510+
2. **Add your initialization commands** using any NSH-compatible commands
511+
512+
**Example customizations:**
513+
514+
* **rc.sysinit** - Set up system services, mount additional filesystems, configure network.
515+
* **rcS** - Start your application, launch daemons, configure peripherals. This is executed after the rc.sysinit script.
516+
517+
Example output::
518+
519+
*** Booting NuttX ***
520+
[...]
521+
rc.sysinit is called!
522+
rcS file is called!
523+
NuttShell (NSH) NuttX-12.8.0
524+
nsh> ls /etc/init.d
525+
/etc/init.d:
526+
.
527+
..
528+
rc.sysinit
529+
rcS
530+
478531
rtc
479532
---
480533

0 commit comments

Comments
 (0)