Using devtool for modifying kernel recipes in Yocto


Suppose you have a requirement of customizing the existing kernel sources, devtool will be the best option to go, as it will do all the steps required to create a patch, bbappend file etc.

Steps:

  1. From your build directory run "devtool modify <kernel-recipe", in my case it is "devtool modify linux-intel"
  2. It will create a workspace directory containing the kernel sources in build directory
cd workspace/sources/linux-intel
  1. Modify the sources as per your requirement
  2. Build the updated kernel by running the following command: "devtool build linux-intel"
  3. If the build is successful, you can generate the yocto image, by running: "devtool build-image core-image-minimal"
  4. After you test your image, by flashing on the hardware and found everything is working as per your requirement, you can instruct devtool to add the patches to your own layer
    1. git status
    2. git add <files>
    3. git commit -m <message>
    4. devtool finish linux-intel <path-to-your-own-layer>
  5. Once the above command finishes, the patches and .bbapend files are added to <path-to-your-own-layer>/recipes-kernel/linux directory.

Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto