5.11.6. Build the Modified QEMU Kernel Image

The following steps build your modified kernel image:

  1. Be sure your build environment is initialized: Your environment should be set up since you previously sourced the oe-init-build-env script. If it is not, source the script again from poky.

         $ cd ~/poky
         $ source oe-init-build-env
                            

  2. Clean up: Be sure to clean the shared state out by using BitBake to run from within the Build Directory the do_cleansstate task as follows:

         $ bitbake -c cleansstate linux-yocto
                            

    Note

    Never remove any files by hand from the tmp/deploy directory inside the Build Directory. Always use the various BitBake clean tasks to clear out previous build artifacts. For information on the clean tasks, see the "do_clean", "do_cleanall", and "do_cleansstate" sections all in the Yocto Project Reference Manual.

  3. Build the image: Next, build the kernel image using this command:

         $ bitbake -k linux-yocto