I loaded a new Angstrom image:
Linux beaglebone 3.2.14 #1 Mon Apr 9 12:21:19 CEST 2012 armv7l GNU/Linux
root@beaglebone:~# dmesg | grep spi
[ 0.069960] omap2_mcspi.1: alias fck already exists
[ 0.070094] omap2_mcspi.2: alias fck already exists
root@beaglebone:~# modprobe spidev
Module Size Used by
spidev 3888 0
ip_tables 7830 0
x_tables 14348 1 ip_tables
g_mass_storage 24018 0
rfcomm 24259 0
ircomm_tty 14073 0
ircomm 8407 1 ircomm_tty
irda 85557 2 ircomm_tty,ircomm
hidp 10152 0
bluetooth 109654 4 rfcomm,hidp
rfkill 14605 2 bluetooth
ipv6 210442 14
root@beaglebone:~# ls /dev/spi*
ls: cannot access /dev/spi*: No such file or directory
How to win with spidev?
Does the kernel still need to be rebuild to include spidev?
How to create spidev* under /dev/ ?
I wrote a small bog post on how to enable spidev with the beaglebone. This comes up about once a week so searching back through past posts will also yield some good results.
Thanks for your reply.Much appreciate as well your help in a form of tutorials on your website.
Can you confirm/deny that I have to rebuild the kernel/filesystem even if using the latest Angstrom image for the Beaglebone?
That would save me a lot of time.
I did follow your instruction from here http://communistcode.co.uk/blog/blogPost.php?blogPostID=2
and after a days a multiple tries and searching for solution I finally manage to succed and have files in build/tmp-*/work/deploy/images/beaglebone
It all works without any custom changes.
Now I go here http://communistcode.co.uk/blog/blogPost.php?blogPostID=1
Step 1) Add the following struct to the kernel source file arch/arm/mach-omap2/board-am335xevm.c
The first problem is that I don’t have that file, where is it? what is wrong?
user@ubuntu:~$ sudo find / -name ‘board-am335xevm.c’
returns no results.
Can you help me to move further.
This will be the topic of my next blog post, recompiling the kernel with custom patches. I am going to try and get it done this weekend as it seems a few people would be interested in it.
I'm glad you managed to get your build going, it sometimes takes a bit of effort and the learning curve is steep for someone new to embedded Linux but it will click eventually!
I just quickly wrote the 'Recompiling the BeagleBone Kernel for Angstrom'`` blog post up this morning. It can be found at the link below.
You do realize there's a better kernel workflow linked from the angstrom frontpage, right? That doesn't do silly things like removing rm_work, which is highly discouraged.
For the people too lazy to open up the angstrom frontpage: http://www.slimlogic.co.uk/2011/05/openembeddedangstrom-kernel-workflow/
Correct as usual Koen, I'll adapt my work flow (and blog post) now I know about these additional Bitbake features! I believe I have read the Kernel work flow post a while ago but it slipped my mind, and since then I just fell into a certain way of doing it which suited me during the (minimal) amount of Kernel work I currently do.
I have to admit now I’m a bit more confused now and that means more reading and experimenting.
There seems to be 2 extreme models for Beaglebone usage:
- Beaglebone as Arduino on steroid path(low end)
- Open Embedded path(high end)
I am somewhere in between, but rather prefer the second path.
Unfortunately OE is very difficult to comprehend, user unfriendly and I would be happy
to see some improvements to it.
Once again thanks for your help.
Thanks for your blog. I found it most useful. I am still confused by the .bus_num=1 when pins 18 and 21 refer to spi_0. If I am to use spi_1, should I set .bus_num=2? In other words doe the hardware numbering differ from the bus numbering 0,1,... vs. 1,2,... ?
Yes I believe altering the bus number to 2 will give you spidev2.0 - when I refer to spi_0 it is purely a reference only - I agree, spi_1 would have made more sense! It also works with chip-selects so 2.1 would be bus 2, chip select 1 (again if I am remembering correctly!).