Skip to contentSkip to conversation

Enable RTDM SPI on BeagleBone Black

PATCH New Deniz Uğur 1 participant 1 message Nov 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable RTDM SPI on BeagleBone Black

From dbc3add6bb3130d40602d3144d152acc0e0e3bd9 Mon Sep 17 00:00:00 2001
From: Deniz Ugur <[email protected]>
Date: Wed, 11 Nov 2020 22:23:03 +0300
Subject: [xenomai-images][PATCH 1/1][REV 1] Enable RTDM SPI on BeagleBone Black
To: [email protected]
Cc: [email protected]

---
recipes-core/customizations/customizations.bb | 9 +- recipes-core/customizations/files/post-bbb | 5 + ...01-BeagleBone-Black-RTDM-SPI-enabled.patch | 110 ++++++++++++++++++ recipes-kernel/linux/files/bbb.cfg | 28 +++++ recipes-kernel/linux/linux-xenomai.inc | 9 +-

5 files changed, 159 insertions(+), 2 deletions(-)

create mode 100644 recipes-core/customizations/files/post-bbb
create mode 100644 recipes-kernel/linux/files/0001-BeagleBone-Black-RTDM-SPI-enabled.patch create mode 100644 recipes-kernel/linux/files/bbb.cfg

recipes-core/customizations/customizations.bb +0 -0
index e35c0a5..ecfd1d0 100644
@@ -13,10 +13,17 @@ inherit dpkg-raw
 

DESCRIPTION = "demo image customizations"

+def is_bbb(d):
+ bbb = d.getVar('MACHINE') or ''
+ if bbb == 'beagle-bone-black':
+ return "file://post-bbb"
+ return ""
+
SRC_URI = " \
file://postinst \
file://ethernet \
- file://99-silent-printk.conf"
+ file://99-silent-printk.conf \
+ ${@is_bbb(d)}"

DEBIAN_DEPENDS = "passwd"

recipes-core/customizations/files/post-bbb new file +5 -0
new file mode 100644
index 0000000..9befbcf
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Disable HDMI in order to enable SPI1 on BeagleBone Black
+echo "enable_uboot_overlays=1" >> /boot/uEnv.txt
+echo "disable_uboot_overlay_video=1" >> /boot/uEnv.txt
\ No newline at end of file
recipes-kernel/linux/files/0001-BeagleBone-Black-RTDM-SPI-enabled.patch new file +110 -0

111 lines not on this page · raw message

recipes-kernel/linux/files/bbb.cfg new file +28 -0
new file mode 100644
index 0000000..5e2a112
@@ -0,0 +1,28 @@
+# Disable conflicting drivers
+CONFIG_XENO_DRIVERS_SPI_BCM2835=n
+CONFIG_XENO_DRIVERS_SPI_SUN6I=n
+CONFIG_SPI_ATMEL=n
+CONFIG_SPI_BCM2835=n
+CONFIG_SPI_BCM2835AUX=n
+CONFIG_SPI_BCM_QSPI=n
+CONFIG_SPI_BITBANG=n
+CONFIG_SPI_CADENCE=n
+CONFIG_SPI_DAVINCI=n
+CONFIG_SPI_GPIO=n
+CONFIG_SPI_FSL_DSPI=n
+CONFIG_SPI_OMAP24XX=n
+CONFIG_SPI_ORION=n
+CONFIG_SPI_PL022=n
+CONFIG_SPI_ROCKCHIP=n
+CONFIG_SPI_RSPI=n
+CONFIG_SPI_S3C64XX=n
+CONFIG_SPI_SH_MSIOF=n
+CONFIG_SPI_SH_HSPI=n
+CONFIG_SPI_SIRF=n
+CONFIG_SPI_SUN4I=n
+CONFIG_SPI_SUN6I=n
+CONFIG_SPI_TEGRA114=n
+CONFIG_SPI_TEGRA20_SFLASH=n
+CONFIG_SPI_TEGRA20_SLINK=n
+CONFIG_SPI_XILINX=n
+CONFIG_SPI_SPIDEV=n
\ No newline at end of file
recipes-kernel/linux/linux-xenomai.inc +0 -0
index 185b60b..ddc698b 100644
@@ -13,7 +13,14 @@ require recipes-kernel/linux/linux-custom.inc
 

KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"

-SRC_URI += "file://${KERNEL_DEFCONFIG}"
+def is_bbb(d):
+ bbb = d.getVar('MACHINE') or ''
+ if bbb == 'beagle-bone-black':
+ return "file://0001-BeagleBone-Black-RTDM-SPI-enabled.patch file://bbb.cfg"
+ return ""
+
+SRC_URI += "file://${KERNEL_DEFCONFIG} \
+ ${@is_bbb(d)}"

DEPENDS += "xenomai-kernel-source"
KBUILD_DEPENDS += "xenomai-kernel-source"

Signature · 1 line
2.17.1