[Skiboot] [PATCH] core/flash: Emit a warning if Skiboot version doesn't match
Samuel Mendoza-Jonas
sam at mendozajonas.com
Wed Jul 11 17:17:38 AEST 2018
Signed-off-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>
---
The message is very bikesheddable but this could be a useful sanity check
on non-dev machines.
core/flash.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/core/flash.c b/core/flash.c
index e258fe17..8f00d85e 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -212,6 +212,10 @@ static void __flash_dt_add_fw_version(struct dt_node *fw_version, char* data)
/* Increment past "key-" */
prop = data + version_len + 1;
dt_add_property_string(fw_version, version_str[i], prop);
+
+ if (strncmp(version_str[i], "skiboot", strlen("skiboot")) == 0)
+ if (strncmp(prop, version, strlen(version)) != 0)
+ prlog(PR_WARNING, "WARNING! Skiboot version does not match VERSION partition!\n");
}
}
--
2.18.0
More information about the Skiboot
mailing list