diff --git a/boards/sim/sim/sim/README.txt b/boards/sim/sim/sim/README.txt index c32ef860bd..31091845a8 100644 --- a/boards/sim/sim/sim/README.txt +++ b/boards/sim/sim/sim/README.txt @@ -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. + diff --git a/boards/sim/sim/sim/src/sim_bringup.c b/boards/sim/sim/sim/src/sim_bringup.c index 645edaa95f..e09b7a6ee0 100644 --- a/boards/sim/sim/sim/src/sim_bringup.c +++ b/boards/sim/sim/sim/src/sim_bringup.c @@ -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 */