meta-google: os-release: Add more build info

Add BUILD_MEMO to /etc/os-release. BUILD_MEMO only exists when
BUILD_MEMO is defined in the shell environment.

Tested:
BUILD_MEMO=$(date) MACHINE=gbmc bitbake obmc-phosphor-image

$ cat /etc/os-release
ID=gbmc
NAME="gBMC (OpenBMC + Google customizations)"
VERSION="2.9.0-dev"
VERSION_ID=gbmc-release-0.5.0.0
PRETTY_NAME="gBMC (OpenBMC + Google customizations) 2.9.0-dev"
BUILD_ID="2.9.0-dev"
OPENBMC_TARGET_MACHINE="gbmc"
OBMC_VERSION="v2.4-11142-gda2d3941e2"
BUILD_MEMO="Tue 02 Mar 2021 03:39:50 PM PST"

Google-Bug-Id: 180020976
Google-Bug-Id: 179617828
Signed-off-by: Yong Zhao <yozhao@google.com>
Signed-off-by: Willy Tu <wltu@google.com>
Change-Id: Ie041b897d6dbe31355edef958c6c97e44c91ea75
diff --git a/meta-google/recipes-core/os-release/os-release.bbappend b/meta-google/recipes-core/os-release/os-release.bbappend
new file mode 100644
index 0000000..33d434a
--- /dev/null
+++ b/meta-google/recipes-core/os-release/os-release.bbappend
@@ -0,0 +1,11 @@
+
+python() {
+    # Instead of using BB_ENV_EXTRAWHITE, we can get info from the
+    # shell environment this way.
+    origenv = d.getVar("BB_ORIGENV", False)
+    memo = origenv.getVar("BUILD_MEMO", False)
+    if memo:
+        d.setVar('BUILD_MEMO', memo)
+}
+
+OS_RELEASE_FIELDS_append = " BUILD_MEMO"
\ No newline at end of file