deploying USB gadget into rootfs on the t1040rdb

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

deploying USB gadget into rootfs on the t1040rdb

ソリューションへジャンプ
1,920件の閲覧回数
jaket
Contributor II

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?

ラベル(1)
0 件の賞賛
1 解決策
1,430件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello Jacob Tummond,


In SDK 1.7, Kernel modules could be built into rootfs automatically, the file tmp/deploy/images/t1040rdb/fsl-image-core-t1040rdb.tar.gz is a symbolic link, please extract the real file and check whether the module is in it.

I summarize build Kernel modules procedure as the following, please have a reference.

1. bitbake virtual/kernel -c cleansstate

2. bitbake virtual/kernel -c patch

3. bitbake virtual/kernel -c configure

4. Go the source folder tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/git/, and configure Kernel

make ARCH=powerpc menuconfig

Configure Gadget zero and the serial gadget as modules.

5. Go back to build folder and run "bitbake fsl-image-core", Kernel also gets rebuilt.

6. Go to image deploy folder tmp/deploy/images/t1040rdb/, and find the real file which fsl-image-core-t1040rdb.tar.gz links to, run

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


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
1 返信
1,431件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello Jacob Tummond,


In SDK 1.7, Kernel modules could be built into rootfs automatically, the file tmp/deploy/images/t1040rdb/fsl-image-core-t1040rdb.tar.gz is a symbolic link, please extract the real file and check whether the module is in it.

I summarize build Kernel modules procedure as the following, please have a reference.

1. bitbake virtual/kernel -c cleansstate

2. bitbake virtual/kernel -c patch

3. bitbake virtual/kernel -c configure

4. Go the source folder tmp/work/t1040rdb-fsl-linux/linux-qoriq/3.12-r0/git/, and configure Kernel

make ARCH=powerpc menuconfig

Configure Gadget zero and the serial gadget as modules.

5. Go back to build folder and run "bitbake fsl-image-core", Kernel also gets rebuilt.

6. Go to image deploy folder tmp/deploy/images/t1040rdb/, and find the real file which fsl-image-core-t1040rdb.tar.gz links to, run

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


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛