Skip to content

Commit 16c90ad

Browse files
W-M-Rxiaoxiang781216
authored andcommitted
mps/bringup: Add initialization of tmpfs
Signed-off-by: wangmingrong1 <[email protected]>
1 parent c393416 commit 16c90ad

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

boards/arm/mps/mps2-an500/src/mps2_bringup.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ static int mps2_bringup(void)
6161

6262
#endif
6363

64+
#ifdef CONFIG_FS_TMPFS
65+
/* Mount the tmp file system */
66+
67+
ret = nx_mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL);
68+
if (ret < 0)
69+
{
70+
syslog(LOG_ERR, "ERROR: Failed to mount tmpfs at /tmp: %d\n", ret);
71+
}
72+
#endif
73+
6474
return ret;
6575
}
6676

boards/arm/mps/mps2-an521/src/mps2_bringup.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ static int mps2_bringup(void)
6161

6262
#endif
6363

64+
#ifdef CONFIG_FS_TMPFS
65+
/* Mount the tmp file system */
66+
67+
ret = nx_mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL);
68+
if (ret < 0)
69+
{
70+
syslog(LOG_ERR, "ERROR: Failed to mount tmpfs at /tmp: %d\n", ret);
71+
}
72+
#endif
73+
6474
return ret;
6575
}
6676

boards/arm/mps/mps3-an547/src/mps3_bringup.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ static int mps3_bringup(void)
6161

6262
#endif
6363

64+
#ifdef CONFIG_FS_TMPFS
65+
/* Mount the tmp file system */
66+
67+
ret = nx_mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL);
68+
if (ret < 0)
69+
{
70+
syslog(LOG_ERR, "ERROR: Failed to mount tmpfs at /tmp: %d\n", ret);
71+
}
72+
#endif
73+
6474
return ret;
6575
}
6676

0 commit comments

Comments
 (0)