audk/UnixPkg
AJFISH 5af06fe3d0 Fix for the Linux Build. #ifdef __APPLE__ around the files only needed to work around Mac OS X 16 byte IA-32 calling conventions issue. All the calls to this code is #ifdef __APPLE__, so no reason to build it on Linux or other gcc flavors.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9543 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-08 06:14:12 +00:00
..
BootModePei Fix entry point prototype. 2008-12-03 06:15:10 +00:00
CpuRuntimeDxe Update UnixPkg emulation platform to produce dummy CPU I/O 2 Protocol. 2009-12-07 07:10:49 +00:00
FvbServicesRuntimeDxe Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
Include Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
Library Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
MetronomeDxe remove all obsolete msa files from UnixPkg 2008-08-26 09:22:15 +00:00
MiscSubClassPlatformDxe 1. PI SMBIOS Checkin. Major change include: 2009-11-20 04:02:34 +00:00
RealTimeClockRuntimeDxe Integrate patch from Andrew Fish to make it run on OS X. 2009-08-25 07:29:13 +00:00
ResetRuntimeDxe Integrate patch from Andrew Fish to make it run on OS X. 2009-08-25 07:29:13 +00:00
Sec Fix for the Linux Build. #ifdef __APPLE__ around the files only needed to work around Mac OS X 16 byte IA-32 calling conventions issue. All the calls to this code is #ifdef __APPLE__, so no reason to build it on Linux or other gcc flavors. 2009-12-08 06:14:12 +00:00
TimerDxe Integrate patch from Andrew Fish to make it run on OS X. 2009-08-25 07:29:13 +00:00
UnixAutoScanPei Remove BaseMemoryTest PPI and related producers and consumers. 2009-02-23 02:39:20 +00:00
UnixBlockIoDxe Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
UnixBusDriverDxe Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
UnixConsoleDxe Integrate patch from Andrew Fish to make it run on OS X. 2009-08-25 07:29:13 +00:00
UnixFirmwareVolumePei Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
UnixFlashMapPei Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
UnixSerialIoDxe 1. updated "the Bus Driver that creates all of its child handles on the first call to Start()" not to create any child handle if RemainingDeviepath is the End of Device Path Node, per UEFI 2.3. 2009-09-16 03:05:46 +00:00
UnixSimpleFileSystemDxe Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
UnixThunkDxe Integrate patch from Andrew Fish to make it run on OS X. 2009-08-25 07:29:13 +00:00
UnixThunkPpiToProtocolPei Fix entry point prototype. 2008-12-03 06:20:14 +00:00
UnixUgaDxe Clean up to update the reference of the these macros: 2008-12-16 15:32:09 +00:00
Xcode/xcode_project Fix the UnixPkg default to have the tools come from a seperate BaseTools project. When the fixes are checked into edk2 we can move it back to pointing to tools in edk2. 2009-12-08 01:55:00 +00:00
.gdbinit Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
UnixPkg.dec Remove extra GUID that is not used 2009-07-03 20:15:15 +00:00
UnixPkg.dsc Add DxeSecurityManagementLib instance 2009-11-26 01:33:07 +00:00
UnixPkg.fdf Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00
build.sh Fix the UnixPkg default to have the tools come from a seperate BaseTools project. When the fixes are checked into edk2 we can move it back to pointing to tools in edk2. 2009-12-08 01:55:00 +00:00
readme.txt Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard. 2009-12-06 02:00:37 +00:00

readme.txt

Unix Simulation Platform
========================

UnixPkg is one of platform package which can be built to a platform's firmware from UnixPkg.dsc file.
And this package provide a simulation platform under *INUX environment in IA32 architecture.

- Same points between real platform and simulation platform:
  1) Unix simulation platform also run with firmware device image built from UnixPkg
  2) The working flow of simulation platform also contains SEC/PEI/DXE phase.

- Different points between real platform and simulation platform:
  1) The SEC phase in simulation platform in fact is a *INUX native application which can be run from *INUX shell;
  2) The device in simulation platform is not real hardware but simulation component in API level;
  3) The ThunkBus driver in simulation platform will get virtual device's desription from PCD and create virtual Device

Build
=====
UnixPkg is built with following command:
  build -p UnixPkg/UnixPkg.dsc -a IA32 -t ELFGCC
  Notes: ELFGCC is defined in <Workspace>/Conf/tools_def.txt file. This tool chain use native gcc/binutil instead of 
         cross-compiler like UNIXGCC tool chain.

On Mac OS X you can cd into UnixPkg directory and execute ./build.sh to build. This does not require
setting up the environment like running the build command. Note Snow Leopard or later is required. 
This script should also work for any *INUX, but has not been tested. 

./build.sh run will lanuch the emulator in gdb so you can source level debug via gdb. 


Notes:
=====
On Mac OS X Snow Leopard you can use Xcode 3.2 as a GUI debugger. 
Launch Xcode and open UnixPkg/Xcode/xcode_project/xcode_project.xcodeproj
Under the build menu chose build and debug. shift-cmd-B shows the build results.

Under most *INUX the EFI executables are placed in the emulated EFI memory by the EFI PE/COFF loader
but dlopen() is used to also load the image into the process to support source level debug. 
The entry point for the image is moved from the EFI emulator memory into the dlopen() image. This
is not the case for Mac OS X. On Mac OS X a debugger script is used and the real EFI images in
the emulator are the ones being debugged. 

Also on Mac OS X the stack alignment requirements for IA-32 are 16 bytes and this is more strict
than the EFI ABI. To work around this gasket code was introduced to ensure the stack is always
16 byte aligned when making any POSIX call on Mac OS X. 

To build PE/COFF images with Xcode 3.2 and extra tool call mtoc is required to convert Mach-O 
images into PE/COFF images. The tool only supports EFI PE/COFF images and the instructions on 
how to download it are on the edk2 website.

FAQ
===
1, I fail to build UnixPkg due to "X11/extensions/XShm.h: No such file or directory"?
   The display adapter in UnixPkg is a virtual device written in X11 API. The library of x11proto-xext-dev is required
   for building.

2, I fail to build UnixPkg due to "/usr/bin/ld: cannot find -lXext"?   
   libxext-dev library is required for building.