I wrote my own USB driver for hardware and I want to add this driver as builtin. I have seen this post where they create a recipe to set as module and not builtin.
http://wiki.kaeilos.com/index.php/Howto_build_a_kernel_module_out_of_the_kernel_tree
Can you please guys help me in creating a recipe to set the module as builtin.
Thanks for your time.
You can't have external modules built into Linux Kernel. So you need to place your driver into drivers/usb/
(based on the hardware type it needs to be placed in drivers/usb/host/
if it is host controller driver or drivers/usb/dwc*
or drivers/usb/gadget/udc
if it is gadget driver) of your Linux Kernel tree.
Then you need to add according configuration in Kconfig
and Makefile
in drivers/usb
. Finally you need to enable this as build in driver in defconfig/.config for building.
In short,
drivers/usb
Kconfig
and Makefile
. For example, CONFIG_USB_HW_HCD
CONFIG_USB_HW_HCD=y
. In Yocto you can specify the defconfig file as file://defconfig
in your SRC_URI
.EDIT: As you are using meta-intel directly, you can create patch and bbappend to it. To do it,
drivers/usb
, add Kconfig, Makefile
entry.git add
+ git commit
git format-patch
.bbappend
file and add this patch. You can place this .bbappend
file in any of your custom layer or in meta-intel itself..bbappend
file for your Linux Kernel.This way you don't need to have separate repo of same Linux Kernel.