[oe] Compiling a custom kernel module

Cliff Brake cliff.brake at gmail.com
Fri Jul 11 16:06:59 UTC 2008


On Fri, Jul 11, 2008 at 9:49 AM, Blaine Booher <blaine at cliftonlabs.com> wrote:
> Hey guys,
>  I am very new to Open Embedded so please bare with me if I make it too
> obvious :).

Welcome :-)

> We are using a gumstix embedded system with open embedded (and
> the angstrom release that gumstix provides).  We would like to use the kernel
> module cp2101 with a usb device.  The default cp2101 module won't work, since
> we have to edit the USB Device ID in the source code.  I'm having a hard time
> figuring out:
> 1.  How do I 'enable' the cp2101 module in the kernel?

Copy an updated defconfig to:
packages/linux/gumstix-kernel-2.6.21/gumstix-connex/defconfig

Note, figure out what kernel you are building first, the above is just a guess.

> 2.  How do I rebuild the kernel, once the source code is edited?

bitbake -c rebuild virtual/kernel (rebuilds the kernel)

For development, I usually keep a kernel tree separate from the OE
kernel, and then just copy the defconfig and patches to the OE build
when I get everything correct.

Alternatively, you can:

bitbake -c devshell virtual/kernel

and do your development there in a development shell.  Once you get
everything finished, create patch files/defconfig and copy to the OE
recipe.

> 3.  How to I ensure that the module is part of the final build, so that I can
> do a 'modprove cp2101' on the gumstix and have it load successfully?

look at the name of the *.ipk file generated by OE build system.  Then
create a custom image file and add the ipk file name to the
IMAGE_INSTALL variable.

The following article has some examples:

http://bec-systems.com/web/content/view/79/9/

Cliff


-- 
=======================
Cliff Brake
http://bec-systems.com




More information about the Openembedded-devel mailing list