summaryrefslogtreecommitdiff
path: root/apps/nshlib
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-30 06:43:49 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-30 06:43:49 -0600
commit77d07071ff073399b8c4f07b801899ea1e7842d1 (patch)
treecdbb9775f99b29702b20832d6c39e1e035a17b65 /apps/nshlib
parent0e41afa95ed339f8a3d27ebf28b36f5ce77410d5 (diff)
downloadnuttx-77d07071ff073399b8c4f07b801899ea1e7842d1.tar.gz
nuttx-77d07071ff073399b8c4f07b801899ea1e7842d1.tar.bz2
nuttx-77d07071ff073399b8c4f07b801899ea1e7842d1.zip
Add support for a custom NSH ROMFS startup image header file location. From Martin Lederhilger
Diffstat (limited to 'apps/nshlib')
-rw-r--r--apps/nshlib/Kconfig41
-rw-r--r--apps/nshlib/nsh_romfsetc.c4
2 files changed, 39 insertions, 6 deletions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
index 0add860d6..ba9c718b4 100644
--- a/apps/nshlib/Kconfig
+++ b/apps/nshlib/Kconfig
@@ -529,14 +529,45 @@ config NSH_ROMFSSECTSIZE
increased if the ROMFS volume were to be become large. Any value
selected must be a power of 2.
+choice
+ prompt "ROMFS header location"
+ default NSH_DEFAULTROMFS
+
+config NSH_DEFAULTROMFS
+ bool "Default ROMFS header path"
+ ---help---
+ Selects the default header located in the source directory of the
+ NSH library.
+
config NSH_ARCHROMFS
- bool "Architecture-specific ROMFS header"
- default n
+ bool "Architecture-specific ROMFS path"
---help---
Enable this option to provide an architecture-specific ROMFS
- header at <arch/board/nsh_romfsimg.h>. Note that this header
- will be copied from nuttx/configs/<boardname>/include and should
- be stored at this location.
+ header at arch/<boardname>/nsh_romfsimg.h. Note that this header
+ will be linked (or copied) from nuttx/configs/<boardname>/include
+ and should be stored at that location in the nuttx configs/
+ sub-directory.
+
+config NSH_CUSTOMROMFS
+ bool "Custom ROMFS header path"
+ ---help---
+ Enable this option to provide a custom ROMFS header. The path to
+ the header file can be specified in the option "Custom ROMFS header
+ file".
+
+endchoice
+
+if NSH_CUSTOMROMFS
+
+config NSH_CUSTOMROMFS_HEADER
+ string "Custom ROMFS header file path"
+ default ""
+ ---help---
+ Specifies the path to the custom ROMFS header file. This must be
+ either a full path or a path relative to one of the include file
+ search paths provided in your CFLAGS.
+
+endif #NSH_CUSTOMROMFS
config NSH_FATDEVNO
int "FAT block device minor number"
diff --git a/apps/nshlib/nsh_romfsetc.c b/apps/nshlib/nsh_romfsetc.c
index 6f538b4c5..eba60af92 100644
--- a/apps/nshlib/nsh_romfsetc.c
+++ b/apps/nshlib/nsh_romfsetc.c
@@ -55,7 +55,9 @@
#ifdef CONFIG_NSH_ARCHROMFS
# include <arch/board/nsh_romfsimg.h>
-#else
+#elif defined(CONFIG_NSH_CUSTOMROMFS)
+# include CONFIG_NSH_CUSTOMROMFS_HEADER
+#else /* if defined(CONFIG_NSH_DEFAULTROMFS) */
# include "nsh_romfsimg.h"
#endif