boards/sim/sim/sim/src/sim_bringup.c: Auto mount binfs to /bin if CONFIG_FS_BINFS.

This commit is contained in:
Xiang Xiao 2019-12-05 08:50:59 -06:00 committed by Gregory Nutt
parent 948c566e39
commit febf226992
2 changed files with 14 additions and 10 deletions

View File

@ -634,16 +634,8 @@ nsh
can be made visible in the file system. Because of that, the
build in applications do not work as other examples.
For example trying to execute the hello builtin application will
fail:
The binfs filesystem will be mounted at /bin when the system starts up.
nsh> hello
nsh: hello: command not found
nsh>
Unless you first mount the BINFS file system:
nsh> mount -t binfs /bin
nsh> ls /bin
/bin:
hello
@ -1216,7 +1208,9 @@ ustream
To use the test:
nsh> mount -t binfs /bin
nsh> server &
nsh> client
Note that the binfs file system is mounted at /bin when the system
starts up.

View File

@ -103,6 +103,16 @@ int sim_bringup(void)
#endif
int ret;
#ifdef CONFIG_FS_BINFS
/* Mount the binfs file system */
ret = mount(NULL, "/bin", "binfs", 0, NULL);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to mount binfs at /bin: %d\n", ret);
}
#endif
#ifdef CONFIG_FS_PROCFS
/* Mount the procfs file system */