MPU9250 Failed to Start

I have successfully build the PX4 but have problems with devices connected to SPI and I2C of Raspberry Pi 3. First, I want to verify the SPI where MPU9250 is connected and commented out everything except SPI in the config file…

~/px4 $ sudo ./bin/px4 -s px4_rpi.config
INFO [px4] assuming working directory is rootfs, no symlinks needed.


| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /
| |
| | / /^\ \ ___ |
_| / / |_/

px4 starting.

INFO [px4] Calling startup script: /bin/sh px4_rpi.config 0
INFO [dataman] Unknown restart, data manager file ‘./dataman’ size is 11798680 bytes
WARN [SPI_I2C] UnknownApp: no instance started (no device on bus?)
INFO [commander] LED: open /dev/led0 failed (22)
INFO [mavlink] mode: Normal, data rate: 1000000 B/s on udp port 14556 remote port 14550
INFO [logger] logger started (mode=all)
INFO [px4] Startup script returned successfully
pxh> INFO [mavlink] using network interface wlan0, IP: 192.168.100.18
INFO [mavlink] with netmask: 255.255.255.0
INFO [mavlink] and broadcast IP: 192.168.100.255
pxh>

The MPU9250 on SPI failed to start and even manually starting it doesn’t work…

pxh> mpu9250 start -s -R 2
WARN [SPI_I2C] UnknownApp: no instance started (no device on bus?)
Command ‘mpu9250’ failed, returned -1.
pxh> mpu9250 status
INFO [SPI_I2C] Not running
Command ‘mpu9250’ failed, returned -1.
pxh>

I also tested the SPI with an example…
~ $ wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-3.10.y/Documentation/spi/spidev_test.c
~ $ gcc -o spidev_test spidev_test.c
~ $ ./spidev_test -D /dev/spidev0.0
spi mode: 4
bits per word: 8
max speed: 500000 Hz (500 KHz)
00 00 C2 CD E4 FB
AC 1D E9 C3 F8 F0
0F FC 00 6A 65 78
D7 D5 03 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00

This seems to detect at least something is connected to SPI