+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+\r
+ //\r
+ // If the development features are enabled, install the dynamic shell\r
+ // command "setfdt" to be able to define a device path for the FDT\r
+ // that has precedence over the device paths defined by\r
+ // "PcdFdtDevicePaths".\r
+ //\r
+\r
+ if (FeaturePcdGet (PcdOverridePlatformFdt)) {\r
+ //\r
+ // Register the strings for the user interface in the HII Database.\r
+ // This shows the way to the multi-language support, even if\r
+ // only the English language is actually supported. The strings to register\r
+ // are stored in the "FdtPlatformDxeStrings[]" array. This array is\r
+ // built by the building process from the "*.uni" file associated to\r
+ // the present driver (cf. FdtPlatfromDxe.inf). Examine your Build\r
+ // folder under your package's DEBUG folder and you will find the array\r
+ // defined in a xxxStrDefs.h file.\r
+ //\r
+ mFdtPlatformDxeHiiHandle = HiiAddPackages (\r
+ &mFdtPlatformDxeHiiGuid,\r
+ ImageHandle,\r
+ FdtPlatformDxeStrings,\r
+ NULL\r
+ );\r
+\r
+ if (mFdtPlatformDxeHiiHandle != NULL) {\r
+ Status = gBS->InstallMultipleProtocolInterfaces (\r
+ &ImageHandle,\r
+ &gEfiShellDynamicCommandProtocolGuid,\r
+ &mShellDynCmdProtocolSetFdt,\r
+ NULL\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ HiiRemovePackages (mFdtPlatformDxeHiiHandle);\r
+ }\r
+ } else {\r
+ Status = EFI_LOAD_ERROR;\r
+ }\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((\r
+ EFI_D_WARN,\r
+ "Unable to install \"setfdt\" EFI Shell command - %r \n",\r
+ Status\r
+ ));\r
+ }\r
+ }\r
+\r