mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
viewtool-stm32f107: Add support to auto-mount the procfs file system
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* config/viewtool-stm32f107/src/stm32_appinit.c
|
* config/viewtool-stm32f107/src/stm32_appinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013, 2016-2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
@@ -156,6 +157,17 @@ int board_app_initialize(uintptr_t arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to mount procfs at %s: %d\n",
|
||||||
|
STM32_PROCFS_MOUNTPOINT, ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MMCSD
|
#ifdef HAVE_MMCSD
|
||||||
ret = stm32_sdinitialize(CONFIG_NSH_MMCSDSLOTNO);
|
ret = stm32_sdinitialize(CONFIG_NSH_MMCSDSLOTNO);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
@@ -98,6 +98,16 @@
|
|||||||
# undef HAVE_RTC_DRIVER
|
# undef HAVE_RTC_DRIVER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* procfs File System */
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
# ifdef CONFIG_NSH_PROC_MOUNTPOINT
|
||||||
|
# define STM32_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT
|
||||||
|
# else
|
||||||
|
# define STM32_PROCFS_MOUNTPOINT "/proc"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* GPIO Configuration *******************************************************/
|
/* GPIO Configuration *******************************************************/
|
||||||
/* LEDs
|
/* LEDs
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user