2.8. Working with a "Dirty" Kernel Version String

If you build a kernel image and the version string has a "+" or a "-dirty" at the end, uncommitted modifications exist in the kernel's source directory. Follow these steps to clean up the version string:

  1. Discover the Uncommitted Changes: Go to the kernel's locally cloned Git repository (source directory) and use the following Git command to list the files that have been changed, added, or removed:

         $ git status
                        

  2. Commit the Changes: You should commit those changes to the kernel source tree regardless of whether or not you will save, export, or use the changes:

         $ git add
         $ git commit -s -a -m "getting rid of -dirty"
                        

  3. Rebuild the Kernel Image: Once you commit the changes, rebuild the kernel.

    Depending on your particular kernel development workflow, the commands you use to rebuild the kernel might differ. For information on building the kernel image when using devtool, see the "Using devtool to Patch the Kernel" section. For information on building the kernel image when using Bitbake, see the "Using Traditional Kernel Development to Patch the Kernel" section.