Allow Get Execution Context to run in early boot

BIOS needs execution context before the DBUS resource is available for
the partition pointer. In this early boot stage, BIOS does not care
about partition pointer so return success with an undefined partition
pointer when not ready.

Change-Id: Idcf30682aea3de2f5cdfcb4dce2ab41a574b4483
Signed-off-by: Terry S. Duncan <terry.s.duncan@linux.intel.com>
diff --git a/src/firmware-update.cpp b/src/firmware-update.cpp
index 548cd61..afb1662 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -758,6 +758,7 @@
 }
 static uint8_t getActiveBootImage(ipmi::Context::ptr ctx)
 {
+    constexpr uint8_t undefinedImage = 0x00;
     constexpr uint8_t primaryImage = 0x01;
     constexpr uint8_t secondaryImage = 0x02;
     constexpr const char *secondaryFitImageStartAddr = "22480000";
@@ -772,11 +773,12 @@
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "Failed to read the bootcmd value");
-        return ipmi::ccUnspecifiedError;
+        /* don't fail, just give back undefined until it is ready */
+        bootImage = undefinedImage;
     }
 
     /* cheking for secondary FitImage Address 22480000  */
-    if (value.find(secondaryFitImageStartAddr) != std::string::npos)
+    else if (value.find(secondaryFitImageStartAddr) != std::string::npos)
     {
         bootImage = secondaryImage;
     }