OK good! You are almost there. Now it is time to get your hands dirty.
I'm going to use my last build as an example which should be similar
to what you should see but your mileage may vary
The quick and dirty way to make your changes (this is "a way" not "the
way" - as there are many):
The kernel comes from git and gets patches applied to it for your
target (machine) during the bitbake process and the product of that
processes ended up in a work directory. My board-omap3beagle.c file
is in:
build/tmp-angstrom_2010_x-eglibc/work/beagleboard-angstrom-linux-gnueabi/linux-3.0.17-r115c/git/arch/arm/mach-omap2
directory.
Refer to the elinux spi page in earlier messages of this thread but
basically ....
Make your SPI changes to this file (board-omap3beagle.c ). To use my
project as an example I added the following changes/sections:
#include <linux/spi/spi.h>
// For McSPI3 on expansion connector
static struct spi_board_info beagle_mcspi_board_info[] = {
{
.modalias = "spidev",
.max_speed_hz = 100000, //100 KHz
.bus_num = 3,
.chip_select = 0,
.mode = SPI_CS_HIGH | SPI_MODE_1,
}
};
In omap3_beagle_init I added:
//BTH - For McSPI3
spi_register_board_info(beagle_mcspi_board_info,
ARRAY_SIZE(beagle_mcspi_board_info));
Now for the fun part. After you make these changes, if you run the
bitbake virtual/whatever you will most likely wipe out your changes
(at least that was my experience when I was learning). Oh, you will
get a kernel image but it will take kernel from git and apply the
patches and the result will over write the files you just changed.
You want to just recompile the kernel (everything else has already
been done for you if you did say a console-image etc.) so you need to
do that with a command like:
bitbake -f -c compile linux-3.0.17
When this is done ... your uImage will be somewhere like:
build/tmp-angstrom_2010_x-eglibc/work/beagleboard-angstrom-linux-gnueabi/linux-3.0.17-r115c/git/arch/arm/boot
... but will not be in the image directory.
Run the deploy command on the kernel:
bitbake -f -c deploy linux-3.0.17
... and you should have ready-to-go images in a directory that looks
something like:
build/tmp-angstrom_2010_x-eglibc/deploy/images/beagleboard
Put these in the proper place on the SD Card and enjoy. Go get
yourself a cold beverage ... you earned it. Enjoy watching the board
boot the kernel you just modified. You'll have to rename the files on
the SD Card to be MLO, u-boot.bin, uImage etc. There is the small
detail of a boot.scr or uEnv.txt script that you'll need but you can
google for how to construct one of those too.
look in /dev/ to see if you have a /dev/spidev3.0 device (the result
of my example above). If it is there, then you should be good to go.
Write a user space program to use it. Checkout and google spidev_test
as an example.
Regards,
Brian