audk/UnixPkg
jljusten e2a013fa40 UnixPkg: Mark as deprecated (replaced by EmulatorPkg)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13784 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-05 07:05:54 +00:00
..
BootModePei
CpuRuntimeDxe According to PI errata 0000654 and 000811, we need use 0xFFFE to instead of 0 for EFI_SMBIOS_PROTOCOL.Add() SmbiosHandle parameter to assign a unique handle to the SMBIOS record, and for EFI_SMBIOS_PROTOCOL.GetNext() SmbiosHandle parameter to get the first matched SMBIOS handle or indicate no more SMBIOS record. 2011-11-21 08:59:54 +00:00
FvbServicesRuntimeDxe Add Missing invocations to VA_END() for VA_START(). 2012-02-01 06:06:08 +00:00
Include UnixPkg: Fix build for Linux 2011-03-05 08:08:47 +00:00
Library Update UnixPkg to use IA32_SEGMENT_DESCRIPTOR defined in BaseLib.h 2011-09-05 09:52:23 +00:00
MetronomeDxe
MiscSubClassPlatformDxe Fixed build failed. 2012-05-31 08:35:48 +00:00
RealTimeClockRuntimeDxe
ResetRuntimeDxe
Sec UnixPkg/Sec: Fixed build 2012-07-26 09:16:01 +00:00
TimerDxe
UnixAutoScanPei
UnixBlockIoDxe
UnixBusDriverDxe
UnixConsoleDxe
UnixFirmwareVolumePei
UnixFlashMapPei
UnixGopDxe Change the type of NotifyHandle from EFI_HANDLE to VOID * for SimpleTextInEx protocol. 2012-07-30 03:50:42 +00:00
UnixSerialIoDxe
UnixSimpleFileSystemDxe Correct the code to use SIZE_OF_EFI_FILE_INFO instead of sizeof (EFI_FILE_INFO) to fix a bug when creating a file/directory with single char as file name in root directory. 2011-11-17 01:56:30 +00:00
UnixSnpDxe Refine file header format to follow coding style. 2011-12-16 05:49:36 +00:00
UnixThunkDxe
UnixThunkPpiToProtocolPei
UnixUgaDxe
Xcode
.gdbinit
Contributions.txt EDK II Packages: Add Contributions.txt and License.txt files 2012-04-11 23:19:46 +00:00
Deprecated.txt UnixPkg: Mark as deprecated (replaced by EmulatorPkg) 2012-10-05 07:05:54 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
UnixPkg.dec Clean up invalid keywords and missing keywords in [Define] section of INF/DEC files. 2011-06-28 02:24:46 +00:00
UnixPkg.dsc Updated platform DSC files to add CPU Exception Library instances. 2012-03-16 08:36:39 +00:00
UnixPkg.fdf 1. solve build time issue that FV size is exceed due to more modules is included. 2011-03-31 09:18:14 +00:00
UnixPkgX64.dsc Updated platform DSC files to add CPU Exception Library instances. 2012-03-15 05:54:00 +00:00
UnixPkgX64.fdf UnixPkg: Fix build for Linux 2011-03-05 08:08:47 +00:00
build.sh UnixPkg: Mark as deprecated (replaced by EmulatorPkg) 2012-10-05 07:05:54 +00:00
build64.sh UnixPkg: Mark as deprecated (replaced by EmulatorPkg) 2012-10-05 07:05:54 +00:00
readme.txt UnixPkg: Mark as deprecated (replaced by EmulatorPkg) 2012-10-05 07:05:54 +00:00

readme.txt

Deprecation Notice
==================
UnixPkg is deprecated. Please see UnixPkg/Deprecated.txt for more information.

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.