summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/ChangeLog.txt3
-rw-r--r--apps/Kconfig4
-rw-r--r--apps/Makefile3
-rw-r--r--apps/README.txt2
-rw-r--r--apps/system/Kconfig20
-rw-r--r--apps/system/Make.defs17
-rw-r--r--apps/system/Makefile2
-rw-r--r--apps/system/free/free.c80
-rw-r--r--apps/system/install/install.c606
-rw-r--r--apps/system/poweroff/Kconfig16
-rw-r--r--apps/system/poweroff/Makefile (renamed from apps/vsn/poweroff/Makefile)2
-rw-r--r--apps/system/poweroff/README.txt (renamed from apps/vsn/poweroff/README.txt)0
-rw-r--r--apps/system/poweroff/poweroff.c (renamed from apps/vsn/poweroff/poweroff.c)39
-rw-r--r--apps/system/ramtron/Kconfig (renamed from apps/vsn/ramtron/Kconfig)8
-rw-r--r--apps/system/ramtron/Makefile (renamed from apps/vsn/ramtron/Makefile)2
-rw-r--r--apps/system/ramtron/README.txt (renamed from apps/vsn/ramtron/README.txt)0
-rw-r--r--apps/system/ramtron/ramtron.c (renamed from apps/vsn/ramtron/ramtron.c)19
-rw-r--r--apps/system/sdcard/Kconfig (renamed from apps/vsn/sdcard/Kconfig)4
-rw-r--r--apps/system/sdcard/Makefile (renamed from apps/vsn/sdcard/Makefile)2
-rw-r--r--apps/system/sdcard/README.txt (renamed from apps/vsn/sdcard/README.txt)0
-rw-r--r--apps/system/sdcard/sdcard.c (renamed from apps/vsn/sdcard/sdcard.c)93
-rw-r--r--apps/system/sysinfo/Kconfig (renamed from apps/vsn/sysinfo/Kconfig)5
-rw-r--r--apps/system/sysinfo/Makefile (renamed from apps/vsn/sysinfo/Makefile)2
-rw-r--r--apps/system/sysinfo/README.txt (renamed from apps/vsn/sysinfo/README.txt)0
-rw-r--r--apps/system/sysinfo/sysinfo.c (renamed from apps/vsn/sysinfo/sysinfo.c)38
-rw-r--r--apps/vsn/Kconfig11
-rw-r--r--apps/vsn/Make.defs51
-rw-r--r--apps/vsn/Makefile71
-rw-r--r--apps/vsn/poweroff/Kconfig14
-rw-r--r--nuttx/Documentation/NuttX.html2
30 files changed, 561 insertions, 555 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 75f02754b..2d7b2eb9f 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -350,3 +350,6 @@
feature of the NxWidgets/NxWM unit tests.
6.23 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
+
+ * vsn: Moved all NSH commands from vsn/ to system/. Deleted the vsn/
+ directory.
diff --git a/apps/Kconfig b/apps/Kconfig
index 5543ba72d..ea9bd2d31 100644
--- a/apps/Kconfig
+++ b/apps/Kconfig
@@ -34,7 +34,3 @@ endmenu
menu "System NSH Add-Ons"
source "$APPSDIR/system/Kconfig"
endmenu
-
-menu "VSN board Add-Ons"
-source "$APPSDIR/vsn/Kconfig"
-endmenu
diff --git a/apps/Makefile b/apps/Makefile
index 3a59fd6b4..d2b0ecdab 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -49,7 +49,7 @@ APPDIR = ${shell pwd}
# list can be extended by the .config file as well
CONFIGURED_APPS =
-SUBDIRS = examples graphics interpreters modbus namedapp nshlib netutils system vsn
+SUBDIRS = examples graphics interpreters modbus namedapp nshlib netutils system
# There are two different mechanisms for obtaining the list of configured
# directories:
@@ -78,7 +78,6 @@ include namedapp/Make.defs
include netutils/Make.defs
include nshlib/Make.defs
include system/Make.defs
-include vsn/Make.defs
# INSTALLED_APPS is the list of currently available application directories. It
# is the same as CONFIGURED_APPS, but filtered to exclude any non-existent
diff --git a/apps/README.txt b/apps/README.txt
index f9c9ececd..7a379254e 100644
--- a/apps/README.txt
+++ b/apps/README.txt
@@ -107,7 +107,7 @@ NuttX is configured. .config is included in the toplevel apps/Makefile.
As a minimum, this configuration file must define files to add to the
CONFIGURED_APPS list like:
- CONFIGURED_APPS += examples/hello vsn/poweroff
+ CONFIGURED_APPS += examples/hello system/poweroff
Named Start-Up main() function
------------------------------
diff --git a/apps/system/Kconfig b/apps/system/Kconfig
index 44bf5a2e6..d4d434665 100644
--- a/apps/system/Kconfig
+++ b/apps/system/Kconfig
@@ -3,7 +3,7 @@
# see misc/tools/kconfig-language.txt.
#
-menu "Custom free memory command"
+menu "Custom Free Memory Command"
source "$APPSDIR/system/free/Kconfig"
endmenu
@@ -15,6 +15,22 @@ menu "FLASH Program Installation"
source "$APPSDIR/system/install/Kconfig"
endmenu
-menu "readline() support"
+menu "readline()"
source "$APPSDIR/system/readline/Kconfig"
endmenu
+
+menu "Power Off"
+source "$APPSDIR/system/poweroff/Kconfig"
+endmenu
+
+menu "RAMTRON"
+source "$APPSDIR/system/ramtron/Kconfig"
+endmenu
+
+menu "SD Card"
+source "$APPSDIR/system/sdcard/Kconfig"
+endmenu
+
+menu "Sysinfo"
+source "$APPSDIR/system/sysinfo/Kconfig"
+endmenu
diff --git a/apps/system/Make.defs b/apps/system/Make.defs
index a4aea2d31..3d10f84e5 100644
--- a/apps/system/Make.defs
+++ b/apps/system/Make.defs
@@ -49,3 +49,20 @@ endif
ifeq ($(CONFIG_SYSTEM_READLINE),y)
CONFIGURED_APPS += system/readline
endif
+
+ifeq ($(CONFIG_SYSTEM_POWEROFF),y)
+CONFIGURED_APPS += system/poweroff
+endif
+
+ifeq ($(CONFIG_SYSTEM_RAMTRON),y)
+CONFIGURED_APPS += system/ramtron
+endif
+
+ifeq ($(CONFIG_SYSTEM_SDCARD),y)
+CONFIGURED_APPS += system/sdcard
+endif
+
+ifeq ($(CONFIG_SYSTEM_SYSINFO),y)
+CONFIGURED_APPS += system/sysinfo
+endif
+
diff --git a/apps/system/Makefile b/apps/system/Makefile
index 73eb60d15..d64bb54c6 100644
--- a/apps/system/Makefile
+++ b/apps/system/Makefile
@@ -37,7 +37,7 @@
# Sub-directories containing system task
-SUBDIRS = free i2c install readline
+SUBDIRS = free i2c install readline poweroff ramtron sdcard sysinfo
# Create the list of installed runtime modules (INSTALLED_DIRS)
diff --git a/apps/system/free/free.c b/apps/system/free/free.c
index 3d9698ecb..c44cd5e22 100644
--- a/apps/system/free/free.c
+++ b/apps/system/free/free.c
@@ -33,57 +33,65 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include <nuttx/config.h>
#include <nuttx/progmem.h>
#include <stdio.h>
#include <stdlib.h>
-
/****************************************************************************
* Private Functions
****************************************************************************/
-
-/* \todo Max block size only works on uniform prog mem */
-
-void free_getprogmeminfo(struct mallinfo * mem)
+
+/* TODO Max block size only works on uniform prog mem */
+
+static void free_getprogmeminfo(struct mallinfo * mem)
{
- uint16_t page = 0, stpage = 0xFFFF;
- uint16_t pagesize = 0;
- int status;
-
- mem->arena = 0;
- mem->fordblks = 0;
- mem->uordblks = 0;
- mem->mxordblk = 0;
-
- for (status=0, page=0; status >= 0; page++) {
-
- status = up_progmem_ispageerased(page);
- pagesize = up_progmem_pagesize(page);
-
- mem->arena += pagesize;
-
- /* Is this beginning of new free space section */
- if (status == 0) {
- if (stpage == 0xFFFF) stpage = page;
- mem->fordblks += pagesize;
+ uint16_t page = 0, stpage = 0xFFFF;
+ uint16_t pagesize = 0;
+ int status;
+
+ mem->arena = 0;
+ mem->fordblks = 0;
+ mem->uordblks = 0;
+ mem->mxordblk = 0;
+
+ for (status=0, page=0; status >= 0; page++)
+ {
+ status = up_progmem_ispageerased(page);
+ pagesize = up_progmem_pagesize(page);
+
+ mem->arena += pagesize;
+
+ /* Is this beginning of new free space section */
+
+ if (status == 0)
+ {
+ if (stpage == 0xFFFF) stpage = page;
+ mem->fordblks += pagesize;
}
- else if (status != 0) {
- mem->uordblks += pagesize;
-
- if (stpage != 0xFFFF && up_progmem_isuniform()) {
- stpage = page - stpage;
- if (stpage > mem->mxordblk)
- mem->mxordblk = stpage;
- stpage = 0xFFFF;
+ else if (status != 0)
+ {
+ mem->uordblks += pagesize;
+
+ if (stpage != 0xFFFF && up_progmem_isuniform())
+ {
+ stpage = page - stpage;
+ if (stpage > mem->mxordblk)
+ {
+ mem->mxordblk = stpage;
+ }
+ stpage = 0xFFFF;
}
}
}
-
- mem->mxordblk *= pagesize;
-}
+ mem->mxordblk *= pagesize;
+}
/****************************************************************************
* Public Functions
diff --git a/apps/system/install/install.c b/apps/system/install/install.c
index 2f11c6434..fd14b7a6f 100644
--- a/apps/system/install/install.c
+++ b/apps/system/install/install.c
@@ -33,6 +33,10 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include <nuttx/config.h>
#include <nuttx/progmem.h>
#include <sys/stat.h>
@@ -43,9 +47,8 @@
#include <string.h>
#include <errno.h>
-
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
#define ACTION_INSTALL 0x01
@@ -55,12 +58,11 @@
#define INSTALL_PROGRAMBLOCKSIZE 1024
-
/****************************************************************************
* Private data
****************************************************************************/
-const char *install_help =
+static const char *install_help =
"Installs XIP program into flash and creates a start-up script in the\n"
"destination directory.\n\n"
"Usage:\t%s [options] source-file.xip destination-directory\n\n"
@@ -72,341 +74,397 @@ const char *install_help =
"\t--force\t\t\tReplaces existing installation\n"
"\t--start <page>\t\tInstalls application at or after <page>\n"
"\t--margin <pages>\tLeave some free space after the kernel (default 16)\n";
-
-const char *install_script_text =
+
+static const char *install_script_text =
"# XIP stacksize=%x priority=%x size=%x\n";
-
-const char *install_script_exec =
+
+static const char *install_script_exec =
"exec 0x%x\n";
-
-
+
/****************************************************************************
* Private functions
****************************************************************************/
-int install_getstartpage(int startpage, int pagemargin, int desiredsize)
+static int install_getstartpage(int startpage, int pagemargin, int desiredsize)
{
- uint16_t page = 0, stpage = 0xFFFF;
- uint16_t pagesize = 0;
- int maxlen = -1;
- int maxlen_start = 0xFFFF;
- int status;
-
- for (status=0, page=0; status >= 0; page++) {
-
- status = up_progmem_ispageerased(page);
- pagesize = up_progmem_pagesize(page);
-
- /* Is this beginning of new free space section */
- if (status == 0) {
- if (stpage == 0xFFFF) stpage = page;
+ uint16_t page = 0, stpage = 0xffff;
+ uint16_t pagesize = 0;
+ int maxlen = -1;
+ int maxlen_start = 0xffff;
+ int status;
+
+ for (status=0, page=0; status >= 0; page++)
+ {
+ status = up_progmem_ispageerased(page);
+ pagesize = up_progmem_pagesize(page);
+
+ /* Is this beginning of new free space section */
+
+ if (status == 0)
+ {
+ if (stpage == 0xffff) stpage = page;
}
- else if (status != 0) {
-
- if (stpage != 0xFFFF) {
-
- if ( (page - stpage) > maxlen) {
+ else if (status != 0)
+ {
+ if (stpage != 0xffff)
+ {
+ if ((page - stpage) > maxlen)
+ {
+ if (maxlen==-1)
+ {
+ /* First time found sth? */
+
+ stpage += pagemargin;
+ maxlen = 0;
+ }
- if (maxlen==-1) { /* First time found sth? */
- stpage += pagemargin;
- maxlen = 0;
+ if(stpage < startpage)
+ {
+ stpage = startpage;
}
-
- if(stpage < startpage)
- stpage = startpage;
-
- if (page > stpage) {
- maxlen = page - stpage;
- maxlen_start = stpage;
+
+ if (page > stpage)
+ {
+ maxlen = page - stpage;
+ maxlen_start = stpage;
}
-
- if (maxlen*pagesize >= desiredsize) {
- /* printf("Found page at %d ... %d\n", stpage, page); */
- return maxlen_start*pagesize;
+
+ if (maxlen*pagesize >= desiredsize)
+ {
+ /* printf("Found page at %d ... %d\n", stpage, page); */
+ return maxlen_start*pagesize;
}
}
-
- stpage = 0xFFFF;
+
+ stpage = 0xffff;
}
}
}
-
- /* Requested space is not available */
-
- return -1;
-}
+ /* Requested space is not available */
+
+ return -1;
+}
-int install_programflash(int startaddr, const char *source)
+static int install_programflash(int startaddr, const char *source)
{
- int status;
- int count;
- int totalsize = 0;
- char *buf;
- FILE *fp;
-
- if ( (buf = malloc(INSTALL_PROGRAMBLOCKSIZE)) == NULL )
- return -errno;
-
- if ( (fp=fopen(source, "r")) ) {
- do {
- count = fread(buf, 1, INSTALL_PROGRAMBLOCKSIZE, fp);
-
- if ( (status = up_progmem_write(startaddr, buf, count)) < 0) {
- totalsize = status;
- break;
+ int status;
+ int count;
+ int totalsize = 0;
+ char *buf;
+ FILE *fp;
+
+ if ((buf = malloc(INSTALL_PROGRAMBLOCKSIZE)) == NULL)
+ {
+ return -ENOMEM;
+ }
+
+ if ((fp = fopen(source, "r")))
+ {
+ do
+ {
+ count = fread(buf, 1, INSTALL_PROGRAMBLOCKSIZE, fp);
+
+ if ((status = up_progmem_write(startaddr, buf, count)) < 0)
+ {
+ totalsize = status;
+ break;
}
-
- startaddr += count;
- totalsize += count;
+
+ startaddr += count;
+ totalsize += count;
}
- while(count);
+ while(count);
+ }
+ else
+ {
+ totalsize = -errno;
}
- else totalsize = -errno;
-
- fclose(fp);
- free(buf);
-
- return totalsize;
-}
+ fclose(fp);
+ free(buf);
-void install_getscriptname(char *scriptname, const char *progname, const char *destdir)
-{
- const char * progonly;
-
- /* I.e. as /usr/bin */
- strcpy(scriptname, destdir);
-
- /* extract from i.e. /sdcard/demo -> /demo, together with / */
- progonly = strrchr(progname, '/');
- strcat(scriptname, progonly);
+ return totalsize;
}
-
-int install_getprogsize(const char *progname)
+static void install_getscriptname(char *scriptname, const char *progname, const char *destdir)
{
- struct stat fileinfo;
-
- if ( stat(progname, &fileinfo) < 0 )
- return -1;
-
- return fileinfo.st_size;
+ const char * progonly;
+
+ /* I.e. as /usr/bin */
+
+ strcpy(scriptname, destdir);
+
+ /* extract from i.e. /sdcard/demo -> /demo, together with / */
+
+ progonly = strrchr(progname, '/');
+ strcat(scriptname, progonly);
}
+static int install_getprogsize(const char *progname)
+{
+ struct stat fileinfo;
+
+ if (stat(progname, &fileinfo) < 0)
+ {
+ return -1;
+ }
+
+ return fileinfo.st_size;
+}
-int install_alreadyexists(const char *scriptname)
+static int install_alreadyexists(const char *scriptname)
{
- FILE *fp;
-
- if ( (fp=fopen(scriptname, "r"))==NULL )
- return 0;
-
- fclose(fp);
+ FILE *fp;
+
+ if ((fp = fopen(scriptname, "r")) == NULL)
+ {
+ return 0;
+ }
+
+ fclose(fp);
return 1;
}
-
-int install_createscript(int addr, int stacksize, int progsize,
- int priority, const char *scriptname)
+static int install_createscript(int addr, int stacksize, int progsize,
+ int priority, const char *scriptname)
{
- FILE *fp;
-
- if ( (fp=fopen(scriptname, "w+"))==NULL )
- return -errno;
-
- fprintf(fp, install_script_text, stacksize, priority, progsize);
- fprintf(fp, install_script_exec, addr);
-
- fflush(fp);
- fclose(fp);
-
- return 0;
-}
+ FILE *fp;
+
+ if ((fp = fopen(scriptname, "w+")) == NULL)
+ {
+ return -errno;
+ }
+ fprintf(fp, install_script_text, stacksize, priority, progsize);
+ fprintf(fp, install_script_exec, addr);
-int install_getlasthexvalue(FILE *fp, char delimiter)
+ fflush(fp);
+ fclose(fp);
+
+ return 0;
+}
+
+static int install_getlasthexvalue(FILE *fp, char delimiter)
{
- char buf[128];
- char *p;
-
- if (fgets(buf, 127, fp)) {
- if ( (p = strrchr(buf, delimiter)) ) {
- return strtol(p+1, NULL, 16);
+ char buf[128];
+ char *p;
+
+ if (fgets(buf, 127, fp))
+ {
+ if ((p = strrchr(buf, delimiter)))
+ {
+ return strtol(p+1, NULL, 16);
}
}
- return -1;
-}
+ return -1;
+}
-int install_remove(const char *scriptname)
+static int install_remove(const char *scriptname)
{
- FILE *fp;
- int progsize, addr, freedsize;
- uint16_t page;
- int status = 0;
-
- /* Parse script */
-
- if ( (fp=fopen(scriptname, "r")) ) {
- progsize = install_getlasthexvalue(fp,'=');
- addr = install_getlasthexvalue(fp,' ');
- freedsize = progsize;
+ FILE *fp;
+ int progsize, addr, freedsize;
+ uint16_t page;
+ int status = 0;
+
+ /* Parse script */
+
+ if ((fp = fopen(scriptname, "r")))
+ {
+ progsize = install_getlasthexvalue(fp,'=');
+ addr = install_getlasthexvalue(fp,' ');
+ freedsize = progsize;
+ }
+ else
+ {
+ return -errno;
+ }
+
+ fclose(fp);
+
+ /* Remove pages */
+
+ if (progsize <= 0 || addr <= 0)
+ {
+ return -EIO;
}
- else return -errno;
-
- fclose(fp);
-
- /* Remove pages */
-
- if (progsize <= 0 || addr <= 0)
- return -EIO;
-
- do {
- if ((page = up_progmem_getpage(addr)) < 0) {
- status = -page;
- break;
+
+ do
+ {
+ if ((page = up_progmem_getpage(addr)) < 0)
+ {
+ status = -page;
+ break;
}
-
- if ( up_progmem_erasepage(page) < 0) {
- status = -page;
- break;
+
+ if (up_progmem_erasepage(page) < 0)
+ {
+ status = -page;
+ break;
}
-
- addr += up_progmem_pagesize(page);
- progsize -= up_progmem_pagesize(page);
-
- } while(progsize > 0);
-
- if (status < 0) return status;
-
- /* Remove script file */
-
- if (unlink(scriptname) < 0) return -errno;
-
- return freedsize;
+
+ addr += up_progmem_pagesize(page);
+ progsize -= up_progmem_pagesize(page);
+
+ }
+ while(progsize > 0);
+
+ if (status < 0)
+ {
+ return status;
+ }
+
+ /* Remove script file */
+
+ if (unlink(scriptname) < 0)
+ {
+ return -errno;
+ }
+
+ return freedsize;
}
/****************************************************************************
- * Start
+ * Public Functions
****************************************************************************/
int install_main(int argc, char *argv[])
{
- int i;
- int progsize;
- int scrsta;
- int stacksize = 4096;
- int priority = SCHED_PRIORITY_DEFAULT;
- int pagemargin = 16;
- int startpage = 0;
- int startaddr = 0;
- int action = ACTION_INSTALL;
- char scriptname[128];
-
- /* Supported? */
-
- if ( !up_progmem_isuniform() ) {
- fprintf(stderr, "Error: install supports uniform organization only.\n");
- return -1;
+ int i;
+ int progsize;
+ int scrsta;
+ int stacksize = 4096;
+ int priority = SCHED_PRIORITY_DEFAULT;
+ int pagemargin = 16;
+ int startpage = 0;
+ int startaddr = 0;
+ int action = ACTION_INSTALL;
+ char scriptname[128];
+
+ /* Supported? */
+
+ if (!up_progmem_isuniform())
+ {
+ fprintf(stderr, "Error: install supports uniform organization only.\n");
+ return -1;
}
-
- /* Parse arguments */
-
- for (i=1; i<argc; i++) {
- if (argv[i][0]=='-' && argv[i][1]=='-' && i<=argc) {
-
- if (strcmp(argv[i]+2, "stack")==0) {
- stacksize = atoi(argv[++i]);
+
+ /* Parse arguments */
+
+ for (i=1; i<argc; i++)
+ {
+ if (argv[i][0]=='-' && argv[i][1]=='-' && i<=argc)
+ {
+ if (strcmp(argv[i]+2, "stack")==0)
+ {
+ stacksize = atoi(argv[++i]);
}
- else if (strcmp(argv[i]+2, "priority")==0) {
- priority = atoi(argv[++i]);
+ else if (strcmp(argv[i]+2, "priority")==0)
+ {
+ priority = atoi(argv[++i]);
}
- else if (strcmp(argv[i]+2, "start")==0) {
- startpage = atoi(argv[++i]);
+ else if (strcmp(argv[i]+2, "start")==0)
+ {
+ startpage = atoi(argv[++i]);
}
- else if (strcmp(argv[i]+2, "margin")==0) {
- pagemargin = atoi(argv[++i]);
+ else if (strcmp(argv[i]+2, "margin")==0)
+ {
+ pagemargin = atoi(argv[++i]);
}
- else if (strcmp(argv[i]+2, "remove")==0) {
- action = ACTION_REMOVE;
+ else if (strcmp(argv[i]+2, "remove")==0)
+ {
+ action = ACTION_REMOVE;
}
- else if (strcmp(argv[i]+2, "force")==0) {
- action = ACTION_REINSTALL;
+ else if (strcmp(argv[i]+2, "force")==0)
+ {
+ action = ACTION_REINSTALL;
}
- else fprintf(stderr, "Unknown option: %s\n", argv[i]);
+ else fprintf(stderr, "Unknown option: %s\n", argv[i]);
+ }
+ else
+ {
+ break;
}
- else break;
}
-
- /* Do the job */
-
- switch(action & 1) {
-
- case ACTION_REMOVE:
- if (i > argc-1) {
- action = ACTION_INSUFPARAM;
- break; /* are there sufficient parameters */
- }
- if ( (scrsta=install_remove(argv[i])) < 0) {
- fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta) );
+
+ /* Do the job */
+
+ switch(action & 1)
+ {
+ case ACTION_REMOVE:
+ if (i > argc-1)
+ {
+ action = ACTION_INSUFPARAM;
+ break; /* are there sufficient parameters */
+ }
+
+ if ((scrsta=install_remove(argv[i])) < 0)
+ {
+ fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta));
+ return -1;
+ }
+
+ printf("Removed %s and freed %d bytes\n", argv[i], scrsta);
+ return 0;
+
+ case ACTION_INSTALL:
+ if (i > argc-2)
+ {
+ action = ACTION_INSUFPARAM;
+ break; /* are there sufficient parameters */
+ }
+
+ install_getscriptname(scriptname, argv[i], argv[i+1]);
+
+ /* script-exists? */
+
+ if (install_alreadyexists(scriptname) == 1)
+ {
+ if (action != ACTION_REINSTALL)
+ {
+ fprintf(stderr, "Program with that name already exists.\n");
+ return -EEXIST;
+ }
+
+ if ((scrsta = install_remove(scriptname)) < 0)
+ {
+ fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta));
return -1;
- }
- printf("Removed %s and freed %d bytes\n", argv[i], scrsta);
- return 0;
-
-
- case ACTION_INSTALL:
- if (i > argc-2) {
- action = ACTION_INSUFPARAM;
- break; /* are there sufficient parameters */
- }
-
- install_getscriptname(scriptname, argv[i], argv[i+1]);
-
- // script-exists?
- if (install_alreadyexists(scriptname)==1) {
-
- if (action != ACTION_REINSTALL) {
- fprintf(stderr, "Program with that name already exists.\n");
- return -EEXIST;
- }
-
- if ( (scrsta=install_remove(scriptname)) < 0) {
- fprintf(stderr, "Could not remove program: %s\n", strerror(-scrsta) );
- return -1;
- }
-
- printf("Replacing %s\n", scriptname);
- }
-
- startaddr = install_getstartpage(startpage, pagemargin, install_getprogsize(argv[i]) );
- if (startpage < 0) {
- fprintf(stderr, "Not enough memory\n");
- return -ENOMEM;
- }
-
- if ( (progsize = install_programflash(startaddr, argv[i])) <= 0) {
- fprintf(stderr, "Error writing program memory: %s\n"
+ }
+
+ printf("Replacing %s\n", scriptname);
+ }
+
+ startaddr = install_getstartpage(startpage, pagemargin, install_getprogsize(argv[i]));
+ if (startpage < 0)
+ {
+ fprintf(stderr, "Not enough memory\n");
+ return -ENOMEM;
+ }
+
+ if ((progsize = install_programflash(startaddr, argv[i])) <= 0)
+ {
+ fprintf(stderr, "Error writing program memory: %s\n"
"Note: Flash pages are not released, so you may try again and program will be\n"
- " written in other pages.\n", strerror(-progsize) );
-
- return -EIO;
- }
- if ( (scrsta = install_createscript(startaddr, stacksize, progsize,
- priority, scriptname)) < 0) {
- fprintf(stderr, "Error writing program script at %s: %s\n",
- argv[i+1], strerror(-scrsta) );
- return -EIO;
- }
-
- printf("Installed application of size %d bytes to program memory [%xh - %xh].\n",
+ " written in other pages.\n", strerror(-progsize));
+ return -EIO;
+ }
+
+ if ((scrsta = install_createscript(startaddr, stacksize, progsize,
+ priority, scriptname)) < 0)
+ {
+ fprintf(stderr, "Error writing program script at %s: %s\n",
+ argv[i+1], strerror(-scrsta));
+ return -EIO;
+ }
+
+ printf("Installed application of size %d bytes to program memory [%xh - %xh].\n",
progsize, startaddr, startaddr + progsize);
-
- return 0;
+ return 0;
}
-
- fprintf(stderr, install_help, argv[0], argv[0]);
- return -1;
+
+ fprintf(stderr, install_help, argv[0], argv[0]);
+ return -1;
}
diff --git a/apps/system/poweroff/Kconfig b/apps/system/poweroff/Kconfig
new file mode 100644
index 000000000..ae8eac450
--- /dev/null
+++ b/apps/system/poweroff/Kconfig
@@ -0,0 +1,16 @@
+#
+# For a description of the syntax of this configuration file,
+# see misc/tools/kconfig-language.txt.
+#
+
+config SYSTEM_POWEROFF
+ bool "Power-Off command"
+ default n
+ ---help---
+ Enable support for the NSH poweroff command. NOTE: This option
+ provides the NSH power-off command only. It requires board-specific
+ support to actually implement the power-off.
+
+if SYSTEM_POWEROFF
+endif
+
diff --git a/apps/vsn/poweroff/Makefile b/apps/system/poweroff/Makefile
index e58ecfa86..40465e957 100644
--- a/apps/vsn/poweroff/Makefile
+++ b/apps/system/poweroff/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/poweroff/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise <uros.platise@isotel.eu>
diff --git a/apps/vsn/poweroff/README.txt b/apps/system/poweroff/README.txt
index e02180e5a..e02180e5a 100644
--- a/apps/vsn/poweroff/README.txt
+++ b/apps/system/poweroff/README.txt
diff --git a/apps/vsn/poweroff/poweroff.c b/apps/system/poweroff/poweroff.c
index ca3f056e8..dd08b177a 100644
--- a/apps/vsn/poweroff/poweroff.c
+++ b/apps/system/poweroff/poweroff.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * poweroff/poweroff.c
+ * apps/system/poweroff/poweroff.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Uros Platise <uros.platise@isotel.eu>
@@ -33,22 +33,31 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include <arch/board/power.h>
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
int poweroff_main(int argc, char *argv[])
{
-/* TODO:
- * - replace this by sending general system signal to shutdown, where i.e. nsh
- * must issue down script (it may check whether nsh is running before spawning
- * a new process with nsh poweroff)
- * - wait for some time (~0.5 second for VSN), that SDcard is flashed and synced
- * - call poweroff
- *
- * TODO on boot:
- * - if external key is pressed, do not start the nsh! but wait until it is released
- * (to get rid of bad mounts of the sdcard etc.) this could be handled in the
- * button driver immediately on system boot
- */
- board_power_off();
- return 0;
+ /* TODO:
+ * - replace this by sending general system signal to shutdown, where i.e. nsh
+ * must issue down script (it may check whether nsh is running before spawning
+ * a new process with nsh poweroff)
+ * - wait for some time (~0.5 second for VSN), that SDcard is flashed and synced
+ * - call poweroff
+ *
+ * TODO on boot:
+ * - if external key is pressed, do not start the nsh! but wait until it is released
+ * (to get rid of bad mounts of the sdcard etc.) this could be handled in the
+ * button driver immediately on system boot
+ */
+
+ board_power_off();
+ return 0;
}
diff --git a/apps/vsn/ramtron/Kconfig b/apps/system/ramtron/Kconfig
index 14f358921..53d547e5f 100644
--- a/apps/vsn/ramtron/Kconfig
+++ b/apps/system/ramtron/Kconfig
@@ -3,12 +3,12 @@
# see misc/tools/kconfig-language.txt.
#
-config VSN_RAMTRON
- bool "NSH ramtron command"
+config SYSTEM_RAMTRON
+ bool "RAMTRON command"
default n
---help---
- Enable support for the NSH ramtron command.
+ Enable support for the NSH RAMTRON command.
-if VSN_RAMTRON
+if SYSTEM_RAMTRON
endif
diff --git a/apps/vsn/ramtron/Makefile b/apps/system/ramtron/Makefile
index d930aa92c..030ef6d5c 100644
--- a/apps/vsn/ramtron/Makefile
+++ b/apps/system/ramtron/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/ramtron/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise <uros.platise@isotel.eu>
diff --git a/apps/vsn/ramtron/README.txt b/apps/system/ramtron/README.txt
index 152774b66..152774b66 100644
--- a/apps/vsn/ramtron/README.txt
+++ b/apps/system/ramtron/README.txt
diff --git a/apps/vsn/ramtron/ramtron.c b/apps/system/ramtron/ramtron.c
index f1e8db100..cd4012787 100644
--- a/apps/vsn/ramtron/ramtron.c
+++ b/apps/system/ramtron/ramtron.c
@@ -63,6 +63,7 @@ int ramtron_start(int spino)
printf("RAMTRON: Failed to initialize SPI%d\n", spino);
return -ENODEV;
}
+
printf("RAMTRON: Initialized SPI%d\n", spino);
mtd = (struct mtd_dev_s *)ramtron_initialize(spi);
@@ -71,7 +72,8 @@ int ramtron_start(int spino)
printf("RAMTRON: Device not found\n");
return -ENODEV;
}
- printf("RAMTRON: FM25V10 of size 128 kB\n");
+
+ printf("RAMTRON: FM25V10 of size 128 kB\n");
//printf("RAMTRON: %s of size %d B\n", ramtron_getpart(mtd), ramtron_getsize(mtd) );
retval = ftl_initialize(0, mtd);
@@ -85,15 +87,18 @@ int ramtron_main(int argc, char *argv[])
{
int spino;
- if (argc == 3) {
- spino = atoi(argv[2]);
+ if (argc == 3)
+ {
+ spino = atoi(argv[2]);
- if (!strcmp(argv[1], "start")) {
- return ramtron_start(spino);
+ if (!strcmp(argv[1], "start"))
+ {
+ return ramtron_start(spino);
+ }
}
- }
- // todo: write protect
+ /* todo: write protect */
+
printf("%s: <start> <spino>\n", argv[0]);
return -1;
}
diff --git a/apps/vsn/sdcard/Kconfig b/apps/system/sdcard/Kconfig
index 8e6c13264..a1a8a1f32 100644
--- a/apps/vsn/sdcard/Kconfig
+++ b/apps/system/sdcard/Kconfig
@@ -3,12 +3,12 @@
# see misc/tools/kconfig-language.txt.
#
-config VSN_SDCARD
+config SYSTEM_SDCARD
bool "NSH sdcard command"
default n
---help---
Enable support for the NSH sdcard command.
-if VSN_SDCARD
+if SYSTEM_SDCARD
endif
diff --git a/apps/vsn/sdcard/Makefile b/apps/system/sdcard/Makefile
index 213021b25..fef049a59 100644
--- a/apps/vsn/sdcard/Makefile
+++ b/apps/system/sdcard/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/sdcard/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise <uros.platise@isotel.eu>
diff --git a/apps/vsn/sdcard/README.txt b/apps/system/sdcard/README.txt
index 332aa26cf..332aa26cf 100644
--- a/apps/vsn/sdcard/README.txt
+++ b/apps/system/sdcard/README.txt
diff --git a/apps/vsn/sdcard/sdcard.c b/apps/system/sdcard/sdcard.c
index a81e8432a..56ab74f44 100644
--- a/apps/vsn/sdcard/sdcard.c
+++ b/apps/system/sdcard/sdcard.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * sdcard/sdcard.c
+ * apps/system/sdcard/sdcard.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
@@ -36,6 +36,10 @@
*
****************************************************************************/
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include <nuttx/config.h>
#include <stdlib.h>
@@ -48,15 +52,23 @@
# include <nuttx/mmcsd.h>
#endif
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
FAR struct sdio_dev_s *sdio_initialize(int slotno);
void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
// TODO get the structure out from the slot number
static FAR struct sdio_dev_s *sdio = NULL;
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/* Create device device for the SDIO-based MMC/SD block driver */
-int sdcard_start(int slotno)
+static int sdcard_start(int slotno)
{
int ret;
@@ -68,6 +80,7 @@ int sdcard_start(int slotno)
printf("SDIO: Failed to initialize slot %d\n", slotno);
return -ENODEV;
}
+
printf("SDIO: Initialized slot %d\n", slotno);
/* Now bind the SPI interface to the MMC/SD driver */
@@ -78,57 +91,71 @@ int sdcard_start(int slotno)
printf("SDIO: Failed to bind to the MMC/SD driver: %d\n", ret);
return ret;
}
+
printf("SDIO: Successfully bound to the MMC/SD driver\n");
-
+
/* Then let's guess and say that there is a card in the slot. I need to check to
* see if the VSN board supports a GPIO to detect if there is a card in
* the slot.
*/
sdio_mediachange(sdio, true);
-
+
return OK;
}
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
int sdcard_main(int argc, char *argv[])
{
- int slotno = 0;
-
- if (argc >= 2) {
-
- /* The 3rd argument is expected to be a slot number, if given */
- if (argc==3)
- slotno = atoi(argv[2]);
-
- /* Commands */
-
- if (!strcmp(argv[1], "start")) {
- return sdcard_start(slotno);
+ int slotno = 0;
+
+ if (argc >= 2) {
+
+ /* The 3rd argument is expected to be a slot number, if given */
+
+ if (argc==3)
+ {
+ slotno = atoi(argv[2]);
}
- else if (!strcmp(argv[1], "stop")) {
- fprintf(stderr, "Not implemented yet\n");
+
+ /* Commands */
+
+ if (!strcmp(argv[1], "start"))
+ {
+ return sdcard_start(slotno);
}
- else if (!strcmp(argv[1], "insert")) {
- if (sdio) {
- sdio_mediachange(sdio, true);
- return OK;
+ else if (!strcmp(argv[1], "stop"))
+ {
+ fprintf(stderr, "Not implemented yet\n");
+ }
+ else if (!strcmp(argv[1], "insert"))
+ {
+ if (sdio)
+ {
+ sdio_mediachange(sdio, true);
+ return OK;
}
}
- else if (!strcmp(argv[1], "eject")) {
- if (sdio) {
- sdio_mediachange(sdio, false);
- return OK;
+ else if (!strcmp(argv[1], "eject"))
+ {
+ if (sdio)
+ {
+ sdio_mediachange(sdio, false);
+ return OK;
}
}
- else if (!strcmp(argv[1], "status")) {
- printf("SDcard #%d Status:\n", slotno);
+ else if (!strcmp(argv[1], "status"))
+ {
+ printf("SDcard #%d Status:\n", slotno);
#ifndef CONFIG_MMCSD_HAVECARDDETECT
- printf("\t - Without SDcard detect capability\n");
+ printf("\t - Without SDcard detect capability\n");
#endif
- return 0;
+ return 0;
}
}
-
- printf("%s: <start|stop|insert|eject|status> {slotno}\n", argv[0]);
- return -1;
+
+ printf("%s: <start|stop|insert|eject|status> {slotno}\n", argv[0]);
+ return -1;
}
diff --git a/apps/vsn/sysinfo/Kconfig b/apps/system/sysinfo/Kconfig
index 38e0f16be..1f106dc8a 100644
--- a/apps/vsn/sysinfo/Kconfig
+++ b/apps/system/sysinfo/Kconfig
@@ -3,12 +3,11 @@
# see misc/tools/kconfig-language.txt.
#
-config VSN_SYSINFO
+config SYSTEM_SYSINFO
bool "NSH sysinfo command"
default n
---help---
Enable support for the NSH sysinfo command.
-if VSN_SYSINFO
+if SYSTEM_SYSINFO
endif
-
diff --git a/apps/vsn/sysinfo/Makefile b/apps/system/sysinfo/Makefile
index b4afc8a97..ead974277 100644
--- a/apps/vsn/sysinfo/Makefile
+++ b/apps/system/sysinfo/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# Makefile
+# apps/system/sysinfo/Makefile
#
# Copyright (C) 2011 Uros Platise. All rights reserved.
# Author: Uros Platise <uros.platise@isotel.eu>
diff --git a/apps/vsn/sysinfo/README.txt b/apps/system/sysinfo/README.txt
index 3792f4a59..3792f4a59 100644
--- a/apps/vsn/sysinfo/README.txt
+++ b/apps/system/sysinfo/README.txt
diff --git a/apps/vsn/sysinfo/sysinfo.c b/apps/system/sysinfo/sysinfo.c
index 8625f9db7..019e910db 100644
--- a/apps/vsn/sysinfo/sysinfo.c
+++ b/apps/system/sysinfo/sysinfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * sysinfo/sysinfo.c
+ * apps/system/sysinfo/sysinfo.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Uros Platise <uros.platise@isotel.eu>
@@ -32,18 +32,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
-
-/** \file
- * \brief System Information
- * \author Uros Platise
- *
- * Collects and reports system information.
- *
- * \todo Gather information also from low-level devices, kernel/sched, clock,
- * and further reporting as: sysinfo rtc, or sysinfo sched, ... with
- * sysinfo help to report all of the options.
+
+/* Collects and reports system information.
*
- **/
+ * TODO: Gather information also from low-level devices, kernel/sched, clock,
+ * and further reporting as: sysinfo rtc, or sysinfo sched, ... with
+ * sysinfo help to report all of the options.
+ */
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/version.h>
@@ -52,18 +51,19 @@
#include <stdio.h>
#include <stdlib.h>
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
int sysinfo_main(int argc, char *argv[])
{
- printf("System Information:\n");
-
- printf("\tNuttX Version:\t" CONFIG_VERSION_STRING " Build: %d\n", CONFIG_VERSION_BUILD);
-
- printf("\tSystem Time:\t%d [s] UTC "
+ printf("System Information:\n");
+ printf("\tNuttX Version:\t" CONFIG_VERSION_STRING
+ " Build: %d\n", CONFIG_VERSION_BUILD);
+ printf("\tSystem Time:\t%d [s] UTC "
#ifdef CONFIG_RTC
"Hardware RTC Support"
#endif
"\n", time(NULL) );
-
- return 0;
+ return 0;
}
diff --git a/apps/vsn/Kconfig b/apps/vsn/Kconfig
deleted file mode 100644
index 1f0c25f16..000000000
--- a/apps/vsn/Kconfig
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see misc/tools/kconfig-language.txt.
-#
-
-comment "VSN board add-ons"
-
-source "$APPSDIR/vsn/poweroff/Kconfig"
-source "$APPSDIR/vsn/ramtron/Kconfig"
-source "$APPSDIR/vsn/sdcard/Kconfig"
-source "$APPSDIR/vsn/sysinfo/Kconfig"
diff --git a/apps/vsn/Make.defs b/apps/vsn/Make.defs
deleted file mode 100644
index 6d59ab838..000000000
--- a/apps/vsn/Make.defs
+++ /dev/null
@@ -1,51 +0,0 @@
-############################################################################
-# apps/vsn/Make.defs
-# Adds selected applications to apps/ build
-#
-# Copyright (C) 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <gnutt@nuttx.org>
-#
-# 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 NuttX 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.
-#
-############################################################################
-
-ifeq ($(CONFIG_VSN_POWEROFF),y)
-CONFIGURED_APPS += vsn/poweroff
-endif
-
-ifeq ($(CONFIG_VSN_RAMTRON),y)
-CONFIGURED_APPS += vsn/ramtron
-endif
-
-ifeq ($(CONFIG_VSN_SDCARD),y)
-CONFIGURED_APPS += vsn/sdcard
-endif
-
-ifeq ($(CONFIG_VSN_SYSINFO),y)
-CONFIGURED_APPS += vsn/sysinfo
-endif
diff --git a/apps/vsn/Makefile b/apps/vsn/Makefile
deleted file mode 100644
index 21901d96d..000000000
--- a/apps/vsn/Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
-############################################################################
-# apps/vsn/Makefile
-#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <gnutt@nuttx.org>
-#
-# 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 NuttX 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.
-#
-############################################################################
-
--include $(TOPDIR)/.config # Current configuration
-
-# Sub-directories
-
-SUBDIRS = poweroff ramtron sdcard sysinfo
-
-all: nothing
-.PHONY: nothing context depend clean distclean
-
-nothing:
-
-.context:
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir context TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
- @touch $@
-
-context: .context
-
-depend:
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
-
-clean:
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
- done
-
-distclean: clean
- @for dir in $(SUBDIRS) ; do \
- $(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \
- done
-
--include Make.dep
-
diff --git a/apps/vsn/poweroff/Kconfig b/apps/vsn/poweroff/Kconfig
deleted file mode 100644
index d0059a0d3..000000000
--- a/apps/vsn/poweroff/Kconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see misc/tools/kconfig-language.txt.
-#
-
-config VSN_POWEROFF
- bool "NSH poweroff command"
- default n
- ---help---
- Enable support for the NSH poweroff command.
-
-if VSN_POWEROFF
-endif
-
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 0370a708d..ec6a8be24 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -497,7 +497,7 @@
<td>
<p>
<li>
- RAMDISK, pipes, FIFO, <code>/dev/null</code>, <code>/dev/zero</code>, and loop drivers.
+ RAMDISK, pipes, FIFO, <code>/dev/null</code>, <code>/dev/zero</code>, <code>/dev/random</code>, and loop drivers.
</li>
</p>
</td>