Static layout: Read PNOR VERSION using pflash
Use pflash to read VERSION partition to get the PNOR version
Add code to parse pflash's VERSION partition string.
Tested: Verify that the version and extended version are
retrieved correctly on Romulus and Palmetto.
Change-Id: Ia053c1683a5a969be0773d251cb88c4c5c9b6c60
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/version.hpp b/version.hpp
index 2b5a55a..831b201 100644
--- a/version.hpp
+++ b/version.hpp
@@ -147,6 +147,16 @@
std::map<std::string, std::string> keys);
/**
+ * @brief Get version and extended version from VERSION partition string.
+ *
+ * @param[in] versionPart - The string containing the VERSION partition.
+ *
+ * @return The pair contains the version and extended version.
+ **/
+ static std::pair<std::string, std::string>
+ getVersions(const std::string& versionPart);
+
+ /**
* @brief Calculate the version id from the version string.
*
* @details The version id is a unique 8 hexadecimal digit id