]> git.proxmox.com Git - mirror_edk2.git/blame - UnixPkg/readme.txt
UnixPkg: Mark as deprecated (replaced by EmulatorPkg)
[mirror_edk2.git] / UnixPkg / readme.txt
CommitLineData
e2a013fa 1Deprecation Notice
2==================
3UnixPkg is deprecated. Please see UnixPkg/Deprecated.txt for more information.
4
020f7cf4 5Unix Simulation Platform
6========================
7
8UnixPkg is one of platform package which can be built to a platform's firmware from UnixPkg.dsc file.
9And this package provide a simulation platform under *INUX environment in IA32 architecture.
10
11- Same points between real platform and simulation platform:
12 1) Unix simulation platform also run with firmware device image built from UnixPkg
13 2) The working flow of simulation platform also contains SEC/PEI/DXE phase.
14
15- Different points between real platform and simulation platform:
16 1) The SEC phase in simulation platform in fact is a *INUX native application which can be run from *INUX shell;
17 2) The device in simulation platform is not real hardware but simulation component in API level;
18 3) The ThunkBus driver in simulation platform will get virtual device's desription from PCD and create virtual Device
19
20Build
21=====
22UnixPkg is built with following command:
23 build -p UnixPkg/UnixPkg.dsc -a IA32 -t ELFGCC
24 Notes: ELFGCC is defined in <Workspace>/Conf/tools_def.txt file. This tool chain use native gcc/binutil instead of
25 cross-compiler like UNIXGCC tool chain.
26
7ee3b613
A
27On Mac OS X you can cd into UnixPkg directory and execute ./build.sh to build. This does not require
28setting up the environment like running the build command. Note Snow Leopard or later is required.
29This script should also work for any *INUX, but has not been tested.
30
31./build.sh run will lanuch the emulator in gdb so you can source level debug via gdb.
32
33
34Notes:
35=====
36On Mac OS X Snow Leopard you can use Xcode 3.2 as a GUI debugger.
37Launch Xcode and open UnixPkg/Xcode/xcode_project/xcode_project.xcodeproj
38Under the build menu chose build and debug. shift-cmd-B shows the build results.
39
40Under most *INUX the EFI executables are placed in the emulated EFI memory by the EFI PE/COFF loader
41but dlopen() is used to also load the image into the process to support source level debug.
42The entry point for the image is moved from the EFI emulator memory into the dlopen() image. This
43is not the case for Mac OS X. On Mac OS X a debugger script is used and the real EFI images in
44the emulator are the ones being debugged.
45
46Also on Mac OS X the stack alignment requirements for IA-32 are 16 bytes and this is more strict
47than the EFI ABI. To work around this gasket code was introduced to ensure the stack is always
4816 byte aligned when making any POSIX call on Mac OS X.
49
50To build PE/COFF images with Xcode 3.2 and extra tool call mtoc is required to convert Mach-O
51images into PE/COFF images. The tool only supports EFI PE/COFF images and the instructions on
52how to download it are on the edk2 website.
020f7cf4 53
54FAQ
55===
561, I fail to build UnixPkg due to "X11/extensions/XShm.h: No such file or directory"?
57 The display adapter in UnixPkg is a virtual device written in X11 API. The library of x11proto-xext-dev is required
58 for building.
59
602, I fail to build UnixPkg due to "/usr/bin/ld: cannot find -lXext"?
61 libxext-dev library is required for building.
62