]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
report line number for command errors in a script.
[mirror_edk2.git] / CorebootPayloadPkg / CorebootPayloadPkgIa32X64.dsc
index b5b0635c9650fcc86ae54b79ec5e7a1e3a694f6d..fec376d1d85e5e9077d49c8cb6e069cf9c3d324a 100644 (file)
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
   DEFINE SOURCE_DEBUG_ENABLE     = FALSE\r
 
+  #
+  # CPU options
+  #
+  DEFINE MAX_LOGICAL_PROCESSORS  = 64
+
+  #
+  # Serial port set up
+  #
+  DEFINE BAUD_RATE                        = 115200
+  DEFINE SERIAL_CLOCK_RATE                = 1843200
+  DEFINE SERIAL_LINE_CONTROL              = 3 # 8-bits, no parity
+  DEFINE SERIAL_HARDWARE_FLOW_CONTROL     = FALSE
+  DEFINE SERIAL_DETECT_CABLE              = FALSE
+  DEFINE SERIAL_FIFO_CONTROL              = 7 # Enable FIFO
+  DEFINE SERIAL_EXTENDED_TX_FIFO_SIZE     = 16
+  DEFINE UART_DEFAULT_BAUD_RATE           = $(BAUD_RATE)
+  DEFINE UART_DEFAULT_DATA_BITS           = 8
+  DEFINE UART_DEFAULT_PARITY              = 1
+  DEFINE UART_DEFAULT_STOP_BITS           = 1
+  DEFINE DEFAULT_TERMINAL_TYPE            = 0
+
+  #
+  #  typedef struct {
+  #    UINT16  VendorId;          ///< Vendor ID to match the PCI device.  The value 0xFFFF terminates the list of entries.
+  #    UINT16  DeviceId;          ///< Device ID to match the PCI device
+  #    UINT32  ClockRate;         ///< UART clock rate.  Set to 0 for default clock rate of 1843200 Hz
+  #    UINT64  Offset;            ///< The byte offset into to the BAR
+  #    UINT8   BarIndex;          ///< Which BAR to get the UART base address
+  #    UINT8   RegisterStride;    ///< UART register stride in bytes.  Set to 0 for default register stride of 1 byte.
+  #    UINT16  ReceiveFifoDepth;  ///< UART receive FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes.
+  #    UINT16  TransmitFifoDepth; ///< UART transmit FIFO depth in bytes. Set to 0 for a default FIFO depth of 16 bytes.
+  #    UINT8   Reserved[2];
+  #  } PCI_SERIAL_PARAMETER;
+  #
+  # Vendor 0000 Device 0000 Prog Interface 1, BAR #0, Offset 0, Stride = 1, Clock 1843200 (0x1c2000)
+  #
+  #                                           [Vendor]   [Device]  [----ClockRate---]  [------------Offset-----------] [Bar] [Stride] [RxFifo] [TxFifo]   [Rsvd]   [Vendor]
+  DEFINE PCI_SERIAL_PARAMETERS            = {0x00,0x00, 0x00,0x00, 0x0,0x20,0x1c,0x00, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x00,    0x01, 0x0,0x0, 0x0,0x0, 0x0,0x0, 0xff,0xff}
+
+  #
+  # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI]
+  #
+  DEFINE SHELL_TYPE              = FULL_BIN
+
 [BuildOptions]\r
+  GCC:DEBUG_*_*_CC_FLAGS         = -Og -flto
+  GCC:DEBUG_*_*_DLINK_FLAGS      = -flto
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG\r
   GCC:RELEASE_*_*_CC_FLAGS       = -DMDEPKG_NDEBUG\r
   INTEL:RELEASE_*_*_CC_FLAGS     = /D MDEPKG_NDEBUG\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F\r
-!if $(SOURCE_DEBUG_ENABLE)\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17\r
-!else\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F\r
-!endif\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000\r
 !endif\r
 \r
 [PcdsPatchableInModule.common]\r
+  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
+
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
+!if $(SOURCE_DEBUG_ENABLE)
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
+!else
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
+!endif
+
+  #
+  # The following parameters are set by Library/PlatformHookLib
+  #
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|FALSE\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x03F8\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f8
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|$(BAUD_RATE)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
+
+  #
+  # Enable these parameters to be set on the command line
+  #
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|$(SERIAL_CLOCK_RATE)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl|$(SERIAL_LINE_CONTROL)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|$(SERIAL_HARDWARE_FLOW_CONTROL)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable|$(SERIAL_DETECT_CABLE)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE)
+
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
+  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
 \r
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
+
 ################################################################################\r
 #\r
 # Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform\r
   #
   CorebootModulePkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
   CorebootModulePkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
+  CorebootModulePkg/PciSioSerialDxe/PciSioSerialDxe.inf
 
   #\r
   # SCSI/ATA/IDE/DISK Support\r
   #\r
   # ISA Support\r
   #\r
-  MdeModulePkg/Universal/SerialDxe/SerialDxe.inf\r
+  CorebootModulePkg/SerialDxe/SerialDxe.inf
 
   #\r
   # Console Support\r
   # Framebuffer Gop
   #\r
   CorebootPayloadPkg/FbGop/FbGop.inf\r
+
+  #------------------------------
+  #  Build the shell
+  #------------------------------
+
+!if $(SHELL_TYPE) == BUILD_SHELL
+
+[PcdsFixedAtBuild]
+  ## This flag is used to control initialization of the shell library
+  #  This should be FALSE for compiling the shell application itself only.
+  gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+
+  #
+  # Shell Lib
+  #
+[LibraryClasses]
+  BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
+
+[Components.X64]
+  ShellPkg/Application/Shell/Shell.inf {
+
+    #------------------------------
+    #  Basic commands
+    #------------------------------
+
+    <LibraryClasses>
+      NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+
+    #------------------------------
+    #  Networking commands
+    #------------------------------
+
+    <LibraryClasses>
+      NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+      NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf
+
+    #------------------------------
+    #  Performance command
+    #------------------------------
+
+    <LibraryClasses>
+      NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf
+
+    #------------------------------
+    #  Support libraries
+    #------------------------------
+
+    <LibraryClasses>
+      DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+      DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+      FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
+      HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+      NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
+      PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
+      ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
+      ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+      ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+      SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+  }
+
+!endif