Userland SPI working on BeagleBone - how best to share?

Hey folks - I sent this out yesterday, but I never saw it show up on
the list. My apologies if this is a re-post.

After mucking about with it for entirely too long (6+ unsuccessful
kernel compiles will wear you down!) I was just able to get a version
of Ubuntu working on the BeagleBone that supports user land SPI.

The way I was able to do it was to read, re-read, and re-re-read Brian
Hensley's tutorial on making SPI work on the BeagleBoard xM
and then figure out how to translate that to the bone. (Thanks so much

Then I tried to apply Craig Berscheidt's BeagleBone SPI patch
but it wouldn't cleanly apply to the 3.2 source so I had to roll a new
patch with the same changes. (Thank you Craig!)

As time permits I want to write a tutorial up on how to do all of
this, but I also know that over the last few months I've seen a number
of people request userland SPI access and would like to share my
result sooner rather than later.

I was thinking of just putting an image file online somewhere along
with instructions on how to install it. However, this is the first
time I've ever done anything like this (and the first time I've
compiled a kernel since the late 90s!) so I want to make sure that
sharing in this manner is kosher. I know there are a number of
inexperienced BeagleBone users like myself who are faunching at the
bit to play with SPI and I would love to help them get up and running.

Thanks! (And another BIG thank you to Brian and Craig - you guys saved
my project!)

- Branden

I have been waiting to play with the Beaglebone more until the
userland SPI was working.

Is there an easy step-by-step procedure to get SPI to work on at least
one distribution?

Thanks for your effort.

I have been waiting to play with the Beaglebone more until the
userland SPI was working.

Is there an easy step-by-step procedure to get SPI to work on at least
one distribution?

Well, I don’t think the procedure I worked through could really count as “easy”, but it is all based on Brian Hensley’s awesome tutorial -
just with a few modifications to work on the bone. I’m working to write that up, but it probably will take some time as I’ll want to fully re-do it to check all the steps (and compiling kernels takes time!).

In the meantime I’m figuring out how to just package up an image of my working system so folks can just dd it onto a micro SD card and be off to the races.

As long as that’s a kosher thing to do, I’ll just post the URL to download and instructions on how to do it on my blog later this week.

Thanks for your effort.

No problem, I really didn’t do that much, just put together a bunch of MUCH more difficult pieces folks in this community had already provided.

  • Branden

Ok, until I get the instructions fully baked, here’s a download of a disk image of my Ubuntu setup for the BeagleBone with userland SPI working.

Please feel free to hit me up if you have any questions. As time permits I’ll be writing up my full process for rolling this beastie by hand.

  • Branden

Ubuntu + SPI without compiling my own kernel. That's what I have been
waiting for! Now onto porting Arduino SPI code to interface with a
RFM22 ISM chip. The Beaglebone adapter cape to Arduino shield is sold
where? :=)

Thanks for your effort Branden. I'll get in touch as I proceed.


Thanks for doing this! Serendipitous timing as I'm just starting with
SPI on an xM today. Looking forward to your tutorial. Thanks again :slight_smile:

did you do any progress in porting RFM22 library to it?
I’d like to look into it too in the next days.


Hi Branden,

Which display are you using here, and which controller does it use?



I’m not using a display as such, I’m controlling a large array of RGB LED strips.

Hi Branden,

Any chance you could share the main “gotcha’s” you experienced in getting your SPI patch to work?

I’m trying to get an HX8340 LCD working over spi by whatever means necessary - I have been concentrating on the Angstrom beaglebone distribution so far…

I’ve had an absolute nightmare trying to get the ST7735 driver to work, so I’m think userland SPI will be enough to get me going…

Unfortuantely applying a similar patch to yours to the Angstrom kernel I’m using just results in a “hang” partway through the kernel booting - with no clue to the cause…

I’m very experienced in general embedded programming & Cortex M3 ARM procecessors - however I’m pretty new to linux toolchains, & the variety is quite bewildering!!


Great work Branden.

Can you post the md5sum?