audk/UnixPkg
li-elvin 13f06a56bf Fix the issue that the high 16-bit of EAX may contain invalid data, which cause bad stack pointer, the change will ensure the high 16-bit of EAX is cleared.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11048 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-12 07:48:32 +00:00
..
BootModePei Update the copyright notice format 2010-04-28 12:31:45 +00:00
CpuRuntimeDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
FvbServicesRuntimeDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
Include UnixPkg: Added missing EFIAPI for many Gasket functions 2010-10-13 07:06:28 +00:00
Library Fix the issue that the high 16-bit of EAX may contain invalid data, which cause bad stack pointer, the change will ensure the high 16-bit of EAX is cleared. 2010-11-12 07:48:32 +00:00
MetronomeDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
MiscSubClassPlatformDxe UnixPkg MiscSubClassPlatformDxe: Add en-US langdef to *.uni 2010-10-13 23:02:02 +00:00
RealTimeClockRuntimeDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
ResetRuntimeDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
Sec UnixPkg SEC: Fix link flags for using GCC on Linux x86-64 2010-10-13 07:06:53 +00:00
TimerDxe UnixPkg: Added missing EFIAPI for many Gasket functions 2010-10-13 07:06:28 +00:00
UnixAutoScanPei Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixBlockIoDxe Fix 64-bit compile bug 2010-07-14 22:51:06 +00:00
UnixBusDriverDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixConsoleDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixFirmwareVolumePei Port UnixPkg to also support X64. Currently only supports Unix x86_64 ABI. In the future we can make Sec support x86_64 ABI and the rest of the code support X64 EFI ABI. This will require assembly gaskets to fix the calling convention differences. I currently have noop gaskets in place for x86_64 ABI. This has only been tested on OS X 10.6. 2010-07-22 21:21:38 +00:00
UnixFlashMapPei Fix bad NT 32 reference in print to be UnixPkg. 2010-10-12 22:04:07 +00:00
UnixSerialIoDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixSimpleFileSystemDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixThunkDxe Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixThunkPpiToProtocolPei Update the copyright notice format 2010-04-28 12:31:45 +00:00
UnixUgaDxe Added support for an EFI X64 ABI compatible UnixPkg. With an internal only compiler I've been able to run checked in X64 EFI shell binary! We are hoping to get the open source LLVM compiler working for this... Since the SEC has to be UNIX ABI to make the POSIX calls it is compiled using a different compiler and the rest of the UnixPkg is compiled with UNIXPKG tool. You just need to point UNIXPKG at your EFI X64 ABI compiler of choice, it should work like MYTOOLS. Some one may want to port this to Linux at some point. To build cd into UnixPkg and ./build64.sh 2010-08-18 20:24:08 +00:00
Xcode Update to support Xcode 64-bit debug. 2010-10-15 17:37: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 Port UnixPkg to also support X64. Currently only supports Unix x86_64 ABI. In the future we can make Sec support x86_64 ABI and the rest of the code support X64 EFI ABI. This will require assembly gaskets to fix the calling convention differences. I currently have noop gaskets in place for x86_64 ABI. This has only been tested on OS X 10.6. 2010-07-22 21:21:38 +00:00
UnixPkg.dsc Finish spliting SecDispatchTableLib into two functions so it can be a BaseLib 2010-09-20 21:04:07 +00:00
UnixPkg.fdf Port UnixPkg to also support X64. Currently only supports Unix x86_64 ABI. In the future we can make Sec support x86_64 ABI and the rest of the code support X64 EFI ABI. This will require assembly gaskets to fix the calling convention differences. I currently have noop gaskets in place for x86_64 ABI. This has only been tested on OS X 10.6. 2010-07-22 21:21:38 +00:00
UnixPkgX64.dsc Added SecDispatchTable library to allow custom PPIs to be passed up to into PEI Core. This will allow platform specific libraries to do thinks like map hardware devices directly into the emulator. 2010-09-16 20:23:33 +00:00
UnixPkgX64.fdf Added support for an EFI X64 ABI compatible UnixPkg. With an internal only compiler I've been able to run checked in X64 EFI shell binary! We are hoping to get the open source LLVM compiler working for this... Since the SEC has to be UNIX ABI to make the POSIX calls it is compiled using a different compiler and the rest of the UnixPkg is compiled with UNIXPKG tool. You just need to point UNIXPKG at your EFI X64 ABI compiler of choice, it should work like MYTOOLS. Some one may want to port this to Linux at some point. To build cd into UnixPkg and ./build64.sh 2010-08-18 20:24:08 +00:00
build.sh UnixPkg: Allow build.sh/build64.sh to be run from the edk2 root 2010-10-13 23:02:14 +00:00
build64.sh Update to support Xcode 64-bit debug. 2010-10-15 17:37: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.