Add a kernel driver in the linux-yocto_3.4 recipe


#1

We have some problems in order to add cdc_composite kernel driver in the Linux recipe.

  • First, we use the menuconfig tool to add the cdc_composite in the .config file [Devices Drivers -> USB suport -> USB Gadget support -> USB Gadget Drivers (Ethernet Gadget (with CDC Ethernet support)) -> CDC Composite Device (ACM and ACM)].
  • In the folder “LegatoYocto1410/meta-swi/meta-swi-mdm9x15/recipes-
    kernel/linux/files” we create a kernel config file (cdc.cfg):

# CONFIG_USB_G_ANDROID is not set CONFIG_USB_CDC_COMPOSITE=m

  • We add this lines in the linux kernel recipe (LegatoYocto1410/meta-swi/meta-swi-mdm9x15/recipes-
    kernel/linux/linux-yocto_3.4.bbappend)

FILESEXTRAPATHS_prepend :="${THISDIR}/files:" SRC_URI +="file://cdc.cfg"

We haven’t added additional packages in the mdm9x15-image.inc file (IMAGE_INTALL += "package"), because in the help of menuconfig don’t have any dependency necessary in order to add cdc_composite.

  • Then, we build a new Yocto image (rootfs, kernel) using make or bitbake mdm9x15-image-minimal,
    but the kernel file don’t produce any change.

#2

Hi,

On AR7/WP7, you should not try to use a USB composite gadget other than the “Android Composite Gadget” default one.

For most use-cases, it is not needed to modify the kernel in order to tune the USB.

See the “Customize Legato USB” document: legato.io/legato-docs/15_01/Legato_USB.pdf
(from legato.io/legato-docs/15_01/ … _prep.html)

Regards,

Jay