Olimex-LPC1766-STK: Enable procfs in NSH configuration. Automount /proc on startup.
This commit is contained in:
parent
6cff0a7012
commit
9ed0387379
|
@ -844,7 +844,7 @@ static void lpc17_rxdone_work(FAR void *arg)
|
|||
pktlen = (*rxstat & RXSTAT_INFO_RXSIZE_MASK) - 3;
|
||||
|
||||
/* Check for errors. NOTE: The DMA engine reports bogus length errors,
|
||||
* making this a pretty useless check.
|
||||
* making this a pretty useless (as well as annoying) check.
|
||||
*/
|
||||
|
||||
if ((*rxstat & RXSTAT_INFO_ERROR) != 0)
|
||||
|
@ -1190,7 +1190,7 @@ static int lpc17_interrupt(int irq, void *context)
|
|||
* or Overrun. NOTE: (1) We will still need to call lpc17_rxdone_process
|
||||
* on RX errors to bump the considx over the bad packet. (2) The
|
||||
* DMA engine reports bogus length errors, making this a pretty
|
||||
* useless check anyway.
|
||||
* useless (as well as annoying) check anyway.
|
||||
*/
|
||||
|
||||
if ((status & ETH_INT_RXERR) != 0)
|
||||
|
|
|
@ -529,7 +529,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y
|
|||
# CONFIG_NET_DM90x0 is not set
|
||||
# CONFIG_ENC28J60 is not set
|
||||
# CONFIG_ENCX24J600 is not set
|
||||
|
||||
# CONFIG_NET_SLIP is not set
|
||||
# CONFIG_NET_FTMAC100 is not set
|
||||
|
||||
|
@ -774,7 +773,16 @@ CONFIG_FAT_MAXFNAME=32
|
|||
# CONFIG_FS_TMPFS is not set
|
||||
# CONFIG_FS_SMARTFS is not set
|
||||
# CONFIG_FS_BINFS is not set
|
||||
# CONFIG_FS_PROCFS is not set
|
||||
CONFIG_FS_PROCFS=y
|
||||
# CONFIG_FS_PROCFS_REGISTER is not set
|
||||
|
||||
#
|
||||
# Exclude individual procfs entries
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_NET is not set
|
||||
# CONFIG_FS_UNIONFS is not set
|
||||
|
||||
#
|
||||
|
@ -848,6 +856,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
|||
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
|
||||
CONFIG_ARCH_HAVE_TLS=y
|
||||
# CONFIG_TLS is not set
|
||||
# CONFIG_LIBC_IPv6_ADDRCONV is not set
|
||||
CONFIG_LIBC_NETDB=y
|
||||
# CONFIG_NETDB_HOSTFILE is not set
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
|
@ -1041,7 +1050,7 @@ CONFIG_NSH_DISABLE_DATE=y
|
|||
# CONFIG_NSH_DISABLE_HELP is not set
|
||||
# CONFIG_NSH_DISABLE_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_IFCONFIG is not set
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
# CONFIG_NSH_DISABLE_IFUPDOWN is not set
|
||||
# CONFIG_NSH_DISABLE_KILL is not set
|
||||
# CONFIG_NSH_DISABLE_LOSETUP is not set
|
||||
CONFIG_NSH_DISABLE_LOSMART=y
|
||||
|
@ -1083,6 +1092,7 @@ CONFIG_NSH_MMCSDSPIPORTNO=1
|
|||
# CONFIG_NSH_CMDOPT_DF_H is not set
|
||||
CONFIG_NSH_CODECS_BUFSIZE=128
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_NSH_PROC_MOUNTPOINT="/proc"
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
|
||||
#
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
@ -348,12 +349,28 @@ int board_app_initialize(uintptr_t arg)
|
|||
/* Initialize SPI-based microSD */
|
||||
|
||||
ret = nsh_sdinitialize();
|
||||
if (ret == OK)
|
||||
if (ret < 0)
|
||||
{
|
||||
/* Initialize USB host */
|
||||
|
||||
ret = nsh_usbhostinitialize();
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize SPI-based SD card: %d\n", ret);
|
||||
}
|
||||
|
||||
/* Initialize USB host */
|
||||
|
||||
ret = nsh_usbhostinitialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -346,6 +346,10 @@ try_again:
|
|||
* and try again. Briefly re-enabling interrupts should
|
||||
* be sufficient to permit processing the pending pause
|
||||
* request.
|
||||
*
|
||||
* NOTE: This should never happen on architectures like
|
||||
* the Cortex-A; the inter-CPU interrupt (SGI) is not
|
||||
* maskable.
|
||||
*/
|
||||
|
||||
up_irq_restore(ret);
|
||||
|
|
Loading…
Reference in New Issue