meta-phosphor: Improve kernel version string

The kernel version string by yocto by default is <tag>-<revision>, e.g.

    5.0.7-b1b37a25644213428f4bab4c427581dd923e35da

Where the revision is the version specified by SRCREV, no matter if
there are additional pathces applied or not.

This commit improves it by

* If there are no yocto patches, keep the current version but use a
  shorter revision, e.g. 5.0.7-b1b37a2
* If there are yocto patches, append -dirty-<new-short-revision> to the
  version string, e.g. 5.0.7-b1b37a2-dirty-84fa553

Resolves openbmc/openbmc#1289

Tested: Verify the kernel version string is changed as above depending
        on if there are yocto patches.

Change-Id: Ic251835d2809ebc5d07e989e0bf9f4b7d3ae9c52
Signed-off-by: Lei YU <mine260309@gmail.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/conf/distro/include/phosphor-base.inc b/conf/distro/include/phosphor-base.inc
index 9cb9f86..b6f1551 100644
--- a/conf/distro/include/phosphor-base.inc
+++ b/conf/distro/include/phosphor-base.inc
@@ -148,3 +148,5 @@
 BAD_RECOMMENDATIONS_pn-obmc-phosphor-image += "shared-mime-info"
 
 LAYER_CONF_VERSION ?= "8"
+
+KERNEL_CLASSES_append = " obmc-phosphor-kernel-version"