mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
SAMV71-XULT and STM32F4Discovery: Automatically mount procfs on startup
This commit is contained in:
@@ -193,6 +193,17 @@ int sam_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
SYSLOG("ERROR: Failed to mount procfs at %s: %d\n",
|
||||||
|
SAMV71_PROCFS_MOUNTPOINT, ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MTDCONFIG
|
#ifdef HAVE_MTDCONFIG
|
||||||
/* Create an AT24xx-based MTD configuration device for storage device
|
/* Create an AT24xx-based MTD configuration device for storage device
|
||||||
* configuration information.
|
* configuration information.
|
||||||
|
|||||||
@@ -188,6 +188,16 @@
|
|||||||
# undef HAVE_MTDCONFIG
|
# undef HAVE_MTDCONFIG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* procfs File System */
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
# ifdef CONFIG_NSH_PROC_MOUNTPOINT
|
||||||
|
# define SAMV71_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT
|
||||||
|
# else
|
||||||
|
# define SAMV71_PROCFS_MOUNTPOINT "/proc"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* S25FL1 QuadSPI FLASH */
|
/* S25FL1 QuadSPI FLASH */
|
||||||
|
|
||||||
#ifndef CONFIG_MTD_S25FL1
|
#ifndef CONFIG_MTD_S25FL1
|
||||||
|
|||||||
@@ -177,5 +177,17 @@ int stm32_bringup(void)
|
|||||||
#ifdef CONFIG_MAX6675
|
#ifdef CONFIG_MAX6675
|
||||||
ret = stm32_max6675initialize("/dev/temp0");
|
ret = stm32_max6675initialize("/dev/temp0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
sdbg("ERROR: Failed to mount procfs at %s: %d\n",
|
||||||
|
STM32_PROCFS_MOUNTPOINT, ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/stm32f4discovery/src/stm32f4discovery.h
|
* configs/stm32f4discovery/src/stm32f4discovery.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012, 2015 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
|
||||||
@@ -171,6 +171,16 @@
|
|||||||
# undef HAVE_NETMONITOR
|
# undef HAVE_NETMONITOR
|
||||||
#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
|
||||||
|
|
||||||
/* STM32F4 Discovery GPIOs **************************************************/
|
/* STM32F4 Discovery GPIOs **************************************************/
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user