mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-05-08 05:09:17 +00:00
rpi-config: I2C support
With newer kernels (>=3.18) that supports device-trees I2C should be enabled with device-trees. This is now support by adding: ENABLE_I2C = "1" in local.conf This will enable the dtparams: i2c1 i2c_arm Signed-off-by: Petter Mabäcker <petter@technux.se> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
This commit is contained in:
committed by
Andrei Gherzan
parent
6c6f6cf7b3
commit
b331933938
@@ -75,6 +75,12 @@ do_deploy() {
|
||||
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
if [ -n "${ENABLE_I2C}" ]; then
|
||||
echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
}
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
|
||||
Reference in New Issue
Block a user