2011-05-11 20:31:20 +02:00
|
|
|
## @file
|
|
|
|
# Entry Point of Emu Emulator
|
|
|
|
#
|
|
|
|
# Main executable file of Unix Emulator that loads PEI core after initialization finished.
|
2022-12-06 06:40:52 +01:00
|
|
|
# Copyright (c) 2008 - 2022, Intel Corporation. All rights reserved.<BR>
|
2011-05-11 20:31:20 +02:00
|
|
|
# Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
|
|
|
#
|
2019-04-04 01:03:44 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2011-05-11 20:31:20 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
##
|
|
|
|
|
|
|
|
[Defines]
|
|
|
|
INF_VERSION = 0x00010005
|
2011-06-29 07:13:33 +02:00
|
|
|
BASE_NAME = Host
|
2011-05-11 20:31:20 +02:00
|
|
|
FILE_GUID = 8863C0AD-7724-C84B-88E5-A33B116D1485
|
|
|
|
MODULE_TYPE = USER_DEFINED
|
|
|
|
VERSION_STRING = 1.0
|
|
|
|
|
|
|
|
#
|
|
|
|
# The following information is for reference only and not required by the build tools.
|
|
|
|
#
|
2018-06-29 05:22:32 +02:00
|
|
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
2011-05-11 20:31:20 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
[Sources]
|
2011-06-29 07:13:33 +02:00
|
|
|
Host.c
|
2011-05-11 20:31:20 +02:00
|
|
|
EmuThunk.c
|
|
|
|
X11GraphicsWindow.c
|
|
|
|
Pthreads.c
|
|
|
|
PosixFileSystem.c
|
2011-06-03 05:31:32 +02:00
|
|
|
BlockIo.c
|
2011-06-20 23:58:05 +02:00
|
|
|
LinuxPacketFilter.c
|
|
|
|
BerkeleyPacketFilter.c
|
|
|
|
MemoryAllocationLib.c
|
2011-06-28 18:50:26 +02:00
|
|
|
|
2011-05-11 20:31:20 +02:00
|
|
|
[Sources.X64]
|
|
|
|
X64/Gasket.S # convert between Emu x86_64 ABI and EFI X64 ABI
|
|
|
|
X64/SwitchStack.S
|
|
|
|
|
2011-06-18 19:53:31 +02:00
|
|
|
[Sources.IA32]
|
|
|
|
Ia32/Gasket.S # enforce 16-byte stack alignment for Mac OS X
|
|
|
|
Ia32/SwitchStack.c
|
|
|
|
|
2011-05-11 20:31:20 +02:00
|
|
|
|
|
|
|
[Packages]
|
|
|
|
MdePkg/MdePkg.dec
|
|
|
|
MdeModulePkg/MdeModulePkg.dec
|
2019-08-02 03:06:04 +02:00
|
|
|
NetworkPkg/NetworkPkg.dec
|
2011-06-28 18:47:23 +02:00
|
|
|
EmulatorPkg/EmulatorPkg.dec
|
2011-05-11 20:31:20 +02:00
|
|
|
|
|
|
|
[LibraryClasses]
|
|
|
|
DebugLib
|
|
|
|
PcdLib
|
|
|
|
PrintLib
|
|
|
|
BaseMemoryLib
|
|
|
|
BaseLib
|
|
|
|
PeCoffLib
|
|
|
|
ThunkPpiList
|
|
|
|
ThunkProtocolList
|
2011-05-14 18:00:22 +02:00
|
|
|
PpiListLib
|
|
|
|
PeiServicesLib
|
|
|
|
PeCoffGetEntryPointLib
|
2011-05-11 20:31:20 +02:00
|
|
|
|
|
|
|
[Ppis]
|
|
|
|
gEfiPeiStatusCodePpiGuid # PPI ALWAYS_PRODUCED
|
|
|
|
gEmuThunkPpiGuid
|
|
|
|
|
|
|
|
[Protocols]
|
|
|
|
gEmuIoThunkProtocolGuid
|
|
|
|
gEmuIoThunkProtocolGuid
|
|
|
|
gEmuGraphicsWindowProtocolGuid
|
2011-05-16 06:47:40 +02:00
|
|
|
gEmuThreadThunkProtocolGuid
|
2011-06-03 05:31:32 +02:00
|
|
|
gEmuBlockIoProtocolGuid
|
2011-06-15 20:51:30 +02:00
|
|
|
gEmuSnpProtocolGuid
|
2011-05-11 20:31:20 +02:00
|
|
|
gEfiSimpleFileSystemProtocolGuid
|
|
|
|
|
|
|
|
[Guids]
|
|
|
|
gEfiFileSystemVolumeLabelInfoIdGuid # SOMETIMES_CONSUMED
|
|
|
|
gEfiFileInfoGuid # SOMETIMES_CONSUMED
|
|
|
|
gEfiFileSystemInfoGuid # SOMETIMES_CONSUMED
|
|
|
|
|
|
|
|
[Pcd]
|
2011-06-28 18:47:23 +02:00
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuBootMode
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareVolume
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuMemorySize
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFdBaseAddress
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuApCount
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuVirtualDisk
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window"
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFileSystem
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuSerialPort
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuNetworkInterface
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdNetworkPacketFilterSize
|
2011-05-11 20:31:20 +02:00
|
|
|
|
2011-06-28 18:47:23 +02:00
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoveryBase
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashFvRecoverySize
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageVariableBase
|
2011-06-08 06:32:18 +02:00
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
2011-06-28 18:47:23 +02:00
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogBase
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageEventLogSize
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwWorkingBase
|
2011-06-08 06:32:18 +02:00
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
2011-06-28 18:47:23 +02:00
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwSpareBase
|
2011-06-08 06:32:18 +02:00
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
2011-06-28 18:47:23 +02:00
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdPeiServicesTablePage
|
2022-12-06 06:40:52 +01:00
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdPersistentMemorySize
|
2011-06-08 06:32:18 +02:00
|
|
|
|
2011-12-15 23:26:15 +01:00
|
|
|
[FeaturePcd]
|
|
|
|
gEmulatorPkgTokenSpaceGuid.PcdEmulatorLazyLoadSymbols
|
|
|
|
|
2011-05-11 20:31:20 +02:00
|
|
|
|
|
|
|
[BuildOptions]
|
2016-07-23 10:19:46 +02:00
|
|
|
GCC:*_*_IA32_DLINK_FLAGS == -o $(BIN_DIR)/Host -m32 -L/usr/X11R6/lib
|
2011-05-11 20:31:20 +02:00
|
|
|
GCC:*_*_IA32_CC_FLAGS == -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
|
|
|
GCC:*_*_IA32_PP_FLAGS == -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
|
|
|
|
GCC:*_*_IA32_ASM_FLAGS == -m32 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
|
|
|
|
|
2016-07-23 10:19:46 +02:00
|
|
|
GCC:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib
|
2017-06-02 01:39:37 +02:00
|
|
|
GCC:*_GCC5_X64_DLINK_FLAGS == -flto -o $(BIN_DIR)/Host -m64 -L/usr/X11R6/lib
|
2011-05-11 20:31:20 +02:00
|
|
|
GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
2014-07-28 19:37:25 +02:00
|
|
|
GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
|
|
|
|
GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
|
2017-06-02 01:39:37 +02:00
|
|
|
GCC:*_GCC5_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os
|
2011-05-11 20:31:20 +02:00
|
|
|
GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
|
|
|
|
GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
|
|
|
|
|
2016-07-23 10:19:46 +02:00
|
|
|
GCC:*_*_*_DLINK2_FLAGS == -lpthread -ldl -lXext -lX11
|
2011-10-31 16:56:28 +01:00
|
|
|
|
2011-05-11 20:31:20 +02:00
|
|
|
#
|
|
|
|
# Need to do this link via gcc and not ld as the pathing to libraries changes from OS version to OS version
|
|
|
|
#
|
|
|
|
XCODE:*_*_IA32_DLINK_PATH == gcc
|
2019-08-02 02:55:26 +02:00
|
|
|
XCODE:*_*_IA32_CC_FLAGS = -I$(WORKSPACE)/EmulatorPkg/Unix/Host/X11IncludeHack
|
2011-06-29 07:13:33 +02:00
|
|
|
XCODE:*_*_IA32_DLINK_FLAGS == -arch i386 -o $(BIN_DIR)/Host -L/usr/X11R6/lib -lXext -lX11 -framework Carbon
|
2011-05-11 20:31:20 +02:00
|
|
|
XCODE:*_*_IA32_ASM_FLAGS == -arch i386 -g
|
|
|
|
|
|
|
|
XCODE:*_*_X64_DLINK_PATH == gcc
|
2019-08-15 18:48:57 +02:00
|
|
|
XCODE:*_*_X64_DLINK_FLAGS == -o $(BIN_DIR)/Host -L/usr/X11R6/lib -lXext -lX11 -framework Carbon -Wl,-no_pie
|
2011-05-11 20:31:20 +02:00
|
|
|
XCODE:*_*_X64_ASM_FLAGS == -g
|
2019-08-15 18:48:57 +02:00
|
|
|
XCODE:*_*_X64_CC_FLAGS = -O0 -target x86_64-apple-darwin -I$(WORKSPACE)/EmulatorPkg/Unix/Host/X11IncludeHack "-DEFIAPI=__attribute__((ms_abi))"
|