AnsweredAssumed Answered

deploying USB gadget into rootfs on the t1040rdb

Question asked by Jacob Tummond on Jan 21, 2015
Latest reply on Jan 22, 2015 by Yiping Wang

I'm using the Freescale QorIQ SDK 1.7.  I've modified my kernel config 'make menuconfig' to include the USB gadget drivers as a module and to include either Gadget zero or the serial gadget as a module.

 

I've also compiled the net2280 peripheral device directly into the kernel and it is loading and binding to the PCI device just fine.

 

After I run `bitbake`, the newly built rootfs doesn't include the newly built gadget modules yet I can see the `.ko` files have been built:

 

$ find -name g_zero.ko
 ./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/git/drivers/usb/gadget/g_zero.ko
 ./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/image/lib/modules/3.12.19-rt30-QorIQ-SDK-V1.7+g6619b8b/kernel/drivers/usb/gadget/g_zero.ko

 

but when I look in the image I get nothing.

 

$ tar -tzvf tmp/deploy/images/t1040rdb/fsl-image-core-t1040rdb.tar.gz | grep g_zero

 

One thing I found in searching is that it was suggested that `.config` needs to be copied into `meta-fsl-arm/recipies-kernel/linux/`. Unfortunately I'm using `meta-fsl-ppc` and it seems to use a completely different scheme for the kernel config.

 

First, there is a variable defined in `meta-fsl-ppc/conf/machine/machine.conf` that looks like this:

 

KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig"

 

My thinking was that maybe I need to overwrite that file. However, I'm confused as to where `${S}` is *actually* pointing.

 

$ bitbake -e | grep KERNEL_DEFCONFIG
KERNEL_DEFCONFIG="/home/jaket/QorIQ-SDK-V1.7-20141218-yocto/build_t1040rdb_release/tmp/work/ppce5500-fsl-linux/defaultpkgname/1.0-r0/defaultpkgname-1.0/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig"

 

Which matches nothing in my tree:

 

$ find -name corenet32_fmanv3_smp_defconfig
./tmp/sysroots/t1040rdb/usr/src/kernel/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig
./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/sysroot-destdir/usr/src/kernel/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig
./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/package/usr/src/kernel/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig
./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/git/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig
./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/image/usr/src/kernel/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig
./tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/packages-split/kernel-dev/usr/src/kernel/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig

 

So I guess my question is: when a loadable module is configured in the kernel, is it expected that the module will magically find its way onto the rootfs or is there more to it than that?

Outcomes