mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 04:16:35 +08:00
sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory are compiled and linked with Nuttx binary in the form of romfs. After startup, it will be mounted by Nsh. etc is generated by the different boards, that use genromfs and xxd tools to generate and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh The more common method is etc image generated from the content in the corresponding board/arch/board/board/src/etc directory, and added by Makefile for example: boards/sim/sim/sim/src/etc. But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/ non-privileged mode or the isolated binarys, so as that nsh should use syscall to access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image content, because that is generated in board and as a part of Nuttx kernel. changes: - move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute. - move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c in boards, and no need declaration for romfs_img/romfs_img_len. This commit changes and updates all configurations in Nuttx arch/board as much as possible, but if any missing, please refer to the following simple guide: - rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig - rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO - move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need declaration for romfs_img/romfs_img_len. - delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c in board/arch/board/board/src. Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
62698051c7
commit
c479ccb8aa
@@ -32,6 +32,7 @@
|
||||
*/
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <stdint.h>
|
||||
#include <nuttx/nuttx.h>
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
@@ -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 */
|
||||
|
||||
+1
-1
@@ -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 <nuttx/compiler.h>" > $@
|
||||
$(Q) xxd -i romfs.img | sed -e "s/^unsigned char/const unsigned char aligned_data(4)/g" >> $@
|
||||
$(Q) rm romfs.img
|
||||
|
||||
@@ -80,4 +80,8 @@ ifeq ($(CONFIG_MTD_AT24XX),y)
|
||||
CSRCS += at32_at24.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
ifeq ($(CONFIG_ETC_ROMFS),y)
|
||||
CSRCS += etc_romfs.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
|
||||
+9
-1
@@ -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
|
||||
****************************************************************************/
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+9
-1
@@ -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
|
||||
***************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+9
-1
@@ -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
|
||||
****************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+7
-7
@@ -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
|
||||
****************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+10
-2
@@ -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
|
||||
****************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+11
-2
@@ -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
|
||||
***************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+9
-1
@@ -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
|
||||
****************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# sample rc.sysinit file; you must run tools/genromfs <nuttx dir> 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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# sample rcS file; you must run tools/genromfs <nuttx dir> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
+11
-2
@@ -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
|
||||
***************************************************************************/
|
||||
@@ -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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# sample rc.sysinit file; you must run tools/genromfs <nuttx dir> 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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# sample rcS file; you must run tools/genromfs <nuttx dir> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
+11
-2
@@ -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
|
||||
***************************************************************************/
|
||||
@@ -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;
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user