使用Yocto编译和加载内核模块驱动程序 [英] Compiling and loading kernel module drivers with Yocto

查看:1384
本文介绍了使用Yocto编译和加载内核模块驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从本手册中为Dart板编译Linux内核和根文件系统: http://variwiki.com/index.php?title=VAR-SOM-MX6_Yocto_Fido_New_R2

I'm compiling a Linux kernel and root file system for a Dart board from this manual: http://variwiki.com/index.php?title=VAR-SOM-MX6_Yocto_Fido_New_R2

现在,我想包括一些额外的驱动程序,用于将WiFi USB加密狗连接到我的编译版本.我想出了如何使用内核Makefile自己编译模块,但是当我在项目上运行bitbake时,我希望使用RFS对其进行编译和打包.我知道我需要的内核对象的名称-ath.koath9k.koath9k_common.koath0k_hw.koath9k_htc.ko.

Now, I want to include extra drivers for attaching a WiFi USB dongle to my compiled version. I figured out how to compile the modules myself with the kernel Makefile, but I want them to be compiled and packaged with the RFS when I run bitbake on the project. I know the names of the kernel objects I need - ath.ko, ath9k.ko, ath9k_common.ko, ath0k_hw.ko and ath9k_htc.ko.

我没有使用过Yocto的经验,所以我希望能得到一些详细的解释.

I have no prior experience with Yocto, so I would appreciate a somewhat detailed explanation.

所以我的问题是,鉴于我需要的内核对象/模块/驱动程序:

So my questions are, given the kernel objects / modules / drivers I need:

  • 在编译内核时如何使Yocto对其进行编译?
  • 如何使Yocto将生成的编译内核模块打包到它创建的RFS映像中?

推荐答案

清理内核sstate-cache bitbake -c cleansstate kernelName

Clean up the Kernel sstate-cache bitbake -c cleansstate kernelName

要对内核进行配置,可以使用此命令

To do configuration to the kernel, you could use this command

bitbake kernelName -c menuconfig

然后,在配置后编译内核

Then, Compile the kernel after configuration

bitbake kernelName

Yocto中有一个内核实验室教程,可教授内核配置的基本知识,此处.

There is a kernel lab tutorial in Yocto that teaches the basic of kernel configuration, available here.

这篇关于使用Yocto编译和加载内核模块驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆