[yocto] Adding kernel module to yocto core-image-base

Iván Castell icastell at nayarsystems.com
Tue Jun 12 00:33:13 PDT 2018


Hello.

First you need to reconfigure your kernel configuration (ncurses must be
properly installed in your host PC):

    $ bitbake -c menuconfig virtual/kernel

After you need to generate a fragment.cfg (containing a diff betweeen your
default and your recently customized kernel config):

    $ bitbake -c diffconfig  virtual/kernel

Thak will generate the fragment.cfg fine into your ${WORKDIR}

Then you need to create a bbappend in your own BSP layer extending the
content of your working kernel recipe. Something similar to this:

    $ cat your-custom-bsp-layer/recipes-kernel/linux/linux-kernel_%.bbappend

    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

    SUMMARY = "Linux kernel customization for your board"
    LINUX_VERSION = "x.y.z"

    inherit kernel

    SRC_URI += " \
        file://fragment.cfg \
    "

Just replace x.y.z by your specific kernel version. The fragment.cfg file
must be available inside your own kernel recipe, in a directory named ${PN}
(as indicated by FILESEXTRAPATHS_prepend):

    $ ls your-custom-bsp-layer/recipes-kernel/linux/linux-kernel
    fragment.cfg

Then you already can build your new kernel:

    $ bitbake virtual/kernel

Hope this helps!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180612/99c445f0/attachment.html>


More information about the yocto mailing list