From c479ccb8aa4acfc50856886c61d858dc0ca28fbb Mon Sep 17 00:00:00 2001 From: fangxinyong Date: Sun, 26 Nov 2023 11:51:46 +0800 Subject: [PATCH] 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 --- arch/arm64/src/common/arm64_arch.h | 3 +- boards/Board.mk | 2 +- boards/arm/at32/at32f437-mini/src/Makefile | 6 +- .../nsh_romfsimg.h => src/etc_romfs.c} | 10 ++- boards/arm/at32/at32f437-mini/tool/mkromfs.sh | 6 +- .../dm320/ntosd-dm320/configs/nsh/defconfig | 1 - .../fvp-armv8r-aarch32/configs/nsh/defconfig | 1 - .../arm/gd32f4/gd32f470zk-eval/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 10 ++- .../teensy-4.x/configs/pikron-bb/defconfig | 1 - .../lpc17xx_40xx/lx_cpu/configs/nsh/defconfig | 2 +- boards/arm/phy62xx/phy6222/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 10 ++- .../qemu/qemu-armv7a/configs/nsh/defconfig | 1 - .../arm/s32k1xx/rddrone-bms772/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 14 ++-- .../sdmmc-nsh-net-resolvconf/defconfig | 3 +- boards/arm/sama5/jupiter-nano/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 12 ++- .../ethernet-over-usb-2-high-speed/defconfig | 1 - .../sama5/sama5d4-ek/configs/ipv6/defconfig | 3 +- .../sama5/sama5d4-ek/configs/nsh/defconfig | 3 +- .../sama5/sama5d4-ek/configs/nxwm/defconfig | 3 +- boards/arm/sama5/sama5d4-ek/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 13 ++- .../same70-xplained/configs/pysim/defconfig | 1 - .../mikroe-stm32f4/configs/fulldemo/defconfig | 5 +- boards/arm/stm32/mikroe-stm32f4/src/Make.defs | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 10 ++- .../stm32l476vg-disco/configs/nsh/defconfig | 3 +- .../include/rc.sysinit.template | 2 +- .../stm32l476vg-disco/include/rcS.template | 2 +- .../stm32l4/stm32l476vg-disco/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 13 ++- .../stm32l4r9ai-disco/configs/nsh/defconfig | 3 +- .../include/rc.sysinit.template | 2 +- .../stm32l4r9ai-disco/include/rcS.template | 2 +- .../stm32l4/stm32l4r9ai-disco/src/Makefile | 4 + .../nsh_romfsimg.h => src/etc_romfs.c} | 13 ++- .../include/nsh_romfsimg.h | 41 ---------- .../arm64/a64/pinephone/configs/lcd/defconfig | 1 - .../a64/pinephone/configs/lvgl/defconfig | 1 - .../arm64/a64/pinephone/configs/nsh/defconfig | 1 - .../a64/pinephone/configs/sensor/defconfig | 1 - .../fvp-armv8r/configs/citest/defconfig | 1 - .../fvp-armv8r/configs/citest_smp/defconfig | 1 - .../fvp-v8r/fvp-armv8r/configs/nsh/defconfig | 1 - .../fvp-armv8r/configs/nsh_smp/defconfig | 1 - .../imx8/imx8qm-mek/configs/nsh/defconfig | 1 - .../qemu/qemu-armv8a/configs/citest/defconfig | 1 - .../qemu-armv8a/configs/citest_smp/defconfig | 1 - .../qemu/qemu-armv8a/configs/nsh/defconfig | 1 - .../qemu-armv8a/configs/nsh_fiq/defconfig | 1 - .../qemu-armv8a/configs/nsh_gicv2/defconfig | 1 - .../qemu-armv8a/configs/nsh_smp/defconfig | 1 - .../configs/nsh_smp_tickless/defconfig | 1 - .../rk3399/nanopi_m4/configs/nsh/defconfig | 3 +- .../rk3399/nanopi_m4/include/nsh_romfsimg.h | 22 ----- boards/arm64/rk3399/nanopi_m4/src/Makefile | 4 +- .../rk3399/pinephonepro/configs/nsh/defconfig | 1 - .../include/nsh_romfsimg.h | 25 ------ .../esp32c3-devkit/configs/romfs/defconfig | 6 +- .../esp32c3-devkit/configs/twai/defconfig | 2 +- .../esp32c3-devkit/include/nsh_romfsimg.h | 25 ------ .../esp32c3/esp32c3-devkit/src/Make.defs | 4 +- .../esp32c3-devkit/src/etc/init.d/rc.sysinit | 10 +-- .../qemu-rv/rv-virt/include/nsh_romfsimg.h | 25 ------ boards/sim/sim/sim/configs/alsa/defconfig | 7 +- boards/sim/sim/sim/configs/bas/defconfig | 6 +- boards/sim/sim/sim/configs/bastest/defconfig | 8 +- .../sim/sim/sim/configs/bluetooth/defconfig | 7 +- .../sim/sim/sim/configs/bthcisock/defconfig | 7 +- boards/sim/sim/sim/configs/btuart/defconfig | 3 +- boards/sim/sim/sim/configs/citest/defconfig | 7 +- boards/sim/sim/sim/configs/crypto/defconfig | 7 +- boards/sim/sim/sim/configs/duktape/defconfig | 7 +- boards/sim/sim/sim/configs/foc/defconfig | 7 +- .../sim/sim/sim/configs/ipforward/defconfig | 7 +- .../sim/sim/sim/configs/libcxxtest/defconfig | 5 +- boards/sim/sim/sim/configs/lua/defconfig | 7 +- boards/sim/sim/sim/configs/matter/defconfig | 7 +- .../sim/sim/sim/configs/minibasic/defconfig | 7 +- boards/sim/sim/sim/configs/minmea/defconfig | 7 +- boards/sim/sim/sim/configs/nimble/defconfig | 7 +- boards/sim/sim/sim/configs/nsh/defconfig | 7 +- boards/sim/sim/sim/configs/nsh2/defconfig | 6 +- boards/sim/sim/sim/configs/nxcamera/defconfig | 7 +- boards/sim/sim/sim/configs/nxlines/defconfig | 6 +- boards/sim/sim/sim/configs/nxwm/defconfig | 6 +- .../sim/sim/sim/configs/posix_test/defconfig | 7 +- boards/sim/sim/sim/configs/romfs/defconfig | 8 +- boards/sim/sim/sim/configs/rust/defconfig | 7 +- boards/sim/sim/sim/configs/segger/defconfig | 7 +- boards/sim/sim/sim/configs/smartfs/defconfig | 5 +- boards/sim/sim/sim/configs/tcploop/defconfig | 7 +- boards/sim/sim/sim/configs/toywasm/defconfig | 5 +- boards/sim/sim/sim/configs/udgram/defconfig | 6 +- boards/sim/sim/sim/configs/unionfs/defconfig | 7 +- boards/sim/sim/sim/configs/userfs/defconfig | 7 +- boards/sim/sim/sim/configs/ustream/defconfig | 6 +- boards/sim/sim/sim/configs/vpnkit/defconfig | 5 +- boards/sim/sim/sim/configs/wakaama/defconfig | 7 +- boards/sim/sim/sim/configs/wamr/defconfig | 7 +- boards/sim/sim/sim/configs/zipfs/defconfig | 7 +- boards/sim/sim/sim/include/nsh_romfsimg.h | 25 ------ boards/sim/sim/sim/src/CMakeLists.txt | 2 +- boards/sim/sim/sim/src/Makefile | 4 +- boards/sim/sim/sim/src/etc/init.d/rc.sysinit | 10 +-- include/nuttx/nuttx.h | 5 ++ sched/Kconfig | 80 +++++++++++++++++++ sched/init/nx_bringup.c | 71 ++++++++++++++++ tools/ci/testrun/script/test_os/test_os.py | 2 +- tools/mkromfsimg.sh | 24 +++--- 113 files changed, 437 insertions(+), 406 deletions(-) rename boards/arm/at32/at32f437-mini/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/gd32f4/gd32f470zk-eval/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/phy62xx/phy6222/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/s32k1xx/rddrone-bms772/{include/nsh_romfsimg.h => src/etc_romfs.c} (97%) rename boards/arm/sama5/jupiter-nano/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/sama5/sama5d4-ek/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/stm32/mikroe-stm32f4/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/stm32l4/stm32l476vg-disco/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) rename boards/arm/stm32l4/stm32l4r9ai-disco/{include/nsh_romfsimg.h => src/etc_romfs.c} (94%) delete mode 100644 boards/arm/tms570/tms570ls31x-usb-kit/include/nsh_romfsimg.h delete mode 100644 boards/arm64/rk3399/nanopi_m4/include/nsh_romfsimg.h delete mode 100644 boards/risc-v/esp32c3/esp32c3-devkit-rust-1/include/nsh_romfsimg.h delete mode 100644 boards/risc-v/esp32c3/esp32c3-devkit/include/nsh_romfsimg.h delete mode 100644 boards/risc-v/qemu-rv/rv-virt/include/nsh_romfsimg.h delete mode 100644 boards/sim/sim/sim/include/nsh_romfsimg.h diff --git a/arch/arm64/src/common/arm64_arch.h b/arch/arm64/src/common/arm64_arch.h index 789ebebff0..a73a76e2f4 100644 --- a/arch/arm64/src/common/arm64_arch.h +++ b/arch/arm64/src/common/arm64_arch.h @@ -32,6 +32,7 @@ */ #ifndef __ASSEMBLY__ #include + #include #endif #include @@ -143,8 +144,6 @@ * Pre-processor Definitions ****************************************************************************/ -#define STRINGIFY(x) #x - #define GET_EL(mode) (((mode) >> MODE_EL_SHIFT) & MODE_EL_MASK) /* MPIDR_EL1, Multiprocessor Affinity Register */ diff --git a/boards/Board.mk b/boards/Board.mk index e0cc563a3e..0ea7959825 100644 --- a/boards/Board.mk +++ b/boards/Board.mk @@ -35,7 +35,7 @@ $(ETCSRC): $(addprefix $(BOARD_DIR)$(DELIM)src$(DELIM),$(RCRAWS)) $(RCOBJS) $(shell rm -rf $(ETCDIR)$(DELIM)$(raw)) \ $(shell mkdir -p $(dir $(ETCDIR)$(DELIM)$(raw))) \ $(shell cp -rfp $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw) $(ETCDIR)$(DELIM)$(raw))) - $(Q) genromfs -f romfs.img -d $(ETCDIR)$(DELIM)$(CONFIG_NSH_ROMFSMOUNTPT) -V "NSHInitVol" + $(Q) genromfs -f romfs.img -d $(ETCDIR)$(DELIM)$(CONFIG_ETC_ROMFSMOUNTPT) -V "NSHInitVol" $(Q) echo "#include " > $@ $(Q) xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char aligned_data(4)/g" >> $@ $(Q) rm romfs.img diff --git a/boards/arm/at32/at32f437-mini/src/Makefile b/boards/arm/at32/at32f437-mini/src/Makefile index f0d5bc351e..5361ac2129 100644 --- a/boards/arm/at32/at32f437-mini/src/Makefile +++ b/boards/arm/at32/at32f437-mini/src/Makefile @@ -80,4 +80,8 @@ ifeq ($(CONFIG_MTD_AT24XX),y) CSRCS += at32_at24.c endif -include $(TOPDIR)/boards/Board.mk \ No newline at end of file +ifeq ($(CONFIG_ETC_ROMFS),y) + CSRCS += etc_romfs.c +endif + +include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/at32/at32f437-mini/include/nsh_romfsimg.h b/boards/arm/at32/at32f437-mini/src/etc_romfs.c similarity index 94% rename from boards/arm/at32/at32f437-mini/include/nsh_romfsimg.h rename to boards/arm/at32/at32f437-mini/src/etc_romfs.c index db6d674d88..d1015996a8 100644 --- a/boards/arm/at32/at32f437-mini/include/nsh_romfsimg.h +++ b/boards/arm/at32/at32f437-mini/src/etc_romfs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/at32/at32f437-mini/include/nsh_romfsimg.h + * boards/arm/at32/at32f437-mini/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,6 +18,10 @@ * ****************************************************************************/ +/**************************************************************************** + * Public Data + ****************************************************************************/ + unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x03, 0x70, @@ -109,3 +113,7 @@ unsigned char romfs_img[] = }; unsigned int romfs_img_len = 1024; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/at32/at32f437-mini/tool/mkromfs.sh b/boards/arm/at32/at32f437-mini/tool/mkromfs.sh index 5d97fc8d30..d831066fca 100644 --- a/boards/arm/at32/at32f437-mini/tool/mkromfs.sh +++ b/boards/arm/at32/at32f437-mini/tool/mkromfs.sh @@ -3,9 +3,9 @@ genromfs -f romfs.img -d ../romfs -v -V "romfs" -xxd -i romfs.img nsh_romfsimg.h +xxd -i romfs.img etc_romfs.c -cp nsh_romfsimg.h ../include +cp etc_romfs.c ../src -rm romfs.img nsh_romfsimg.h +rm romfs.img etc_romfs.c diff --git a/boards/arm/dm320/ntosd-dm320/configs/nsh/defconfig b/boards/arm/dm320/ntosd-dm320/configs/nsh/defconfig index ef776e92ab..248be96030 100644 --- a/boards/arm/dm320/ntosd-dm320/configs/nsh/defconfig +++ b/boards/arm/dm320/ntosd-dm320/configs/nsh/defconfig @@ -40,7 +40,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PTHREAD_STACK_DEFAULT=4096 CONFIG_RAM_SIZE=33554432 CONFIG_RAM_START=0x01100000 diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig index 639b071937..bae6f387b0 100644 --- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile b/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile index 1ff2508870..d7600631ea 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile +++ b/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile @@ -65,4 +65,8 @@ ifeq ($(CONFIG_BOARDCTL_RESET), y) CSRCS += gd32f4xx_reset.c endif +ifeq ($(CONFIG_ETC_ROMFS), y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/gd32f4/gd32f470zk-eval/include/nsh_romfsimg.h b/boards/arm/gd32f4/gd32f470zk-eval/src/etc_romfs.c similarity index 94% rename from boards/arm/gd32f4/gd32f470zk-eval/include/nsh_romfsimg.h rename to boards/arm/gd32f4/gd32f470zk-eval/src/etc_romfs.c index 080de1625b..79c7e9a6b5 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/include/nsh_romfsimg.h +++ b/boards/arm/gd32f4/gd32f470zk-eval/src/etc_romfs.c @@ -1,5 +1,5 @@ /*************************************************************************** - * boards/arm/gd32f4/gd32f470zk-eval/include/nsh_romfsimg.h + * boards/arm/gd32f4/gd32f470zk-eval/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,6 +18,10 @@ * ***************************************************************************/ +/*************************************************************************** + * Public Data + ***************************************************************************/ + const unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0x50, @@ -109,3 +113,7 @@ const unsigned char romfs_img[] = }; const unsigned int romfs_img_len = 1024; + +/*************************************************************************** + * Public Functions + ***************************************************************************/ diff --git a/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig b/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig index 9eeb882f7b..621a85a396 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig @@ -123,7 +123,6 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_LINELEN=64 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NXFONTS_DISABLE_16BPP=y CONFIG_NXFONTS_DISABLE_1BPP=y CONFIG_NXFONTS_DISABLE_24BPP=y diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig index 0d23ad5f66..799787de64 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_RAMVECTORS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_RESET=y +CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y @@ -125,7 +126,6 @@ CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NXFLAT=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PRIORITY_INHERITANCE=y diff --git a/boards/arm/phy62xx/phy6222/src/Makefile b/boards/arm/phy62xx/phy6222/src/Makefile index 38dedc9797..613f1e9e31 100644 --- a/boards/arm/phy62xx/phy6222/src/Makefile +++ b/boards/arm/phy62xx/phy6222/src/Makefile @@ -29,4 +29,8 @@ CSRCS += appinit.c CSRCS += reset.c +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/phy62xx/phy6222/include/nsh_romfsimg.h b/boards/arm/phy62xx/phy6222/src/etc_romfs.c similarity index 94% rename from boards/arm/phy62xx/phy6222/include/nsh_romfsimg.h rename to boards/arm/phy62xx/phy6222/src/etc_romfs.c index ff779fcedf..895245aca2 100644 --- a/boards/arm/phy62xx/phy6222/include/nsh_romfsimg.h +++ b/boards/arm/phy62xx/phy6222/src/etc_romfs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/phy62xx/phy6222/include/nsh_romfsimg.h + * boards/arm/phy62xx/phy6222/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,6 +18,10 @@ * ****************************************************************************/ +/**************************************************************************** + * Public Data + ****************************************************************************/ + unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x00, 0xf0, @@ -108,3 +112,7 @@ unsigned char romfs_img[] = 0x00, 0x00, 0x00, 0x00 }; unsigned int romfs_img_len = 1024; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig b/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig index 81da34c485..30251f380e 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig @@ -41,7 +41,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_ONESHOT=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAMLOG=y diff --git a/boards/arm/s32k1xx/rddrone-bms772/src/Makefile b/boards/arm/s32k1xx/rddrone-bms772/src/Makefile index defcc4e21b..7491c5f33d 100644 --- a/boards/arm/s32k1xx/rddrone-bms772/src/Makefile +++ b/boards/arm/s32k1xx/rddrone-bms772/src/Makefile @@ -67,4 +67,8 @@ ifeq ($(CONFIG_SMBUS_SBD),y) CSRCS += s32k1xx_smbus_sbd.c endif +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/s32k1xx/rddrone-bms772/include/nsh_romfsimg.h b/boards/arm/s32k1xx/rddrone-bms772/src/etc_romfs.c similarity index 97% rename from boards/arm/s32k1xx/rddrone-bms772/include/nsh_romfsimg.h rename to boards/arm/s32k1xx/rddrone-bms772/src/etc_romfs.c index 1517f0b65c..a5065a263f 100644 --- a/boards/arm/s32k1xx/rddrone-bms772/include/nsh_romfsimg.h +++ b/boards/arm/s32k1xx/rddrone-bms772/src/etc_romfs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/s32k1xx/rddrone-bms772/include/nsh_romfsimg.h + * boards/arm/s32k1xx/rddrone-bms772/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -20,9 +20,6 @@ /* Copyright 2022 NXP */ -#ifndef __BOARDS_ARM_S32K1XX_RDDRONE_BMS772_INCLUDE_NSH_ROMFSIMG_H -#define __BOARDS_ARM_S32K1XX_RDDRONE_BMS772_INCLUDE_NSH_ROMFSIMG_H - /**************************************************************************** * Included Files ****************************************************************************/ @@ -40,7 +37,7 @@ * memory usage after board initialization has finished. */ -const unsigned char aligned_data(4) romfs_img[] = +const unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0xb0, 0x98, 0xcd, 0xf3, 0x32, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, @@ -135,7 +132,7 @@ const unsigned int romfs_img_len = 1024; /* Init script does not call the free command to show available memory */ -const unsigned char aligned_data(4) romfs_img[] = +const unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0xb0, 0x4e, 0x7a, 0x78, 0x04, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, @@ -227,4 +224,7 @@ const unsigned char aligned_data(4) romfs_img[] = const unsigned int romfs_img_len = 1024; #endif /* CONFIG_DEBUG_FEATURES */ -#endif /* __BOARDS_ARM_S32K1XX_RDDRONE_BMS772_INCLUDE_NSH_ROMFSIMG_H */ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig b/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig index 1a49bd8c7c..6e63c1b7ea 100644 --- a/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig +++ b/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig @@ -31,6 +31,7 @@ CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_TCPBLASTER=y CONFIG_EXAMPLES_TCPECHO=y @@ -74,13 +75,11 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " CONFIG_NSH_QUOTE=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=268435456 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/sama5/jupiter-nano/src/Makefile b/boards/arm/sama5/jupiter-nano/src/Makefile index 48cbb39e94..5c6a583e88 100644 --- a/boards/arm/sama5/jupiter-nano/src/Makefile +++ b/boards/arm/sama5/jupiter-nano/src/Makefile @@ -124,4 +124,8 @@ ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += sam_reset.c endif +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/sama5/jupiter-nano/include/nsh_romfsimg.h b/boards/arm/sama5/jupiter-nano/src/etc_romfs.c similarity index 94% rename from boards/arm/sama5/jupiter-nano/include/nsh_romfsimg.h rename to boards/arm/sama5/jupiter-nano/src/etc_romfs.c index 7754a8b092..da472ddd5a 100644 --- a/boards/arm/sama5/jupiter-nano/include/nsh_romfsimg.h +++ b/boards/arm/sama5/jupiter-nano/src/etc_romfs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/sama5/jupiter-nano/include/nsh_romfsimg.h + * boards/arm/sama5/jupiter-nano/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,7 +18,11 @@ * ****************************************************************************/ -const unsigned char aligned_data(4) romfs_img[] = +/**************************************************************************** + * Public Data + ****************************************************************************/ + +const unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0x30, 0x8b, 0x5f, 0xf8, 0x70, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, @@ -108,3 +112,7 @@ const unsigned char aligned_data(4) romfs_img[] = 0x00, 0x00, 0x00, 0x00 }; unsigned int romfs_img_len = 1024; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig index 5ffccdb74f..4382514edb 100644 --- a/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig +++ b/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig @@ -67,7 +67,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=268435456 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig b/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig index 8b37277f21..3709add1b2 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig @@ -33,6 +33,7 @@ CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_AUDIO=y +CONFIG_ETC_ROMFS=y CONFIG_ETH0_PHY_KSZ8081=y CONFIG_EXAMPLES_NX=y CONFIG_EXAMPLES_NX_BPP=16 @@ -75,11 +76,9 @@ CONFIG_NET_TCPBACKLOG=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NX=y CONFIG_NXFONT_SERIF22X28B=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sdcard" diff --git a/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig b/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig index d55c23b442..047b252d48 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig @@ -32,6 +32,7 @@ CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_AUDIO=y +CONFIG_ETC_ROMFS=y CONFIG_ETH0_PHY_KSZ8081=y CONFIG_EXAMPLES_NX=y CONFIG_EXAMPLES_NX_BPP=16 @@ -77,11 +78,9 @@ CONFIG_NET_TCPBACKLOG=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NX=y CONFIG_NXFONT_SERIF22X28B=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sdcard" diff --git a/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig b/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig index 8967bd1298..645ff44b8e 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig @@ -36,6 +36,7 @@ CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_AUDIO=y +CONFIG_ETC_ROMFS=y CONFIG_ETH0_PHY_KSZ8081=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -80,12 +81,10 @@ CONFIG_NET_TCPBACKLOG=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NX=y CONFIG_NXFONT_SANS28X37=y CONFIG_NXFONT_SANS28X37B=y diff --git a/boards/arm/sama5/sama5d4-ek/src/Makefile b/boards/arm/sama5/sama5d4-ek/src/Makefile index ee4f58cb85..f5e58d1efb 100644 --- a/boards/arm/sama5/sama5d4-ek/src/Makefile +++ b/boards/arm/sama5/sama5d4-ek/src/Makefile @@ -126,4 +126,8 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sam_buttons.c endif +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/sama5/sama5d4-ek/include/nsh_romfsimg.h b/boards/arm/sama5/sama5d4-ek/src/etc_romfs.c similarity index 94% rename from boards/arm/sama5/sama5d4-ek/include/nsh_romfsimg.h rename to boards/arm/sama5/sama5d4-ek/src/etc_romfs.c index 3848687837..15baf92577 100644 --- a/boards/arm/sama5/sama5d4-ek/include/nsh_romfsimg.h +++ b/boards/arm/sama5/sama5d4-ek/src/etc_romfs.c @@ -1,5 +1,5 @@ /*************************************************************************** - * boards/arm/sama5/sama5d4-ek/include/nsh_romfsimg.h + * boards/arm/sama5/sama5d4-ek/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,7 +18,12 @@ * ***************************************************************************/ -unsigned char romfs_img[] = { +/*************************************************************************** + * Public Data + ***************************************************************************/ + +unsigned char romfs_img[] = +{ 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x02, 0x00, 0xe7, 0x04, 0x63, 0xbd, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, @@ -107,3 +112,7 @@ unsigned char romfs_img[] = { 0x00, 0x00, 0x00, 0x00 }; unsigned int romfs_img_len = 1024; + +/*************************************************************************** + * Public Functions + ***************************************************************************/ diff --git a/boards/arm/samv7/same70-xplained/configs/pysim/defconfig b/boards/arm/samv7/same70-xplained/configs/pysim/defconfig index 9ab5ce07cf..42a080419f 100644 --- a/boards/arm/samv7/same70-xplained/configs/pysim/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/pysim/defconfig @@ -98,7 +98,6 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_LINELEN=64 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=2048 CONFIG_PREALLOC_TIMERS=4 CONFIG_PSEUDOTERM=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig index fb657574ad..13f96502f2 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig @@ -37,6 +37,8 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_AUDIO=y +CONFIG_ETC_FATDEVNO=0 +CONFIG_ETC_ROMFS=y CONFIG_EXAMPLES_NX=y CONFIG_EXAMPLES_NX_BPP=16 CONFIG_EXAMPLES_TOUCHSCREEN=y @@ -67,13 +69,10 @@ CONFIG_MTD_CONFIG=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART_SECTOR_SIZE=512 CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=0 CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LINELEN=64 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NSH_STRERROR=y CONFIG_NX=y CONFIG_NXFONT_SANS17X23B=y diff --git a/boards/arm/stm32/mikroe-stm32f4/src/Make.defs b/boards/arm/stm32/mikroe-stm32f4/src/Make.defs index 35ac932e8b..0e41d11e5e 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/Make.defs +++ b/boards/arm/stm32/mikroe-stm32f4/src/Make.defs @@ -66,6 +66,10 @@ ifeq ($(CONFIG_AUDIO_VS1053),y) CSRCS += stm32_vs1053.c endif +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/mikroe-stm32f4/include/nsh_romfsimg.h b/boards/arm/stm32/mikroe-stm32f4/src/etc_romfs.c similarity index 94% rename from boards/arm/stm32/mikroe-stm32f4/include/nsh_romfsimg.h rename to boards/arm/stm32/mikroe-stm32f4/src/etc_romfs.c index 491bee0dc5..0a975ef072 100644 --- a/boards/arm/stm32/mikroe-stm32f4/include/nsh_romfsimg.h +++ b/boards/arm/stm32/mikroe-stm32f4/src/etc_romfs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/mikroe-stm32f4/include/nsh_romfsimg.h + * boards/arm/stm32/mikroe-stm32f4/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,6 +18,10 @@ * ****************************************************************************/ +/**************************************************************************** + * Public Data + ****************************************************************************/ + unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0x80, @@ -108,3 +112,7 @@ unsigned char romfs_img[] = 0x00, 0x00, 0x00, 0x00 }; unsigned int romfs_img_len = 1024; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig b/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig index 7ec46123ce..1578b6c60c 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig +++ b/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig @@ -25,6 +25,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y CONFIG_EXAMPLES_ALARM=y CONFIG_EXAMPLES_MEDIA=y CONFIG_FS_PROCFS=y @@ -40,12 +41,10 @@ CONFIG_MTD_N25QXXX=y CONFIG_MTD_PARTITION=y CONFIG_N25QXXX_SECTOR512=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=98304 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32l4/stm32l476vg-disco/include/rc.sysinit.template b/boards/arm/stm32l4/stm32l476vg-disco/include/rc.sysinit.template index acbbe6da1e..fd5898636f 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/include/rc.sysinit.template +++ b/boards/arm/stm32l4/stm32l476vg-disco/include/rc.sysinit.template @@ -1,2 +1,2 @@ # sample rc.sysinit file; you must run tools/genromfs from within this -# location to convert this file to nsh_romfsimg.h for inclusion in the build +# location to convert this file to etc_romfs.c for inclusion in the build diff --git a/boards/arm/stm32l4/stm32l476vg-disco/include/rcS.template b/boards/arm/stm32l4/stm32l476vg-disco/include/rcS.template index 1e5059e749..d7f1e567fc 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/include/rcS.template +++ b/boards/arm/stm32l4/stm32l476vg-disco/include/rcS.template @@ -1,2 +1,2 @@ # sample rcS file; you must run tools/genromfs from within this -# location to convert this file to nsh_romfsimg.h for inclusion in the build +# location to convert this file to etc_romfs.c for inclusion in the build diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile b/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile index 0ee7033705..6cbc4a82c1 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile +++ b/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile @@ -48,4 +48,8 @@ ifeq ($(CONFIG_BOARDCTL),y) CSRCS += stm32_appinit.c endif +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32l4/stm32l476vg-disco/include/nsh_romfsimg.h b/boards/arm/stm32l4/stm32l476vg-disco/src/etc_romfs.c similarity index 94% rename from boards/arm/stm32l4/stm32l476vg-disco/include/nsh_romfsimg.h rename to boards/arm/stm32l4/stm32l476vg-disco/src/etc_romfs.c index 4d375809ed..3752422bf7 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/include/nsh_romfsimg.h +++ b/boards/arm/stm32l4/stm32l476vg-disco/src/etc_romfs.c @@ -1,5 +1,5 @@ /*************************************************************************** - * boards/arm/stm32l4/stm32l476vg-disco/include/nsh_romfsimg.h + * boards/arm/stm32l4/stm32l476vg-disco/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,7 +18,12 @@ * ***************************************************************************/ -unsigned char romfs_img[] = { +/*************************************************************************** + * Public Data + ***************************************************************************/ + +unsigned char romfs_img[] = +{ 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0x80, 0x42, 0x56, 0x48, 0x93, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, @@ -107,3 +112,7 @@ unsigned char romfs_img[] = { 0x00, 0x00, 0x00, 0x00 }; unsigned int romfs_img_len = 1024; + +/*************************************************************************** + * Public Functions + ***************************************************************************/ diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig index 7f236453b9..5651ad4c72 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig @@ -24,6 +24,7 @@ CONFIG_BOARD_LOOPSPERMSEC=9234 CONFIG_BUILTIN=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y CONFIG_EXAMPLES_ALARM=y CONFIG_EXAMPLES_MEDIA=y CONFIG_EXAMPLES_RANDOM=y @@ -41,12 +42,10 @@ CONFIG_MM_REGIONS=3 CONFIG_MTD=y CONFIG_MTD_PARTITION=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=98304 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/include/rc.sysinit.template b/boards/arm/stm32l4/stm32l4r9ai-disco/include/rc.sysinit.template index acbbe6da1e..fd5898636f 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/include/rc.sysinit.template +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/include/rc.sysinit.template @@ -1,2 +1,2 @@ # sample rc.sysinit file; you must run tools/genromfs from within this -# location to convert this file to nsh_romfsimg.h for inclusion in the build +# location to convert this file to etc_romfs.c for inclusion in the build diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/include/rcS.template b/boards/arm/stm32l4/stm32l4r9ai-disco/include/rcS.template index 1e5059e749..d7f1e567fc 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/include/rcS.template +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/include/rcS.template @@ -1,2 +1,2 @@ # sample rcS file; you must run tools/genromfs from within this -# location to convert this file to nsh_romfsimg.h for inclusion in the build +# location to convert this file to etc_romfs.c for inclusion in the build diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile b/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile index ea6187b902..6ebd296e49 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile @@ -61,4 +61,8 @@ ifeq ($(CONFIG_BOARDCTL),y) CSRCS += stm32_appinit.c endif +ifeq ($(CONFIG_ETC_ROMFS),y) +CSRCS += etc_romfs.c +endif + include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/include/nsh_romfsimg.h b/boards/arm/stm32l4/stm32l4r9ai-disco/src/etc_romfs.c similarity index 94% rename from boards/arm/stm32l4/stm32l4r9ai-disco/include/nsh_romfsimg.h rename to boards/arm/stm32l4/stm32l4r9ai-disco/src/etc_romfs.c index edb2dc8a56..fa5387160b 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/include/nsh_romfsimg.h +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/etc_romfs.c @@ -1,5 +1,5 @@ /*************************************************************************** - * boards/arm/stm32l4/stm32l4r9ai-disco/include/nsh_romfsimg.h + * boards/arm/stm32l4/stm32l4r9ai-disco/src/etc_romfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,7 +18,12 @@ * ***************************************************************************/ -unsigned char romfs_img[] = { +/*************************************************************************** + * Public Data + ***************************************************************************/ + +unsigned char romfs_img[] = +{ 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0x80, 0x42, 0x56, 0x48, 0x93, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, @@ -107,3 +112,7 @@ unsigned char romfs_img[] = { 0x00, 0x00, 0x00, 0x00 }; unsigned int romfs_img_len = 1024; + +/*************************************************************************** + * Public Functions + ***************************************************************************/ diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/include/nsh_romfsimg.h b/boards/arm/tms570/tms570ls31x-usb-kit/include/nsh_romfsimg.h deleted file mode 100644 index 3c51fc8af5..0000000000 --- a/boards/arm/tms570/tms570ls31x-usb-kit/include/nsh_romfsimg.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * boards/arm/tms570/tms570ls31x-usb-kit/include/nsh_romfsimg.h - * Copyright (C) 2013 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* nsh_romfsetc.h - * - * This file is a stub for 'make export' purposes; the actual ROMFS - * must be supplied by the library client. - */ - -extern unsigned char romfs_img[]; -extern unsigned int romfs_img_len; diff --git a/boards/arm64/a64/pinephone/configs/lcd/defconfig b/boards/arm64/a64/pinephone/configs/lcd/defconfig index 1d8fb09a60..7688f3fd93 100644 --- a/boards/arm64/a64/pinephone/configs/lcd/defconfig +++ b/boards/arm64/a64/pinephone/configs/lcd/defconfig @@ -39,7 +39,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PINEPHONE_LCD=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 diff --git a/boards/arm64/a64/pinephone/configs/lvgl/defconfig b/boards/arm64/a64/pinephone/configs/lvgl/defconfig index dc074fe0c7..2b71e2945c 100644 --- a/boards/arm64/a64/pinephone/configs/lvgl/defconfig +++ b/boards/arm64/a64/pinephone/configs/lvgl/defconfig @@ -57,7 +57,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PINEPHONE_LCD=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 diff --git a/boards/arm64/a64/pinephone/configs/nsh/defconfig b/boards/arm64/a64/pinephone/configs/nsh/defconfig index f2666816d1..78c4a380e0 100644 --- a/boards/arm64/a64/pinephone/configs/nsh/defconfig +++ b/boards/arm64/a64/pinephone/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/a64/pinephone/configs/sensor/defconfig b/boards/arm64/a64/pinephone/configs/sensor/defconfig index c6fa2de8bc..27d214893d 100644 --- a/boards/arm64/a64/pinephone/configs/sensor/defconfig +++ b/boards/arm64/a64/pinephone/configs/sensor/defconfig @@ -42,7 +42,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig index 43d89f983e..9d26c77b42 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig @@ -36,7 +36,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig index 9e1dfe3747..b69c196495 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig @@ -36,7 +36,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig index 3a7a507b1b..34c8ecec69 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig index 07c0dacb29..8284fac1f8 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig @@ -38,7 +38,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig b/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig index fdccfbd8fd..77c1e320d2 100644 --- a/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig +++ b/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAMLOG=y CONFIG_RAM_SIZE=134217728 diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig index 555e56126e..561df15522 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig @@ -37,7 +37,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig index 1bd0feb067..2d7623cc4e 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig @@ -35,7 +35,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=16384 CONFIG_RAMLOG=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig index 25100dcaa3..102b2e3cc9 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig @@ -45,7 +45,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig index 8976c6914c..225100b379 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig @@ -46,7 +46,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig index 4ba30653b4..4a09582c94 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig @@ -38,7 +38,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig index 3a21ddf0f7..c9c4ef0862 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig @@ -38,7 +38,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=16384 CONFIG_RAMLOG=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig index 95eed2b60d..5aa5dd1f5c 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig @@ -36,7 +36,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=16384 CONFIG_RAMLOG=y diff --git a/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig b/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig index 1cb85eb456..05d45a8ce4 100644 --- a/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig +++ b/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig @@ -27,6 +27,7 @@ CONFIG_DEBUG_SCHED_WARN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEFAULT_TASK_STACKSIZE=8192 CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_LEDS=y CONFIG_EXPERIMENTAL=y @@ -38,11 +39,9 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/arm64/rk3399/nanopi_m4/include/nsh_romfsimg.h b/boards/arm64/rk3399/nanopi_m4/include/nsh_romfsimg.h deleted file mode 100644 index 61cc98debb..0000000000 --- a/boards/arm64/rk3399/nanopi_m4/include/nsh_romfsimg.h +++ /dev/null @@ -1,22 +0,0 @@ -/*************************************************************************** - * boards/arm64/rk3399/nanopi_m4/include/nsh_romfsimg.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ***************************************************************************/ - -extern const unsigned char romfs_img[]; -extern unsigned int romfs_img_len; diff --git a/boards/arm64/rk3399/nanopi_m4/src/Makefile b/boards/arm64/rk3399/nanopi_m4/src/Makefile index 2f6fedebb4..e64f06871d 100644 --- a/boards/arm64/rk3399/nanopi_m4/src/Makefile +++ b/boards/arm64/rk3399/nanopi_m4/src/Makefile @@ -23,10 +23,8 @@ include $(TOPDIR)/Make.defs CSRCS = nanopi_m4_boardinit.c CSRCS += nanopi_m4_appinit.c -ifeq ($(CONFIG_NSH_ROMFSETC),y) -ifneq ($(CONFIG_NSH_CUSTOMROMFS),y) +ifeq ($(CONFIG_ETC_ROMFS),y) RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS endif -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig b/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig index 6b747e755b..958406938e 100644 --- a/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig +++ b/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig @@ -41,7 +41,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PTHREAD_STACK_MIN=8192 CONFIG_RAMLOG=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit-rust-1/include/nsh_romfsimg.h b/boards/risc-v/esp32c3/esp32c3-devkit-rust-1/include/nsh_romfsimg.h deleted file mode 100644 index f09b3d9ef7..0000000000 --- a/boards/risc-v/esp32c3/esp32c3-devkit-rust-1/include/nsh_romfsimg.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - * boards/risc-v/esp32c3/esp32c3-devkit-rust-1/include/nsh_romfsimg.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_RISCV_ESP32C3_ESP32C3_DEVKIT_RUST1_INCLUDE_NSH_ROMFSIMG_H -#define __BOARDS_RISCV_ESP32C3_ESP32C3_DEVKIT_RUST1_INCLUDE_NSH_ROMFSIMG_H -extern const unsigned char romfs_img[]; -extern const unsigned int romfs_img_len; -#endif diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig index c9d70d0a59..2698129e36 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig @@ -17,9 +17,12 @@ CONFIG_ARCH_CHIP_ESP32C3WROOM02=y CONFIG_ARCH_INTERRUPTSTACK=1536 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y +CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=15000 CONFIG_BUILTIN=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=6 CONFIG_EXAMPLES_ROMFS=y CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y @@ -30,12 +33,9 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=6 -CONFIG_NSH_ROMFSETC=y CONFIG_NSH_STRERROR=y CONFIG_PREALLOC_TIMERS=0 CONFIG_RR_INTERVAL=200 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig index 92b86bf3c5..0424471db0 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig @@ -21,6 +21,7 @@ CONFIG_BOARD_LOOPSPERMSEC=15000 CONFIG_BUILTIN=y CONFIG_DEV_ZERO=y CONFIG_ESP32C3_TWAI0=y +CONFIG_ETC_ROMFS=y CONFIG_EXAMPLES_CAN=y CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y @@ -34,7 +35,6 @@ CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_NSH_STRERROR=y CONFIG_PREALLOC_TIMERS=0 CONFIG_PRIORITY_INHERITANCE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/include/nsh_romfsimg.h b/boards/risc-v/esp32c3/esp32c3-devkit/include/nsh_romfsimg.h deleted file mode 100644 index 6b293e9f3b..0000000000 --- a/boards/risc-v/esp32c3/esp32c3-devkit/include/nsh_romfsimg.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - * boards/risc-v/esp32c3/esp32c3-devkit/include/nsh_romfsimg.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_RISCV_ESP32C3_ESP32C3_DEVKIT_INCLUDE_NSH_ROMFSIMG_H -#define __BOARDS_RISCV_ESP32C3_ESP32C3_DEVKIT_INCLUDE_NSH_ROMFSIMG_H -extern const unsigned char romfs_img[]; -extern const unsigned int romfs_img_len; -#endif diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs b/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs index 83ecb43b6e..391e701e6f 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs @@ -42,12 +42,10 @@ ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y) CSRCS += esp32c3_uid.c endif -ifeq ($(CONFIG_NSH_ROMFSETC),y) -ifneq ($(CONFIG_NSH_CUSTOMROMFS),y) +ifeq ($(CONFIG_ETC_ROMFS),y) RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS RCRAWS = etc/group etc/passwd endif -endif DEPPATH += --dep-path board VPATH += :board diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rc.sysinit b/boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rc.sysinit index 044f5b6950..53e4c5953a 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rc.sysinit +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/etc/init.d/rc.sysinit @@ -23,14 +23,14 @@ #define CONCAT_(x, y) x##y #define CONCAT(x, y) CONCAT_(x, y) -#ifdef CONFIG_NSH_ROMFSETC +#ifdef CONFIG_ETC_ROMFS #ifdef CONFIG_FS_FAT /* Create a RAMDISK and mount it at /tmp */ -mkrd -m CONFIG_NSH_FATDEVNO -s CONFIG_NSH_FATSECTSIZE CONFIG_NSH_FATNSECTORS -mkfatfs CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO) -mount -t vfat CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO) CONFIG_NSH_FATMOUNTPT +mkrd -m CONFIG_ETC_FATDEVNO -s CONFIG_ETC_FATSECTSIZE CONFIG_ETC_FATNSECTORS +mkfatfs CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) +mount -t vfat CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) CONFIG_ETC_FATMOUNTPT #endif /* CONFIG_FS_FAT */ -#endif /* CONFIG_NSH_ROMFSETC */ +#endif /* CONFIG_ETC_ROMFS */ diff --git a/boards/risc-v/qemu-rv/rv-virt/include/nsh_romfsimg.h b/boards/risc-v/qemu-rv/rv-virt/include/nsh_romfsimg.h deleted file mode 100644 index 2531e9e47c..0000000000 --- a/boards/risc-v/qemu-rv/rv-virt/include/nsh_romfsimg.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - * boards/risc-v/qemu-rv/rv-virt/include/nsh_romfsimg.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_RISCV_QEMU_RV_RV_VIRT_INCLUDE_NSH_ROMFSIMG_H -#define __BOARDS_RISCV_QEMU_RV_RV_VIRT_INCLUDE_NSH_ROMFSIMG_H -extern const unsigned char romfs_img[]; -extern const unsigned int romfs_img_len; -#endif diff --git a/boards/sim/sim/sim/configs/alsa/defconfig b/boards/sim/sim/sim/configs/alsa/defconfig index 60fb1a63e4..d98ffd9e98 100644 --- a/boards/sim/sim/sim/configs/alsa/defconfig +++ b/boards/sim/sim/sim/configs/alsa/defconfig @@ -20,6 +20,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -36,13 +39,9 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/bas/defconfig b/boards/sim/sim/sim/configs/bas/defconfig index ca916c87d6..657eb8b0d9 100644 --- a/boards/sim/sim/sim/configs/bas/defconfig +++ b/boards/sim/sim/sim/configs/bas/defconfig @@ -15,6 +15,9 @@ CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FS_FAT=y @@ -29,11 +32,8 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_WAITPID=y diff --git a/boards/sim/sim/sim/configs/bastest/defconfig b/boards/sim/sim/sim/configs/bastest/defconfig index 50dadd9873..f28fbf3f00 100644 --- a/boards/sim/sim/sim/configs/bastest/defconfig +++ b/boards/sim/sim/sim/configs/bastest/defconfig @@ -13,12 +13,16 @@ CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_POWEROFF=y +CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_BASTEST=y CONFIG_EXAMPLES_BASTEST_DEVMINOR=6 CONFIG_EXAMPLES_BASTEST_DEVPATH="/dev/ram6" @@ -40,16 +44,12 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/bluetooth/defconfig b/boards/sim/sim/sim/configs/bluetooth/defconfig index 6a30af2d7b..0d8e46f00d 100644 --- a/boards/sim/sim/sim/configs/bluetooth/defconfig +++ b/boards/sim/sim/sim/configs/bluetooth/defconfig @@ -26,6 +26,9 @@ CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_BLUETOOTH=y CONFIG_DRIVERS_WIRELESS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -47,13 +50,9 @@ CONFIG_NETINIT_NETLOCAL=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PREALLOC_MQ_MSGS=64 CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/bthcisock/defconfig b/boards/sim/sim/sim/configs/bthcisock/defconfig index ba512382ec..9bbf26d83e 100644 --- a/boards/sim/sim/sim/configs/bthcisock/defconfig +++ b/boards/sim/sim/sim/configs/bthcisock/defconfig @@ -27,6 +27,9 @@ CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_BLUETOOTH=y CONFIG_DRIVERS_WIRELESS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -48,13 +51,9 @@ CONFIG_NETINIT_NETLOCAL=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PREALLOC_MQ_MSGS=64 CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/btuart/defconfig b/boards/sim/sim/sim/configs/btuart/defconfig index feebe89b94..94e4e0a063 100644 --- a/boards/sim/sim/sim/configs/btuart/defconfig +++ b/boards/sim/sim/sim/configs/btuart/defconfig @@ -17,14 +17,13 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DRIVERS_BLUETOOTH=y CONFIG_DRIVERS_WIRELESS=y +CONFIG_ETC_ROMFS=y CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSETC=y CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_WAITPID=y CONFIG_SIM_HCISOCKET=y diff --git a/boards/sim/sim/sim/configs/citest/defconfig b/boards/sim/sim/sim/configs/citest/defconfig index 70ffa16a74..d77325fbb1 100644 --- a/boards/sim/sim/sim/configs/citest/defconfig +++ b/boards/sim/sim/sim/configs/citest/defconfig @@ -26,6 +26,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_HELLOXX=y @@ -59,15 +62,11 @@ CONFIG_LIBC_SCANSET=y CONFIG_NET=y CONFIG_NET_USRSOCK=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/crypto/defconfig b/boards/sim/sim/sim/configs/crypto/defconfig index 8efd95a706..e186a113b7 100644 --- a/boards/sim/sim/sim/configs/crypto/defconfig +++ b/boards/sim/sim/sim/configs/crypto/defconfig @@ -28,6 +28,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -57,13 +60,9 @@ CONFIG_MBEDTLS_SHA1_ALT=y CONFIG_MBEDTLS_SHA256_ALT=y CONFIG_MBEDTLS_SHA512_ALT=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/duktape/defconfig b/boards/sim/sim/sim/configs/duktape/defconfig index ef3af62075..b7612fe3fa 100644 --- a/boards/sim/sim/sim/configs/duktape/defconfig +++ b/boards/sim/sim/sim/configs/duktape/defconfig @@ -19,6 +19,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -37,16 +40,12 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/foc/defconfig b/boards/sim/sim/sim/configs/foc/defconfig index c0e71bfffb..3c4cb93118 100644 --- a/boards/sim/sim/sim/configs/foc/defconfig +++ b/boards/sim/sim/sim/configs/foc/defconfig @@ -22,6 +22,9 @@ CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_FOC=y CONFIG_EXAMPLES_FOC_FIXED16_INST=2 CONFIG_EXAMPLES_FOC_FLOAT_INST=2 @@ -64,15 +67,11 @@ CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_DUMMY=y CONFIG_MOTOR_FOC_INST=4 CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/ipforward/defconfig b/boards/sim/sim/sim/configs/ipforward/defconfig index 944926a929..bd7df5fb4b 100644 --- a/boards/sim/sim/sim/configs/ipforward/defconfig +++ b/boards/sim/sim/sim/configs/ipforward/defconfig @@ -22,6 +22,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_IPFORWARD=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -47,13 +50,9 @@ CONFIG_NET_TCPBACKLOG=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_TUN=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/libcxxtest/defconfig b/boards/sim/sim/sim/configs/libcxxtest/defconfig index a747e790fc..a21ea68a04 100644 --- a/boards/sim/sim/sim/configs/libcxxtest/defconfig +++ b/boards/sim/sim/sim/configs/libcxxtest/defconfig @@ -28,6 +28,8 @@ CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_HELLOXX=y CONFIG_EXAMPLES_NETTEST=y @@ -71,11 +73,8 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_RTC=y diff --git a/boards/sim/sim/sim/configs/lua/defconfig b/boards/sim/sim/sim/configs/lua/defconfig index 2ef0f058c0..5b3a0c8d7d 100644 --- a/boards/sim/sim/sim/configs/lua/defconfig +++ b/boards/sim/sim/sim/configs/lua/defconfig @@ -20,6 +20,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_LUA_MODULE=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -45,13 +48,9 @@ CONFIG_LUA_LFS_MODULE=y CONFIG_LUA_LSYSLOG_MODULE=y CONFIG_LUA_LUV_MODULE=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_READLINE_CMD_HISTORY=y diff --git a/boards/sim/sim/sim/configs/matter/defconfig b/boards/sim/sim/sim/configs/matter/defconfig index 5eb4d39f56..6b1ed0b577 100644 --- a/boards/sim/sim/sim/configs/matter/defconfig +++ b/boards/sim/sim/sim/configs/matter/defconfig @@ -25,6 +25,9 @@ CONFIG_DEV_URANDOM=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_BLUETOOTH=y CONFIG_DRIVERS_WIRELESS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -93,15 +96,11 @@ CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/minibasic/defconfig b/boards/sim/sim/sim/configs/minibasic/defconfig index aa495a9943..52b4afc400 100644 --- a/boards/sim/sim/sim/configs/minibasic/defconfig +++ b/boards/sim/sim/sim/configs/minibasic/defconfig @@ -18,6 +18,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -35,13 +38,9 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/minmea/defconfig b/boards/sim/sim/sim/configs/minmea/defconfig index 0d39a65038..88b5730777 100644 --- a/boards/sim/sim/sim/configs/minmea/defconfig +++ b/boards/sim/sim/sim/configs/minmea/defconfig @@ -21,6 +21,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -46,16 +49,12 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/nimble/defconfig b/boards/sim/sim/sim/configs/nimble/defconfig index 0a1cc0045a..9de97378d0 100644 --- a/boards/sim/sim/sim/configs/nimble/defconfig +++ b/boards/sim/sim/sim/configs/nimble/defconfig @@ -29,6 +29,9 @@ CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_BLUETOOTH=y CONFIG_DRIVERS_WIRELESS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_NIMBLE=y CONFIG_FAT_LCNAMES=y @@ -53,13 +56,9 @@ CONFIG_NET_STATISTICS=y CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PREALLOC_MQ_MSGS=64 CONFIG_PTHREAD_MUTEX_TYPES=y diff --git a/boards/sim/sim/sim/configs/nsh/defconfig b/boards/sim/sim/sim/configs/nsh/defconfig index 9d509e53ea..fbb4f2874e 100644 --- a/boards/sim/sim/sim/configs/nsh/defconfig +++ b/boards/sim/sim/sim/configs/nsh/defconfig @@ -20,6 +20,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -44,16 +47,12 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/nsh2/defconfig b/boards/sim/sim/sim/configs/nsh2/defconfig index 508ebf2f2b..e4bfdc0b85 100644 --- a/boards/sim/sim/sim/configs/nsh2/defconfig +++ b/boards/sim/sim/sim/configs/nsh2/defconfig @@ -17,6 +17,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DISABLE_POSIX_TIMERS=y CONFIG_DRIVERS_VIDEO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_NX=y CONFIG_EXAMPLES_NXHELLO=y CONFIG_EXAMPLES_NXHELLO_FONTID=6 @@ -36,10 +39,7 @@ CONFIG_INPUT=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_NX=y CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONT_SANS28X37B=y diff --git a/boards/sim/sim/sim/configs/nxcamera/defconfig b/boards/sim/sim/sim/configs/nxcamera/defconfig index 0544380b14..1b27f6e808 100644 --- a/boards/sim/sim/sim/configs/nxcamera/defconfig +++ b/boards/sim/sim/sim/configs/nxcamera/defconfig @@ -22,6 +22,9 @@ CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_VIDEO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -45,13 +48,9 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_LIBYUV=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/nxlines/defconfig b/boards/sim/sim/sim/configs/nxlines/defconfig index b1c7bdc2aa..234735d942 100644 --- a/boards/sim/sim/sim/configs/nxlines/defconfig +++ b/boards/sim/sim/sim/configs/nxlines/defconfig @@ -18,6 +18,9 @@ CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_DEBUG_SYMBOLS=y CONFIG_DISABLE_POSIX_TIMERS=y CONFIG_DRIVERS_VIDEO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_NXLINES=y CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x00006400 CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0x00ffff00 @@ -35,11 +38,8 @@ CONFIG_INIT_ENTRYPOINT="nxlines_main" CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_NX=y CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONT_SANS28X37B=y diff --git a/boards/sim/sim/sim/configs/nxwm/defconfig b/boards/sim/sim/sim/configs/nxwm/defconfig index 7026aa62b5..6dd1c95594 100644 --- a/boards/sim/sim/sim/configs/nxwm/defconfig +++ b/boards/sim/sim/sim/configs/nxwm/defconfig @@ -16,6 +16,9 @@ CONFIG_ARCH_SIM=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DISABLE_POSIX_TIMERS=y CONFIG_DRIVERS_VIDEO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FS_FAT=y @@ -26,11 +29,8 @@ CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nxwm_main" CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_NX=y CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONT_SANS28X37B=y diff --git a/boards/sim/sim/sim/configs/posix_test/defconfig b/boards/sim/sim/sim/configs/posix_test/defconfig index 509eb1f9ef..c18d7842a3 100644 --- a/boards/sim/sim/sim/configs/posix_test/defconfig +++ b/boards/sim/sim/sim/configs/posix_test/defconfig @@ -25,6 +25,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -58,15 +61,11 @@ CONFIG_LIBC_PASSWD_FILE=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NDEBUG=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PIPES=y CONFIG_PSEUDOFS_ATTRIBUTES=y diff --git a/boards/sim/sim/sim/configs/romfs/defconfig b/boards/sim/sim/sim/configs/romfs/defconfig index f1ebc7f6ee..c0405d55aa 100644 --- a/boards/sim/sim/sim/configs/romfs/defconfig +++ b/boards/sim/sim/sim/configs/romfs/defconfig @@ -13,12 +13,16 @@ CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_POWEROFF=y +CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_ROMFS=y CONFIG_FAT_LCNAMES=y @@ -36,16 +40,12 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=6 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/rust/defconfig b/boards/sim/sim/sim/configs/rust/defconfig index adc1ab2366..40a4626fc5 100644 --- a/boards/sim/sim/sim/configs/rust/defconfig +++ b/boards/sim/sim/sim/configs/rust/defconfig @@ -20,6 +20,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO_RUST=y CONFIG_FAT_LCNAMES=y @@ -43,16 +46,12 @@ CONFIG_LIBC_LOCALE_CATALOG=y CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/segger/defconfig b/boards/sim/sim/sim/configs/segger/defconfig index 7834435d6c..b1a401a13d 100644 --- a/boards/sim/sim/sim/configs/segger/defconfig +++ b/boards/sim/sim/sim/configs/segger/defconfig @@ -22,6 +22,9 @@ CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y CONFIG_DRIVERS_NOTE=y CONFIG_DRIVERS_NOTE_MAX=5 +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -46,15 +49,11 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_NOTE_RTT=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/smartfs/defconfig b/boards/sim/sim/sim/configs/smartfs/defconfig index 14247c75e6..b7813e2434 100644 --- a/boards/sim/sim/sim/configs/smartfs/defconfig +++ b/boards/sim/sim/sim/configs/smartfs/defconfig @@ -23,6 +23,8 @@ CONFIG_DEBUG_FS_ERROR=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_FSUTILS_PASSWD=y CONFIG_FSUTILS_PASSWD_READONLY=y @@ -41,7 +43,6 @@ CONFIG_MTD_N25QXXX=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_DISABLE_LOSMART=y @@ -49,8 +50,6 @@ CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y CONFIG_QSPI_FLASH=y diff --git a/boards/sim/sim/sim/configs/tcploop/defconfig b/boards/sim/sim/sim/configs/tcploop/defconfig index b12d9a24d2..5a2f135db5 100644 --- a/boards/sim/sim/sim/configs/tcploop/defconfig +++ b/boards/sim/sim/sim/configs/tcploop/defconfig @@ -22,6 +22,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_TCPBLASTER=y CONFIG_EXAMPLES_TCPBLASTER_LOOPBACK=y CONFIG_FAT_LCNAMES=y @@ -49,13 +52,9 @@ CONFIG_NET_TCPBACKLOG=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_TUN=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/toywasm/defconfig b/boards/sim/sim/sim/configs/toywasm/defconfig index c39eb9cd25..fa63d549a9 100644 --- a/boards/sim/sim/sim/configs/toywasm/defconfig +++ b/boards/sim/sim/sim/configs/toywasm/defconfig @@ -21,6 +21,8 @@ CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_FSUTILS_PASSWD=y CONFIG_FSUTILS_PASSWD_READONLY=y CONFIG_FS_BINFS=y @@ -59,11 +61,8 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_RTC=y diff --git a/boards/sim/sim/sim/configs/udgram/defconfig b/boards/sim/sim/sim/configs/udgram/defconfig index 8a041378a7..60f75396cb 100644 --- a/boards/sim/sim/sim/configs/udgram/defconfig +++ b/boards/sim/sim/sim/configs/udgram/defconfig @@ -18,6 +18,9 @@ CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_UDGRAM=y CONFIG_EXAMPLES_UDGRAM_CLIENT_STACKSIZE=8192 @@ -36,11 +39,8 @@ CONFIG_NET=y CONFIG_NET_LOCAL=y CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_WAITPID=y diff --git a/boards/sim/sim/sim/configs/unionfs/defconfig b/boards/sim/sim/sim/configs/unionfs/defconfig index 729530f58f..4bc7d6b745 100644 --- a/boards/sim/sim/sim/configs/unionfs/defconfig +++ b/boards/sim/sim/sim/configs/unionfs/defconfig @@ -11,10 +11,14 @@ CONFIG_ARCH_BOARD="sim" CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y +CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=2 CONFIG_EXAMPLES_UNIONFS=y CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_A=4 CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_B=5 @@ -32,11 +36,8 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_WAITPID=y diff --git a/boards/sim/sim/sim/configs/userfs/defconfig b/boards/sim/sim/sim/configs/userfs/defconfig index 2f822c2859..d5c17981f9 100644 --- a/boards/sim/sim/sim/configs/userfs/defconfig +++ b/boards/sim/sim/sim/configs/userfs/defconfig @@ -20,6 +20,9 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_USERFS=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -39,13 +42,9 @@ CONFIG_NET_LOCAL=y CONFIG_NET_LOOPBACK=y CONFIG_NET_UDP=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/ustream/defconfig b/boards/sim/sim/sim/configs/ustream/defconfig index 68dacb2e3a..7fe126ca41 100644 --- a/boards/sim/sim/sim/configs/ustream/defconfig +++ b/boards/sim/sim/sim/configs/ustream/defconfig @@ -19,6 +19,9 @@ CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_USTREAM=y CONFIG_FAT_LCNAMES=y @@ -36,11 +39,8 @@ CONFIG_NET=y CONFIG_NET_LOCAL=y CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_WAITPID=y diff --git a/boards/sim/sim/sim/configs/vpnkit/defconfig b/boards/sim/sim/sim/configs/vpnkit/defconfig index 4720bccf2a..2f111228f4 100644 --- a/boards/sim/sim/sim/configs/vpnkit/defconfig +++ b/boards/sim/sim/sim/configs/vpnkit/defconfig @@ -21,6 +21,8 @@ CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_NETTEST=y CONFIG_FSUTILS_PASSWD=y @@ -60,11 +62,8 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_READLINE_TABCOMPLETION=y CONFIG_RTC=y diff --git a/boards/sim/sim/sim/configs/wakaama/defconfig b/boards/sim/sim/sim/configs/wakaama/defconfig index 693a3269bf..eec583a6ab 100644 --- a/boards/sim/sim/sim/configs/wakaama/defconfig +++ b/boards/sim/sim/sim/configs/wakaama/defconfig @@ -25,6 +25,9 @@ CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_WGET=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -46,14 +49,10 @@ CONFIG_NET_USRSOCK_ICMPv6=y CONFIG_NET_USRSOCK_TCP=y CONFIG_NET_USRSOCK_UDP=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_READLINE_TABCOMPLETION=y CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_SPORADIC=y diff --git a/boards/sim/sim/sim/configs/wamr/defconfig b/boards/sim/sim/sim/configs/wamr/defconfig index 174f4bd9e4..233129f6e7 100644 --- a/boards/sim/sim/sim/configs/wamr/defconfig +++ b/boards/sim/sim/sim/configs/wamr/defconfig @@ -23,6 +23,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FSUTILS_PASSWD=y @@ -63,13 +66,9 @@ CONFIG_NET_BINDTODEVICE=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TUN=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_READLINE_CMD_HISTORY=y diff --git a/boards/sim/sim/sim/configs/zipfs/defconfig b/boards/sim/sim/sim/configs/zipfs/defconfig index 93673e3992..a0b5f674d2 100644 --- a/boards/sim/sim/sim/configs/zipfs/defconfig +++ b/boards/sim/sim/sim/configs/zipfs/defconfig @@ -20,6 +20,9 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y CONFIG_DEV_LOOP=y CONFIG_DEV_ZERO=y +CONFIG_ETC_FATDEVNO=2 +CONFIG_ETC_ROMFS=y +CONFIG_ETC_ROMFSDEVNO=1 CONFIG_EXAMPLES_GPIO=y CONFIG_EXAMPLES_HELLO=y CONFIG_FAT_LCNAMES=y @@ -47,15 +50,11 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_LIB_ZLIB=y CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_ARCHROMFS=y CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_FATDEVNO=2 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" CONFIG_NSH_READLINE=y -CONFIG_NSH_ROMFSDEVNO=1 -CONFIG_NSH_ROMFSETC=y CONFIG_PATH_INITIAL="/bin" CONFIG_PSEUDOFS_ATTRIBUTES=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/include/nsh_romfsimg.h b/boards/sim/sim/sim/include/nsh_romfsimg.h deleted file mode 100644 index f202472467..0000000000 --- a/boards/sim/sim/sim/include/nsh_romfsimg.h +++ /dev/null @@ -1,25 +0,0 @@ -/**************************************************************************** - * boards/sim/sim/sim/include/nsh_romfsimg.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __BOARDS_SIM_SIM_SIM_INCLUDE_NSH_ROMFSIMG_H -#define __BOARDS_SIM_SIM_SIM_INCLUDE_NSH_ROMFSIMG_H -extern const unsigned char romfs_img[]; -extern const unsigned int romfs_img_len; -#endif /* __BOARDS_SIM_SIM_SIM_INCLUDE_NSH_ROMFSIMG_H */ diff --git a/boards/sim/sim/sim/src/CMakeLists.txt b/boards/sim/sim/sim/src/CMakeLists.txt index a984ba7af3..332ce58c1b 100644 --- a/boards/sim/sim/sim/src/CMakeLists.txt +++ b/boards/sim/sim/sim/src/CMakeLists.txt @@ -64,7 +64,7 @@ target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/gnu-elf.ld") -if(CONFIG_NSH_ROMFSETC AND CONFIG_NSH_ARCHROMFS) +if(CONFIG_ETC_ROMFS) nuttx_add_romfs( NAME etc diff --git a/boards/sim/sim/sim/src/Makefile b/boards/sim/sim/sim/src/Makefile index d8d590dd5f..9aa65fd1f4 100644 --- a/boards/sim/sim/sim/src/Makefile +++ b/boards/sim/sim/sim/src/Makefile @@ -52,12 +52,10 @@ else endif endif -ifeq ($(CONFIG_NSH_ROMFSETC),y) -ifneq ($(CONFIG_NSH_CUSTOMROMFS),y) +ifeq ($(CONFIG_ETC_ROMFS),y) RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS RCRAWS = etc/group etc/passwd endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sim_buttons.c diff --git a/boards/sim/sim/sim/src/etc/init.d/rc.sysinit b/boards/sim/sim/sim/src/etc/init.d/rc.sysinit index 1d2f23dc31..ab4f07b451 100644 --- a/boards/sim/sim/sim/src/etc/init.d/rc.sysinit +++ b/boards/sim/sim/sim/src/etc/init.d/rc.sysinit @@ -23,14 +23,14 @@ #define CONCAT_(x, y) x##y #define CONCAT(x, y) CONCAT_(x, y) -#ifdef CONFIG_NSH_ROMFSETC +#ifdef CONFIG_ETC_ROMFS #ifdef CONFIG_FS_FAT /* Create a RAMDISK and mount it at /tmp */ -mkrd -m CONFIG_NSH_FATDEVNO -s CONFIG_NSH_FATSECTSIZE CONFIG_NSH_FATNSECTORS -mkfatfs CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO) -mount -t vfat CONCAT(/dev/ram, CONFIG_NSH_FATDEVNO) CONFIG_NSH_FATMOUNTPT +mkrd -m CONFIG_ETC_FATDEVNO -s CONFIG_ETC_FATSECTSIZE CONFIG_ETC_FATNSECTORS +mkfatfs CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) +mount -t vfat CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) CONFIG_ETC_FATMOUNTPT #endif /* CONFIG_FS_FAT */ -#endif /* CONFIG_NSH_ROMFSETC */ +#endif /* CONFIG_ETC_ROMFS */ diff --git a/include/nuttx/nuttx.h b/include/nuttx/nuttx.h index b6f37daafc..1c67a705e8 100644 --- a/include/nuttx/nuttx.h +++ b/include/nuttx/nuttx.h @@ -48,4 +48,9 @@ #define container_of(ptr, type, member) \ ((type *)((uintptr_t)(ptr) - offsetof(type, member))) +/* Stringify the arguments */ + +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + #endif /* __INCLUDE_NUTTX_NUTTX_H */ diff --git a/sched/Kconfig b/sched/Kconfig index 40512719b6..1963469ee4 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -528,6 +528,86 @@ config INIT_MOUNT_DATA endif # INIT_MOUNT endif # INIT_FILE +menuconfig ETC_ROMFS + bool "Auto-mount etc baked-in ROMFS image" + default n + depends on !DISABLE_MOUNTPOINT && FS_ROMFS + ---help--- + Mount a ROMFS filesystem at /etc and provide a system init + script at /etc/init.d/rc.sysinit and a startup script + at /etc/init.d/rcS. The default system init script will mount + a FAT FS RAMDISK at /tmp but the logic is easily extensible. + +if ETC_ROMFS + +config ETC_CROMFS + bool "Support CROMFS (compressed) start-up script" + default n + depends on FS_CROMFS + ---help--- + Mount a CROMFS filesystem at /etc and provide a compressed system + init script at /etc/init.d/rc.sysinit and a startup script + at /etc/init.d/rcS. + +config ETC_ROMFSMOUNTPT + string "Mountpoint of the etc romfs image" + default "/etc" + +config ETC_ROMFSDEVNO + int "ROMFS block device minor number" + default 0 + ---help--- + This is the minor number of the ROMFS block device. The default is + '0' corresponding to /dev/ram0. + +config ETC_ROMFSSECTSIZE + int "ROMFS sector size" + default 64 + ---help--- + This is the sector size to use with the ROMFS volume. Since the + default volume is very small, this defaults to 64 but should be + increased if the ROMFS volume were to be become large. Any value + selected must be a power of 2. + +config ETC_FATDEVNO + int "FAT block device minor number" + default 1 + depends on FS_FAT + ---help--- + When the default rcS file used when ETC_ROMFS is selected, it + will mount a FAT FS under /tmp. This is the minor number of the FAT + FS block device. The default is '1' corresponding to /dev/ram1. + +config ETC_FATSECTSIZE + int "FAT sector size" + default 512 + depends on FS_FAT + ---help--- + When the default rcS file used when ETC_ROMFS is selected, it + will mount a FAT FS under /tmp. This is the sector size use with the + FAT FS. Default is 512. + +config ETC_FATNSECTORS + int "FAT number of sectors" + default 1024 + depends on FS_FAT + ---help--- + When the default rcS file used when ETC_ROMFS is selected, it + will mount a FAT FS under /tmp. This is the number of sectors to use + with the FAT FS. Default is 1024. The amount of memory used by the + FAT FS will be ETC_FATSECTSIZE * ETC_FATNSECTORS bytes. + +config ETC_FATMOUNTPT + string "FAT mount point" + default "/tmp" + depends on FS_FAT + ---help--- + When the default rcS file used when ETC_ROMFS is selected, it + will mount a FAT FS under /tmp. This is the location where the FAT + FS will be mounted. Default is "/tmp". + +endif # ETC_ROMFS + config RR_INTERVAL int "Round robin timeslice (MSEC)" default 0 diff --git a/sched/init/nx_bringup.c b/sched/init/nx_bringup.c index 6244908ad3..b9922eb3b6 100644 --- a/sched/init/nx_bringup.c +++ b/sched/init/nx_bringup.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,11 @@ #include "init/init.h" #include "misc/coredump.h" +#ifdef CONFIG_ETC_ROMFS +# include +# include +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -116,6 +122,15 @@ extern const int CONFIG_INIT_NEXPORTS; # define CONFIG_INIT_PRIORITY SCHED_PRIORITY_DEFAULT #endif +#ifdef CONFIG_ETC_ROMFS +# define NSECTORS(b) (((b)+CONFIG_ETC_ROMFSSECTSIZE-1)/CONFIG_ETC_ROMFSSECTSIZE) +# define MKMOUNT_DEVNAME(m) "/dev/ram" STRINGIFY(m) +# define MOUNT_DEVNAME MKMOUNT_DEVNAME(CONFIG_ETC_ROMFSDEVNO) + +extern const unsigned char romfs_img[]; +extern const unsigned int romfs_img_len; +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -211,6 +226,58 @@ static inline void nx_workqueues(void) #endif /* CONFIG_SCHED_WORKQUEUE */ +/**************************************************************************** + * Name: nx_romfsetc + * + * Description: mount baked-in ROMFS image to /etc. + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_ETC_ROMFS +static inline void nx_romfsetc(void) +{ + int ret; + +#ifndef CONFIG_ETC_CROMFS + /* Create a ROM disk for the /etc filesystem */ + + ret = romdisk_register(CONFIG_ETC_ROMFSDEVNO, romfs_img, + NSECTORS(romfs_img_len), + CONFIG_ETC_ROMFSSECTSIZE); + if (ret < 0) + { + ferr("ERROR: romdisk_register failed: %d\n", -ret); + return; + } +#endif + + /* Mount the file system */ + + finfo("Mounting ROMFS filesystem at target=%s with source=%s\n", + CONFIG_ETC_ROMFSMOUNTPT, MOUNT_DEVNAME); + +#if defined(CONFIG_ETC_CROMFS) + ret = nx_mount(MOUNT_DEVNAME, CONFIG_ETC_ROMFSMOUNTPT, + "cromfs", MS_RDONLY, NULL); +#else + ret = nx_mount(MOUNT_DEVNAME, CONFIG_ETC_ROMFSMOUNTPT, + "romfs", MS_RDONLY, NULL); +#endif + if (ret < 0) + { + ferr("ERROR: nx_mount(%s,%s,romfs) failed: %d\n", + MOUNT_DEVNAME, CONFIG_ETC_ROMFSMOUNTPT, ret); + } +} + +#endif /* CONFIG_ETC_ROMFS */ + /**************************************************************************** * Name: nx_start_application * @@ -241,6 +308,10 @@ static inline void nx_start_application(void) #endif int ret; +#ifdef CONFIG_ETC_ROMFS + nx_romfsetc(); +#endif + #ifdef CONFIG_BOARD_LATE_INITIALIZE /* Perform any last-minute, board-specific initialization, if so * configured. diff --git a/tools/ci/testrun/script/test_os/test_os.py b/tools/ci/testrun/script/test_os/test_os.py index bd8c6f3938..f379a9ba66 100644 --- a/tools/ci/testrun/script/test_os/test_os.py +++ b/tools/ci/testrun/script/test_os/test_os.py @@ -28,7 +28,7 @@ def test_cxxtest(p): def test_scanftest(p): if p.board in do_not_support: pytest.skip("unsupported at {}".format(p.board)) - ret = p.sendCommand("scanftest", "FAILED: 0") + ret = p.sendCommand("scanftest", "Scanf tests done") assert ret == 0 diff --git a/tools/mkromfsimg.sh b/tools/mkromfsimg.sh index cbf2d0e3e1..285d79b312 100755 --- a/tools/mkromfsimg.sh +++ b/tools/mkromfsimg.sh @@ -28,7 +28,7 @@ rcsysinittemplate=$rcsysinitfile.template rcsfile=rcS rcstemplate=$rcsfile.template romfsimg=romfs.img -headerfile=nsh_romfsimg.h +headerfile=etc_romfs.c # Get the input parameters @@ -79,25 +79,25 @@ if [ ! -r $topdir/.config ]; then exit 1 fi -romfsetc=`grep CONFIG_NSH_ROMFSETC= $topdir/.config | cut -d'=' -f2` +romfsetc=`grep CONFIG_ETC_ROMFS= $topdir/.config | cut -d'=' -f2` disablempt=`grep CONFIG_DISABLE_MOUNTPOINT= $topdir/.config | cut -d'=' -f2` disablescript=`grep CONFIG_NSH_DISABLESCRIPT= $topdir/.config | cut -d'=' -f2` devconsole=`grep CONFIG_DEV_CONSOLE= $topdir/.config | cut -d'=' -f2` romfs=`grep CONFIG_FS_ROMFS= $topdir/.config | cut -d'=' -f2` -romfsmpt=`grep CONFIG_NSH_ROMFSMOUNTPT= $topdir/.config | cut -d'=' -f2` +romfsmpt=`grep CONFIG_ETC_ROMFSMOUNTPT= $topdir/.config | cut -d'=' -f2` initscript=`grep CONFIG_NSH_INITSCRIPT= $topdir/.config | cut -d'=' -f2` sysinitscript=`grep CONFIG_NSH_SYSINITSCRIPT= $topdir/.config | cut -d'=' -f2` -romfsdevno=`grep CONFIG_NSH_ROMFSDEVNO= $topdir/.config | cut -d'=' -f2` -romfssectsize=`grep CONFIG_NSH_ROMFSSECTSIZE= $topdir/.config | cut -d'=' -f2` +romfsdevno=`grep CONFIG_ETC_ROMFSDEVNO= $topdir/.config | cut -d'=' -f2` +romfssectsize=`grep CONFIG_ETC_ROMFSSECTSIZE= $topdir/.config | cut -d'=' -f2` # If we disabled FAT FS requirement, we don't need to check it if [ "$usefat" = true ]; then fatfs=`grep CONFIG_FS_FAT= $topdir/.config | cut -d'=' -f2` - fatdevno=`grep CONFIG_NSH_FATDEVNO= $topdir/.config | cut -d'=' -f2` - fatsectsize=`grep CONFIG_NSH_FATSECTSIZE= $topdir/.config | cut -d'=' -f2` - fatnsectors=`grep CONFIG_NSH_FATNSECTORS= $topdir/.config | cut -d'=' -f2` - fatmpt=`grep CONFIG_NSH_FATMOUNTPT= $topdir/.config | cut -d'=' -f2` + fatdevno=`grep CONFIG_ETC_FATDEVNO= $topdir/.config | cut -d'=' -f2` + fatsectsize=`grep CONFIG_ETC_FATSECTSIZE= $topdir/.config | cut -d'=' -f2` + fatnsectors=`grep CONFIG_ETC_FATNSECTORS= $topdir/.config | cut -d'=' -f2` + fatmpt=`grep CONFIG_ETC_FATMOUNTPT= $topdir/.config | cut -d'=' -f2` fi # The following settings are required for general ROMFS support @@ -184,7 +184,7 @@ fi # /., /./*, /.., or /../* if [ ${romfsmpt:0:1} != "\"" ]; then - echo "CONFIG_NSH_ROMFSMOUNTPT must be a string" + echo "CONFIG_ETC_ROMFSMOUNTPT must be a string" echo "Change it so that it is enclosed in quotes." exit 1 fi @@ -192,7 +192,7 @@ fi uromfsmpt=`echo $romfsmpt | sed -e "s/\"//g"` if [ ${uromfsmpt:0:1} != "/" ]; then - echo "CONFIG_NSH_ROMFSMOUNTPT must be an absolute path in the target FS" + echo "CONFIG_ETC_ROMFSMOUNTPT must be an absolute path in the target FS" echo "Change it so that it begins with the character '/'. Eg. /etc" exit 1 fi @@ -204,7 +204,7 @@ done if [ -z "$tmpdir" -o "X$tmpdir" = "Xdev" -o "X$tmpdir" = "." -o \ ${tmpdir:0:2} = "./" -o "X$tmpdir" = ".." -o ${tmpdir:0:3} = "../" ]; then - echo "Invalid CONFIG_NSH_ROMFSMOUNTPT selection." + echo "Invalid CONFIG_ETC_ROMFSMOUNTPT selection." exit 1 fi