[yocto] How do I patch the kernel before it is built?

autif khan autif.mlist at gmail.com
Wed Feb 8 07:31:44 PST 2012


>>> I have a meta layer where I am keeping my changes. I am guessing that I need to:
>>>
>>> a) write a bbappend file to accomplish #1
>>> b) write a recipe to accomplish #3
>>>
>>> I have written recipes before, but just for libraries and autotools
>>> based applications. Not for a kernel module. If there is a recipe out
>>> there for some other module, I would be happy to steal from it.
>>>
>>> Please advise how I can go about patching the kernel and if there is a
>>
>> It's just like any other package. If your changes are simple, then
>> generating patches and putting them on the SRC_URI via a bbappend in
>> your layer is all you need. If you have complex changes, there are options
>> to manage them via git or via feature descriptions.
>>
>>> recipe for a kernel module - please point me to it.
>>
>> Darren validated and updated the kernel module example, so he'd probably
>> got this closer at hand than I do.
>
> See the hello-mod example under meta/recipes-kernel/hello-mod

Now, I want to load my module at startup.

The preferred way to load my module at startup would be by to place a
file called hello-mod in /etc/modutils

Is this correct?

Is there a recipe already that does this?

I see this line in kernel.bbclass - module_autoload_ipv6 = "ipv6"

So will appending module_autoload_hello-mod = "hello-mod" to this
class achieve this? I know how to append a recipe, but how do I append
a class?

When I boot my device it seems like minix and ipv6 modules are loaded,
but I can not follow how they are loaded.

Seems like ipv6 is in /etc/modutils, but minix is not.

minix is in /etc/filesystems - but I am not sure what role that file plays

Last but, not the least - was this documented somewhere and I just
could not/did not find it? Should I add this to the "How do I ..."
section of the wiki?

Thanks

Autif



More information about the yocto mailing list