【发布时间】:2015-01-22 05:38:44
【问题描述】:
我使用的是飞思卡尔 QorIQ SDK 1.7。我已经修改了我的内核配置“make menuconfig”,将 USB 小工具驱动程序作为一个模块包括在内,并将小工具零或串行小工具作为一个模块包括在内。
我还直接将net2280外围设备编译到内核中,它可以很好地加载和绑定到PCI设备。
运行bitbake 后,新建的rootfs 不包含新建的gadget 模块,但我可以看到.ko 文件已构建:
$ 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
但是当我查看图像时,我什么也得不到。
$ tar -tzvf tmp/deploy/images/t1040rdb/fsl-image-core-t1040rdb.tar.gz | grep g_zero
我在搜索中发现的一件事是,有人建议将.config 复制到meta-fsl-arm/recipies-kernel/linux/ 中。不幸的是,我使用的是meta-fsl-ppc,它似乎对内核配置使用了完全不同的方案。
首先,meta-fsl-ppc/conf/machine/machine.conf 中定义了一个变量,如下所示:
KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/corenet32_fmanv3_smp_defconfig"
我的想法是也许我需要覆盖那个文件。但是,我对${S}实际上指向的位置感到困惑。
$ 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"
在我的树中什么都不匹配:
$ 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
所以我想我的问题是:当内核中配置了可加载模块时,是否期望该模块会神奇地找到它进入 rootfs 的方式,或者还有更多?
【问题讨论】:
-
我会查看存储所有包的目录。仅仅构建一个内核模块并不意味着它会被安装——至少对于基本的 Yocto,我不熟悉飞思卡尔层。使用基本的 Yocto,每个内核模块都被打包到自己的包中,您还必须告诉 bitbake 为您想要在映像中拥有的每个内核模块安装包。
标签: embedded-linux yocto openembedded bitbake