nuttx/sched
fangxinyong c479ccb8aa sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory
are compiled and linked with Nuttx binary in the form of romfs. After startup,
it will be  mounted by Nsh.

etc is generated by the different boards, that use genromfs and xxd tools to generate
and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh
The more common method is etc image generated from the content in the corresponding
board/arch/board/board/src/etc directory, and added by Makefile for example:
boards/sim/sim/sim/src/etc.

But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/
non-privileged mode or the isolated binarys, so as that nsh should use syscall to
access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image
content, because that is generated in board and as a part of Nuttx kernel.

changes:

- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
  in boards, and no need declaration for romfs_img/romfs_img_len.

This commit changes and updates all configurations in Nuttx arch/board as much as possible,
but if any missing, please refer to the following simple guide:

- rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig
- rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO
- move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need
  declaration for romfs_img/romfs_img_len.
- delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c
  in board/arch/board/board/src.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-09 21:29:46 -03:00
..
addrenv cmake:complete missing changes during cmake reforming for sched 2023-09-08 21:20:16 +03:00
clock adjtime: Rewrite implementation to work for RTC and tickless kernel 2023-11-14 19:47:40 -08:00
environ env_dup: fix issue about USE_AFTER_FREE 2023-10-26 00:11:14 +08:00
group sched/taskfiles: skip unnecessary file open/close operations to improve performance 2023-11-16 07:30:36 -08:00
init sched: move etc romfs mount from nsh to sched/init 2024-01-09 21:29:46 -03:00
instrument sched/procfs:use instrument to statistics run time max stack 2023-12-11 02:06:51 -08:00
irq fs: procfs add poll support 2023-12-26 19:23:13 -08:00
misc assert: fix flags type, should be irqstate_t 2024-01-04 22:16:54 -08:00
module fs: procfs add poll support 2023-12-26 19:23:13 -08:00
mqueue mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
paging build: add initial cmake build system 2023-07-08 13:50:48 +08:00
pthread task/pthread_cancelpt: Move cancel point handling to libc, data to TLS 2023-11-15 08:52:04 -08:00
sched sched: Stop the sched timer when possible to save the power in tickless mode 2023-12-17 08:25:11 -06:00
semaphore misc/rwlock:Implementing read/write locks. 2023-12-02 19:43:19 -08:00
signal sigaction: Expand si_user for non-kernel signals 2023-11-22 08:00:43 -08:00
task Update kconfig2html.c 2023-12-14 20:02:52 -08:00
timer Replace enter_critical_section with spin_irqsave 2023-10-21 11:00:07 +08:00
tls libc: add support for custom streams with fopencookie() 2023-10-18 21:13:01 +08:00
wdog clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
wqueue clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig sched: move etc romfs mount from nsh to sched/init 2024-01-09 21:29:46 -03:00
Makefile sched/procfs:use instrument to statistics run time max stack 2023-12-11 02:06:51 -08:00