]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmulatorPkg: Redfish related changes on EmulatorPkg
authorAbner Chang <abner.chang@hpe.com>
Thu, 3 Dec 2020 05:08:40 +0000 (13:08 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 3 Dec 2020 07:54:44 +0000 (07:54 +0000)
BZ:
https://bugzilla.tianocore.org/show_bug.cgi?id=3102

- REDFISH_ENABLE definition to control EFI Redfish support
- Add Redfish platform host interface library to
  EmulatorPkg build.
- Set RestExServiceDevicePath PCD value.
- Add Redfish host interface config EFI application
  to EmulatorPkg build.
- Use Redfish DSC/FDF include file.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Peter O'Hanley <peter.ohanley@hpe.com>
Acked-by: Ray Ni <ray.ni@intel.com>
EmulatorPkg/EmulatorPkg.dsc
EmulatorPkg/EmulatorPkg.fdf

index c48e36a72c6097b648a15ad08fbc1ed04200d16e..850ce831f8587b817d73e4ba93e3a352119093f4 100644 (file)
   DEFINE NETWORK_ISCSI_ENABLE     = FALSE\r
   DEFINE SECURE_BOOT_ENABLE       = FALSE\r
 \r
+  #\r
+  # Redfish definition\r
+  #\r
+  DEFINE REDFISH_ENABLE = FALSE\r
+\r
 [SkuIds]\r
   0|DEFAULT\r
 \r
   #\r
   PlatformBootManagerLib|EmulatorPkg/Library/PlatformBmLib/PlatformBmLib.inf\r
   KeyMapLib|EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf\r
-\r
+  !if $(REDFISH_ENABLE) == TRUE\r
+    RedfishPlatformHostInterfaceLib|EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHostInterfaceLib.inf\r
+  !endif\r
   #\r
   # Misc\r
   #\r
   #  0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM\r
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1\r
 \r
+!if $(REDFISH_ENABLE) == TRUE\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePathMatchMode|DEVICE_PATH_MATCH_MAC_NODE\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePathNum|1\r
+  #\r
+  # Below is the MAC address of network adapter on EDK2 Emulator platform.\r
+  # You can use ifconfig under EFI shell to get the MAC address of network adapter on EDK2 Emulator platform.\r
+  #\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePath|{DEVICE_PATH("MAC(000000000000,0x1)")}\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceAccessModeInBand|False\r
+  gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDiscoverAccessModeInBand|False\r
+!endif\r
+\r
 [PcdsDynamicDefault.common.DEFAULT]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0\r
 \r
 !include NetworkPkg/Network.dsc.inc\r
 \r
+!if $(REDFISH_ENABLE) == TRUE\r
+  EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.inf\r
+!endif\r
+!include RedfishPkg/Redfish.dsc.inc\r
+\r
 [BuildOptions]\r
   #\r
   # Disable deprecated APIs.\r
index b256aa939744375f4fd8f90be947e8a23d5a8e4c..5420756eaa6fe7af9cefdfabe89bd8b063e4bfef 100644 (file)
@@ -208,6 +208,11 @@ INF  EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf
 !endif\r
 !include NetworkPkg/Network.fdf.inc\r
 \r
+#\r
+# EFI Redfish drivers\r
+#\r
+!include RedfishPkg/Redfish.fdf.inc\r
+\r
 INF FatPkg/EnhancedFatDxe/Fat.inf\r
 \r
 !if "XCODE5" not in $(TOOL_CHAIN_TAG)\r