I am stuck on trying to include the MPU6050 driver into Yocto. I am using a Raspberry Pi 3, and I am on the kirkstone branch. I've done the following steps to include the MPU6050 driver:
CONFIG_INV_MPU6050_IIO=m
CONFIG_INV_MPU6050_I2C=m
SRC_URI += "file://fragment.cfg;subdir=git"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Then after finding the driver name, I successfully call modprobe
on it. I see the driver under lsmod
, but I am also expecting to see files under /sys/bus/iio/devices and I do not. Is this what I should be expecting, or what is the next step?
I'm quite new to Yocto and Linux in general, so I may be severely overlooking something.
So there were a couple things I missed:
local.conf
.ENABLE_I2C = "1"
KERNEL_DEVICETREE:append = " overlays/mpu6050.dtbo"
RPI_EXTRA_CONFIG = '\ndtoverlay=mpu6050\n'
mpu-6050.cfg
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
CONFIG_IIO_BUFFER_CB=y
CONFIG_IIO_BUFFER_DMA=y
CONFIG_IIO_BUFFER_DMAENGINE=y
CONFIG_IIO_BUFFER_HW_CONSUMER=y
CONFIG_IIO_KFIFO_BUF=y
CONFIG_IIO_TRIGGERED_BUFFER=y
CONFIG_IIO_CONFIGFS=y
CONFIG_IIO_TRIGGER=y
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
CONFIG_IIO_SW_DEVICE=y
CONFIG_IIO_SW_TRIGGER=y
CONFIG_IIO_TRIGGERED_EVENT=y
CONFIG_INV_MPU6050_IIO=y
CONFIG_INV_MPU6050_I2C=y
CONFIG_IIO_HRTIMER_TRIGGER=y
CONFIG_IIO_INTERRUPT_TRIGGER=y
CONFIG_IIO_TIGHTLOOP_TRIGGER=y
CONFIG_IIO_SYSFS_TRIGGER=y
linux-raspberrypi_5.15.bbappend
file in my own layerFILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://mpu-6050.cfg"