Browse Source

NuttX mount procfs and binfs in px4 init

master
Daniel Agar 4 years ago
parent
commit
000765e9f0
  1. 1
      .ci/Jenkinsfile-hardware
  2. 4
      ROMFS/cannode/init.d/rcS
  3. 5
      ROMFS/px4fmu_common/init.d/rcS
  4. 23
      platforms/nuttx/src/px4/common/px4_init.cpp

1
.ci/Jenkinsfile-hardware

@ -862,6 +862,7 @@ void checkStatus() { @@ -862,6 +862,7 @@ void checkStatus() {
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener cpuload; top once; listener cpuload"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger status" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /bin"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /obj"'

4
ROMFS/cannode/init.d/rcS

@ -15,10 +15,6 @@ set +e @@ -15,10 +15,6 @@ set +e
#
#------------------------------------------------------------------------------
set R /
#
# Mount the procfs.
#
mount -t procfs /proc
#
# Start CDC/ACM serial driver.

5
ROMFS/px4fmu_common/init.d/rcS

@ -51,11 +51,6 @@ set STARTUP_TUNE 1 @@ -51,11 +51,6 @@ set STARTUP_TUNE 1
set USE_IO no
set VEHICLE_TYPE none
#
# Mount the procfs.
#
mount -t procfs /proc
#
# Start CDC/ACM serial driver.
#

23
platforms/nuttx/src/px4/common/px4_init.cpp

@ -44,12 +44,15 @@ @@ -44,12 +44,15 @@
#include <fcntl.h>
#include <sys/mount.h>
#include <syslog.h>
#if defined(CONFIG_I2C)
# include <px4_platform_common/i2c.h>
# include <nuttx/i2c/i2c_master.h>
#endif // CONFIG_I2C
int px4_platform_init(void)
int px4_platform_init()
{
int ret = px4_console_buffer_init();
@ -104,6 +107,24 @@ int px4_platform_init(void) @@ -104,6 +107,24 @@ int px4_platform_init(void)
#endif // CONFIG_I2C
#if defined(CONFIG_FS_PROCFS)
int ret_mount_procfs = mount(nullptr, "/proc", "procfs", 0, nullptr);
if (ret < 0) {
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret_mount_procfs);
}
#endif // CONFIG_FS_PROCFS
#if defined(CONFIG_FS_BINFS)
int ret_mount_binfs = nx_mount(nullptr, "/bin", "binfs", 0, nullptr);
if (ret_mount_binfs < 0) {
syslog(LOG_ERR, "ERROR: Failed to mount binfs at /bin: %d\n", ret_mount_binfs);
}
#endif // CONFIG_FS_BINFS
px4::WorkQueueManagerStart();

Loading…
Cancel
Save