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>
2 files changed
tree: 183bca9554324ee93f1d120a6f5654fdd9c8a7c2
  1. aspeed-layer/
  2. classes/
  3. conf/
  4. nuvoton-layer/
  5. recipes-connectivity/
  6. recipes-core/
  7. recipes-devtools/
  8. recipes-extended/
  9. recipes-graphics/
  10. recipes-phosphor/
  11. recipes-protocols/
  12. recipes-support/
  13. recipes-textproc/
  14. COPYING.apache-2.0
  15. COPYING.MIT
  16. LICENSE
  17. MAINTAINERS
  18. README.md
  19. recipes.txt
README.md

OpenBMC

meta-phosphor is the OpenBMC layer. This layer should be included for all OpenBMC systems. The OpenBMC layer contains content which is shared between all OpenBMC systems.