搜尋此網誌

顯示具有 EFI/UEFI開發工具 標籤的文章。 顯示所有文章
顯示具有 EFI/UEFI開發工具 標籤的文章。 顯示所有文章

2019年4月10日 星期三

Developer's UEFI Emulation (DUET) on Edk2 for Boot Disk

Developer's UEFI Emulation (DUET) on Edk2

From: https://github.com/tianocore/edk2/raw/master/DuetPkg/ReadMe.txt

A. Build DUET image on Windows Platform
========================================
1. Tools preparation

  To build DUET image, Visual Studio is required:
  1). Base on below link to create Visual Studio build environment.
      https://github.com/tianocore/tianocore.github.io/wiki/Windows-systems

2. Build Duet Platform module

  1). run cmd.exe to open command line window.
  2). enter workspace root directory such as c:\edk2_tree
  3). set the environment variable EDK_TOOLS_BIN to point at the BaseTools binaries directory
      i.e., "set EDK_TOOLS_BIN=c:\edk2-BaseTools-win32"
  4). run "edksetup.bat"
  5). run "build -p DuetPkg\DuetPkgIa32.dsc -a IA32 -t VS2015x86" for IA32 architecture platform (using 64-bit VS2015 for example) or
          "build -p DuetPkg\DuetPkgX64.dsc -a X64 -t VS2015x86" for X64 architecture platform.

  NOTE: The post build script 'PostBuild.sh' will be automatically called after the build command.


Create bootable disk
======================

3. Create boot disk
  The following steps are same for IA32 architecture platform or X64 architecture platform.

3.1 Create floppy boot disk
  1). enter \DuetPkg directory.
  2). Insert a floppy disk to drive
  3). run "CreateBootDisk.bat floppy a: FAT12 IA32" if floppy drive is a: disk and Arch to boot is IA32.
      or
      run "CreateBootDisk.bat floppy a: FAT12 X64" if floppy drive is a: disk and Arch to boot is X64.
3.2 Create usb boot disk
  1). enter \DuetPkg directory.
  2). Plugin usb disk
  3). run "CreateBootDisk.bat usb e: FAT16 IA32" if usb drive is e: and FAT format is FAT16 and Arch to boot is IA32.
      or "CreateBootDisk.bat usb e: FAT16 X64" if usb drive is e: and FAT format is FAT16 and Arch to boot is X64.
      or "CreateBootDisk.bat usb e: FAT32 IA32" if usb drive is e: and FAT format is FAT32 and Arch to boot is IA32.
      or "CreateBootDisk.bat usb e: FAT32 X64" if usb drive is e: and FAT format is FAT32 and Arch to boot is X64.
  4). UnPlug usb disk and plugin it again.
  5). run "CreateBootDisk.bat usb e: FAT16 IA32 step2" if usb drive is e: and FAT format is FAT16 and Arch to boot is IA32.
      or "CreateBootDisk.bat usb e: FAT16 X64 step2" if usb drive is e: and FAT format is FAT16 and Arch to boot is X64.
      or "CreateBootDisk.bat usb e: FAT32 IA32 step2" if usb drive is e: and FAT format is FAT32 and Arch to boot is IA32.
      or "CreateBootDisk.bat usb e: FAT32 X64 step2" if usb drive is e: and FAT format is FAT32 and Arch to boot is X64.

B. Build DUET image on Linux Platform
======================================
1. Tools preparation

  To build DUET image, GCC installation (4.4+) is required:
  1). Base on below link to create GCC build environment.
      https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC

2. Build Duet Platform module

  1). Open the terminal.
  2). enter workspace root directory such as /edk2_tree
  3). run ". edksetup.sh BaseTools"
  4). run "build -p DuetPkg/DuetPkgIa32.dsc -a IA32 -t GCC49" for IA32 architecture platform (using GCC 4.9 for example) or
          "build -p DuetPkg/DuetPkgX64.dsc -a X64 -t GCC49" for X64 architecture platform.

  NOTE: The post build script 'PostBuild.sh' will be automatically called after the build command.
        After post build action, you should check the size of EfiLdr at $WORKSPACE/Build/DuetPkgIA32(DuetPkgX64)/DEBUG_GCC49 directory, it must less than 470k.
        If not, you should manually remove some unnecessary drivers at DuetPkg.fdf file.

3. Create bootable disk
   The following steps are same for IA32 architecture platform or X64 architecture platform.

3.1 Create floppy boot disk
  1). enter /edk2_tree/DuetPkg directory.
  2). Insert a floppy disk to drive
  3). run "CreateBootDisk.sh" to build floppy drive
      such as "./CreateBootDisk.sh floppy /media/floppy0 /dev/fd0 FAT12 IA32"

3.2 Create usb boot disk
  1). enter /edk2_tree/DuetPkg directory.
  2). Plugin usb disk
  3). run "CreateBootDisk.sh" to build usb drive
      such as "./CreateBootDisk.sh usb /media/usb0 /dev/sdb0 FAT16 IA32"
  4). UnPlug usb disk and plugin it again.
  5). run "./CreateBootDisk.sh usb /media/usb0 /dev/sdb0 FAT16 IA32 step2"

2017年12月18日 星期一

UDK2017 How to Build

From: https://github.com/tianocore/tianocore.github.io/wiki/UDK2017-How-to-Build

HOW TO BUILD (WINDOWS SYSTEM)
The steps below are verified on Microsoft Windows 10 Enterprise*:

1. Setup Build Environment
  • Install Microsoft Visual Studio 2015* in the build machine and make sure that AMD64 complier was selected when installing.
  • Download NASM 2.0.7 or later from http://www.nasm.us/ and install it to C:\Nasm. Make sure C:\Nasm is added to system environment variable 'PATH'
  • Set up for using GitHub for Windows. See: https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-with-EDK-II#github-help
  • Download and install Python2.7.x https://www.python.org/ for building the BaseTools Default install directory is: C:/Python27
2. Create the full Source Code directory for the UDK2017 release
(1). Create a working space directory in the build machine, for example, C:\MyWorkspace
(2). Download the official UDK2017 release .zip file from the UDK2017 Release Page
a. Download - UDK2017 edk-vUDK2017 Workspace Source code (zip file)
b. Extract files in [edk2-vUDK2017] to the working space directory C:\MyWorkspace.
(3). OR Checkout the vUDK2017 Tag from GitHub with the following "git" command run git clone https://github.com/tianocore/edk2.git vUDK2017 Move all files and folders under "vUDK2017" to "C:\MyWorkspace" Optional (See Compile the BaseTools below) Checkout BaseTools binaries and copy them to BaseTools binary folder. Warning the Windows* Binary tools are only valid for the tip of the https://github.com/tianocore/edk2 repository.
a. Cd C:\MyWorkspace
b. Run git clone https://github.com/tianocore/edk2-BaseTools-win32.git
c. Enter folder edk2-BaseTools-win32
d. Run the command git checkout 0e088c19ab31fccd1d2f55d9e4fe0314b57c0097
e. Cd C:\MyWorkSpace
f. Rename this folder from edk2-BaseTools-win32 to win32, then copy the win32 directory into the BaseTools/Bin directory under the workspace. (e.g. "C:\MyWorkspace\BaseTools\Bin")
3. Generate OpenSSL* Crypto Library
(1). Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt" and follow the instruction to install OpenSSL* for UEFI building. For this release, please use OpenSSL-1.1.0e.
4. Compile the BaseTools (Skip if Optional Step 2.iv was done above) See: https://github.com/tianocore/tianocore.github.io/wiki/Windows-systems#compile-tools
(1). Open a Microsoft Visual Studio* command prompt, type cd C:\MyWorkspace to enter the workspace directory
(2). Compile the BaseTools C source tools
set PYTHON_HOME=C:\Python27
        set EDK_TOOLS_PATH=%CD%\BaseTools
        BaseTools\toolssetup.bat Rebuild
5. Build Steps *** NT32 ***
(1). Open a Microsoft Visual Studio* command prompt, type cd C:\MyWorkspace to enter the workspace directory
(2). Use edksetup.bat command to initialize the working environment. edksetup --nt32
(3). Type following command to build Nt32 platform build -t VS2015x86
(4). Upon the build completing successfully there should be the UEFI Application "HelloWorld.efi" in the C:\MyWorkspace\Build\MdeModule\DEBUG_VS2015x86\IA32 directory

2016年1月18日 星期一

UDK2014 How to Build

UDK2014 - How to build instructions
Download the UDK2014 Release with expanded workspace directories DownLoad

UDK2014 Release Files / Directories

What is included in the Downloaded zip file
  • UDK2014.MyWorkSpace.zip
  • BaseTools(Windows).zip
  • BaseTools(Unix).tar
  • Documents
  • Notes

Windows System Configuration

Microsoft Windows 7 Ultimate 64-bit*
1. Setup Build Environment
  • 1) Install Microsoft Visual Studio 2008* SP1 in the build machine and make sure that AMD64 complier was selected when installing.
2. Extract Common Source Code
  • 1) Extract files in [UDK2014.MyWorkSpace.zip] to the working space directory (e.g C:). Note the Directory "MyWorkSpace" will be created as a result. In this case, it is C:\MyWorkspace.
  • 2) There are two BaseTools package one is for Windows system and another is for UNIX-Like system. Please make sure BaseTools(Windows).zip is used here. Expand the appropriate BaseTools to C:\MyWorkSpace
3. Generate OpenSSL* Crypto Library Note: this does not need to be done for Nt32
  • Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\Patch-HOWTO.txt" and follow the instruction to install OpenSSL* for UEFI building.

http://ftp.vim.org/security/openssl/

=====================================================================
                                OpenSSL-Version
=====================================================================
  Current supported OpenSSL version for UEFI Crypto Library is 1.0.2d.
    http://www.openssl.org/source/openssl-1.0.2d.tar.gz
=====================================================================
                      HOW to Install Openssl for UEFI Building
=====================================================================
1.  Download OpenSSL 1.0.2d from official website:
    http://www.openssl.org/source/openssl-1.0.2d.tar.gz

    NOTE: Some web browsers may rename the downloaded TAR file to openssl-1.0.2d.tar.tar.
          When you do the download, rename the "openssl-1.0.2d.tar.tar" to
          "openssl-1.0.2d.tar.gz" or rename the local downloaded file with ".tar.tar"
          extension to ".tar.gz".

2.  Extract TAR into CryptoPkg/Library/OpenSslLib/openssl-1.0.2d

    NOTE: If you use WinZip to unpack the openssl source in Windows, please
          uncheck the WinZip smart CR/LF conversion option (WINZIP: Options -->
          Configuration --> Miscellaneous --> "TAR file smart CR/LF conversion").

3.  Apply this patch: EDKII_openssl-1.0.2d.patch, and make installation

    For Windows Environment:
    ------------------------
    1) Make sure the patch utility has been installed in your machine.
       Install Cygwin or get the patch utility binary from
          http://gnuwin32.sourceforge.net/packages/patch.htm
    2) cd $(WORKSPACE)\CryptoPkg\Library\OpensslLib\openssl-1.0.2d
    3) patch -p0 -i ..\EDKII_openssl-1.0.2d.patch
    4) cd ..
    5) Install.cmd

    For Linux* Environment:
    -----------------------
    1) Make sure the patch utility has been installed in your machine.
       Patch utility is available from http://directory.fsf.org/project/patch/
    2) cd $(WORKSPACE)/CryptoPkg/Library/OpensslLib/openssl-1.0.2d
    3) patch -p0 -i ../EDKII_openssl-1.0.2d.patch
    4) cd ..
    5) ./Install.sh
=====================================================================

4. Build Steps *** NT32 ***
  • 1) Open a command prompt, type command "cd C:\MyWorkspace" to enter the workspace directory, and then type command
> edksetup --nt32
to initialize the working environment. See also: Windows_systems_ToolChain_Matrix for how to change the TOOL_CHAIN_TAG for supported compiler combinations.
  • 2) Type below commands to build platforms (below assumes Microsoft Visual Studio 2008)
> build -t VS2008x86
Note: There are two methods to select the tool chain (Use Microsoft Visual Studio 2008* as sample):
  • 1. Update TOOL_CHAIN_TAG in file Conf/target.txt: TOOL_CHAIN_TAG = VS2008
  • 2. Add -t build option in command line: "build -t VS2008 ... "
For 32-bit VS2008 on 64-bit WINDOWS OS, VS2008x86 should be selected instead of VS2008. Please refer to tools_def.txt for all supported tool chains and detailed descriptions. (tools_def.txt will be generated at Conf directory after running "edksetup".)
  • 3. Note Microsoft Visual Studio* 2010 is supported with -t VS2010 or -t VS2010x86


Unix-Like System Configuration

Ubuntu
DistributorID: Ubuntu*
Description: Ubuntu 10*
Release: Ubuntu 10.10*
Codename: Karmic*
1. Extract Common Source Code
  • 1) Create a working space directory in the build machine, for example, ~/src/
  • 2) Extract files in [UDK2014.MyWorkSpace.zip] the working space directory. In this case, it is ~/src/MyWorkSpace where /MyWorkSpace is created.
  • 3) There are two BaseTools packages, one is for Windows system and another is for UNIX-Like system. Please make sure BaseTools(Unix).tar is used here.
2. Generate OpenSSL* Crypto Library Note: This does not need to be done for Nt32 Open file "~/src/MyWorkspace/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt" and follow the instruction to install OpenSSL* for UEFI building.
3. See How to Set up Build environment Using EDK II with Native GCC for newer versions of Linux
  • a) Please note that here the root is "~/src/MyWorkSpace" instead of "~/src/edk2"
  • b) Make sure BaseTools is built and required software like iASL compiler is installed well.
  • c) Some operations need switch to user "root" to execute.
4. Build Steps *** Nt32 ***
  • 1) Open a terminal and type "cd ~/src/MyWorkSpace" to enter the workspace directory.
  • 2) Initialize the build environment by typing
>. edksetup.sh BaseTools
  • 3) Type below commands to build platforms
> build -t GCC44

2014年9月5日 星期五

如何編譯UDK2014(Unified Extensible Firmware Interface: UEFI)?

如何編譯UDK2014的程式碼?
下載UDK2014的程式碼(DownLoad)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
下載的壓縮檔案內容包含下列檔案:

  • UDK2014.MyWorkSpace.zip
  • BaseTools(Windows).zip
  • BaseTools(Unix).tar
  • Documents
  • Notes

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
使用Windows去編譯此程式碼

安裝Microsoft Windows 7 Ultimate 64-bit

1. 安裝編譯環境

1) 安裝Microsoft Visual Studio 2008* SP1編譯程式,且確定涵蓋AMD64的編譯。

2. 取出開放的程式碼

1) 取出檔案[UDK2014.MyWorkSpace.zip],並將它解壓縮後,重新命名成 "MyWorkSpace" ;並將它放置在C:\MyWorkspace。
2) 這裡有兩個基本程式工具包("BaseTools"),一個是Windows系統用,與另一個是類UNIX系統使用。這個範例是使用BaseTools(Windows).zip,解開將BaseTools目錄放置到C:\MyWorkSpace中。

3. 產生OpenSSL* 加密函式庫 注意:NT32並不需要做此步驟。

開啟"C:\MyWorkspace\CryptoPkg\Library\OpensslLib\Patch-HOWTO.txt"檔案,並按照指令去安裝OpenSSL* ,對於UEFI 的編譯。.
  • 每板原始碼可能搭配不一樣的OpenSSL,詳細請看Patch-HOWTO.txt。
  • 下載OpenSSL 0.9.8zb從官方網站:http://www.openssl.org/source/openssl-0.9.8zb.tar.gz
  • 將它解壓縮在路徑:$(WORKSPACE)\CryptoPkg\Library\OpensslLib
  • cd $(WORKSPACE)\CryptoPkg\Library\OpensslLib\openssl-0.9.8zb
  • patch -p0 -i ..\EDKII_openssl-0.9.8zb.patch
  • cd ..
  • Install.cmd
4. 編譯*** NT32 ***

1) 開啟指令視窗(command prompt),輸入指令"cd C:\MyWorkspace"進入程式目錄,然後輸入命令:
〉 edksetup --nt32

初始化工作環境,設定工具路徑:
〉 set EDK_TOOLS_PATH=C:\MyWorkspace\BaseTools

2) 輸入下面指令去編譯程式(下面以Microsoft Visual Studio 2008為範例)
在Win7 64bit上,使用指令:
〉 build -t VS2008x86
在Win7 32bit上,使用指令:
〉 build -t VS2008


注意:這裡有兩個 方法去選擇工具程式 (使用Microsoft Visual Studio 2008*為此編譯程式範例):

1. 更新TOOL_CHAIN_TAG在檔案Conf/target.txt中:TOOL_CHAIN_TAG = VS2008x86
2. 加入-t 編譯項目在命令列:"build -t VS2008x86 ... "
對於32-bit VS2008 在64-bit的WINDOWS OS上,VS2008x86應該取代VS2008參數。請參考tools_def.txt關於所有的工具程式與詳細的描述。(tools_def.txt將被產生在Conf目錄,在執行"edksetup"之後。)
3. 注意若想要使用Microsoft Visual Studio* 2010請使用-t VS2010或-t VS2010x86。

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DUET程式編譯
在Win7 64bit上,使用指令:
[編譯64-bit Image]
〉 build -t VS2008x86 -a X64 -p DuetPkg\DuetPkgx64.dsc

[清除obj檔案]
〉 build -t VS2008x86 -a X64 -p DuetPkg\DuetPkgx64.dsc clean

[Enable Debugging Messages]
〉 build -t VS2008x86 -a X64 -p DuetPkg\DuetPkgx64.dsc -D SOURCE_DEBUG_ENABLE

[編譯32-bit Image]
〉 build -t VS2008x86 -a IA32 -p DuetPkg\DuetPkgIa32.dsc

[清除obj檔案]
〉 build -t VS2008x86 -a IA32 -p DuetPkg\DuetPkgIa32.dsc clean

[Enable Debugging Messages]
〉 build -t VS2008x86 -a IA32 -p DuetPkg\DuetPkgIa32.dsc -D SOURCE_DEBUG_ENABLE

在Win7 32bit上,使用指令:
[編譯64-bit Image]
〉 build -t VS2008 -a X64 -p DuetPkg\DuetPkgx64.dsc

[清除obj檔案]
〉 build -t VS2008 -a X64 -p DuetPkg\DuetPkgx64.dsc clean

[Enable Debugging Messages]
〉 build -t VS2008 -a X64 -p DuetPkg\DuetPkgx64.dsc -D SOURCE_DEBUG_ENABLE

[編譯32-bit Image]
〉 build -t VS2008 -a IA32 -p DuetPkg\DuetPkgIa32.dsc

[清除obj檔案]
〉 build -t VS2008 -a IA32 -p DuetPkg\DuetPkgIa32.dsc clean

[Enable Debugging Messages]
〉 build -t VS2008 -a IA32 -p DuetPkg\DuetPkgIa32.dsc -D SOURCE_DEBUG_ENABLE

=======================================================================
* Capturing OVMF debug messages on qemu: 
 - The default OVMF build writes debug messages to IO port 0x402. The following qemu command line options save them in the file called debug.log: '-debugcon file:debug.log -global isa-debugcon.iobase=0x402'. 
 - It is possible to revert to the original behavior, when debug messages were written to the emulated serial port (potentially intermixing OVMF debug output with UEFI serial console output). For this the '-D DEBUG_ON_SERIAL_PORT' option has to be passed to the build command (see the next section), and in order to capture the serial output qemu needs to be started with eg. '-serial file:serial.log'. 
 - Debug messages fall into several categories. Logged vs. suppressed categories are controlled at OVMF build time by the 'gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel' bitmask (an UINT32 value) in the selected .dsc file. Individual bits of this bitmask are defined in . One non-default bit (with some performance impact) that is frequently set for debugging is 0x00400000 (DEBUG_VERBOSE). 
 - The RELEASE build target ('-b RELEASE' build option, see below) disables all debug messages. The default build target is DEBUG.

http://sourceforge.net/p/tianocore/edk2-OvmfPkg/ci/svn/branches/UDK2014/~/tree/

Why do we still get debug print messages output to the serial port after changing the Conf\target.txt for “TARGET = RELEASE”? Shouldn’t this be turned off on a release build?

A) There are different levels of debug to be considered. In EDK 1 there was a mix of levels of debug, DEBUG on and off was a combination of source level debug and debug print messages. EDK II has separated those concepts. The flag in the target.txt file “TARGET = RELEASE” only turns off the source level debug in the output files .pdb. The .pdb file points to the source code on your host machine which is part of the PE/off image and is part of the final Flash image. This makes it possible to do source level debug.
B) Another debug concept with EDK II is the DEBUG and ASSERT macros that print messages to the console and serial port. These are controlled through the EDK II PCDs in the MdePkg:
PcdDebugPropertyMask (bit mask to determine turning on/off for various macro features )
PcdDebugPrintErrorLevel (bit map for various types of messages)

C) A third concept for using source level debugging with WinDBG uses build option: “-D SOURCE_DEBUG_ENABLE” – builds debug agent into your firmware. Check example in LakeportX64Pkg.dsc “ifdef”

http://tianocore.sourceforge.net/wiki/Debug_FAQ
========================================================================
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Shell程式編譯
在Win7 64bit上,使用指令:
[編譯64-bit Image]
〉 build -t VS2008x86 -a X64 -p ShellPkg\ShellPkg.dsc

[編譯32-bit Image]
〉 build -t VS2008x86 -a IA32 -p ShellPkg\ShellPkg.dsc

在Win7 32bit上,使用指令:
[編譯64-bit Image]
〉 build -t VS2008 -a X64 -p ShellPkg\ShellPkg.dsc

[編譯32-bit Image]
〉 build -t VS2008 -a IA32 -p ShellPkg\ShellPkg.dsc

From: http://tianocore.sourceforge.net/wiki/UDK2014_How-to-Build

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
製作DUET USB開機磁碟

  1. 如果複製檔案過程會失敗,請下載HP Usb Disk storage format tool去格式化USB Disk首先。
  2. 使用Administrator權限。
  3. 設定TOOL_CHAIN_TAG環境變數,在檔案Conf/target.txt中:(64-bit OS) TOOL_CHAIN_TAG = VS2008x86,(32-bit OS)TOOL_CHAIN_TAG = VS2008。 執行edksetup.bat環境設定檔。
  4. 編譯duet package
    1. 〉build -a IA32 -p DuetPkg\DuetPkgIa32.dsc
      or
      〉build -a X64 -p DuetPkg\DuetPkgX64.dsc

  5. 產生出的檔案會被放置在DuetPkg
  6. 〉cd DuetPkg
              〉PostBuild.bat IA32
      or
      〉PostBuild.bat X64

  7. 置入USB DISK,假如USB DISK是G:,在執行程式後,USB DISK將會被寫入新的MBR。
  8. 〉createbootdisk usb G: FAT32 X64 
              or
           
      〉createbootdisk usb G: FAT16 X64

      32bit OS
      〉createbootdisk usb G: FAT32 IA32
      or 
      〉createbootdisk usb G: FAT16 IA32

  9. 移除並重新置入此USB DISK,複製UEFI的檔案到USB DISK。
    〉createbootdisk usb G: FAT32 X64 step2
              or
           
      〉createbootdisk usb G: FAT16 X64 step2

      32bit OS
      〉createbootdisk usb G: FAT32 IA32 step2
      or 
      〉createbootdisk usb G: FAT16 IA32 step2
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

2013年11月20日 星期三

在Mac Pro上,如何安裝rEFIt Shell環境?

===================================================================
How to Install rEFIt Shell Environment in Mac?
===================================================================
rEFIt是一個開機選單,還有它也式EFI-based機器的維護工具,像是Intel Mac Pro 。它提供了一個簡單的方法來進入和探索的EFI預先開機環境。

1. 在Mac OSX中,連上此連結http://refit.sourceforge.net/ ,使用你所熟悉的瀏覽器。

2. 下載rEFIt 0.13(版本可能會有所不同) (Mac的磁碟影像). (如果你遭遇任何問題,請參閱線上文件檔案。) 在下載成功後,系統將自動安裝的磁碟影像。

3. 在Finder中,雙擊“rEFIt.mpkg”來安裝rEFIt。

4. 關閉系統電源(建議),等過幾秒後再開啟系統電源,此時按住[option] 按鍵直到rEFIt圖示出現。

5. 點擊rEFIt圖示與使用鍵盤去選擇[Start EFI Shell]。現在你已經在rEFIt環境中。

6. 輸入"drivers"指令來測試,此指令會列出所有EFI當前的驅動程式。試試看吧!!

2012年8月23日 星期四

EFI/UEFI development tools - VfrCompile(UEFI VFR編譯的公用程式)

VfrCompile v1.1 - UEFI VFR Compiler Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  VfrCompile [OPTION] VFRFILE
Description:
  Compile VFRFILE.
Options:
  -? or -h        print this help
  -l              create an output IFR listing file
  -i IncPath      add IncPath to the search path for VFR included files
  -od OutputDir   deposit all output files to directory OutputDir (default=cwd)
  -ibin           create an IFR HII pack file
  -ppflag CFlags  pass Flags as C-preprocessor-flag
  -v or -version  print version information

EFI/UEFI development tools - Strip(拆卸的公用程式)

Strip v1.0 - Strip Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  Strip SOURCE DEST
Description:
  Convert executable files to binary files.

EFI/UEFI development tools - StrGather(UEFI字串採集的公用程式)

StrGather v1.2 - UEFI String Gather Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  StrGather -parse [OPTION] FILE
  StrGather -scan  [OPTION] FILE
  StrGather -dump  [OPTION]
Description:
  Process unicode strings file.
Common options include:
  -h or -?         for this help information
  -db Database     required name of output/input database file
  -bn BaseName     for use in the .h and .c output files Default = BaseName
  -v               for verbose output
  -vdbw            for verbose output when writing database
  -vdbr            for verbose output when reading database
  -od FileName     to specify an output database file name
Parse options include:
  -i IncludePath   add IncludePath to list of search paths
  -dep FileName    to specify an output dependency file name
  -newdb           to not read in existing database file
  -uqs             to indicate that unquoted strings are used
  FileNames        name of one or more unicode files to parse
Scan options include:
  -scan            scan text file(s) for STRING_TOKEN() usage
  -skipext .ext    to skip scan of files with .ext filename extension
  -ppflag "Flags"  to specify the C preprocessor flags
  -oh FileName     to specify string defines file name for preprocessor
  -ignorenotfound  ignore if a given STRING_TOKEN(STR) is not found in the database
  FileNames        one or more files to scan
Dump options include:
  -oc FileName     write string data to FileName
  -oh FileName     write string defines to FileName
  -ou FileName     dump database to unicode file FileName
  -lang Lang       only dump for the language 'Lang' use ';' to separate multiple languages
  -if FileName     to specify an indirection file
  -hpk FileName    to create an HII export pack of the strings

The expected process is to parse a unicode string file to create an initial database of string identifier names and string definitions. Then text files should be scanned for STRING_TOKEN() usages, and the referenced
strings will be tagged as used in the database. After all files have been scanned, then the database should be dumped to create the necessary output files.

EFI/UEFI development tools - SplitFile(劃分檔案的公用程式)

SplitFile v1.0 - Split File Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  SplitFile FILE OFFSET
Description:
  Break the FILE in two pieces FILE1 and FILE2 at the requested OFFSET.

EFI/UEFI development tools - SetStamp(設定時間戳記的公用程式)

SetStamp v1.0 - Set Time Stamp Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  SetStamp PEFILE TIMEFILE
Description:
  Set Date/Time Stamp of Portable Executable (PE) format file

EFI/UEFI development tools - ProcessDsc(處理DSC檔案的公用程式)

ProcessDsc v1.0 - Process DSC File Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  ProcessDsc [OPTION]... DSCFILE
Options:
  -d var=value        to define symbol 'var' to 'value'
  -v                  for verbose mode
  -g filename         to preparse GUID listing file
  -x filename         to create a cross-reference file
  -n threadnumber     to build with multi-thread
  -t target           to build the specified target: all, libraries or components

EFI/UEFI development tools - ModifyInf(修改INF檔案的公用程式)

ModifyInf v1.0 - Modify INF File Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  ModifyInf SOURCE DEST [PATTERN]

EFI/UEFI development tools - MakeDeps(建立附屬物的公用程式)

MakeDeps v1.0 - Make Dependencies Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  MakeDeps [OPTION]...
Options:
  -h or -?         for this help information
  -f SourceFile    add SourceFile to list of files to scan
  -i IncludePath   add IncludePath to list of search paths
  -o OutputFile    write output dependencies to OutputFile
  -s SubDir        for each IncludePath, also search IncludePath\SubDir
  -v               for verbose output
  -ignorenotfound  don't warn for files not found
  -target Target   for single SourceFile, target is Target, not SourceFile.obj
  -q               quiet mode to not report files not found if ignored
  -sub sym str     replace all occurrances of 'str' with 'sym' in the output
  -nosystem        not process system files
  -neverfail       always return a success return code
  -usesumdeps path use summary dependency files in 'path' directory.
  -asm             The SourceFiles are assembler files
  -cl              The SourceFiles are the output of cl with /showIncludes

2012年8月22日 星期三

EFI/UEFI development tools - HiiPack(UEFI HII包裝清單的公用程式)

HiiPack v1.0 - UEFI HII Package List Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  HiiPack [OPTION] PACKAGE [PACKAGE [...]]
Description:
  Merge HII package files into a single HII Package List.
Options:
  -rc  FileName               write output to PE/COFF Resource Script file
  -hii FileName               write output to binary Package List file
  -g   GUID                   use GUID for the HII Package List Guid

PACKAGE is the raw binary HII package file generated by StrGather or VfrCompiler which named as *.hpk. For example, merge a Form package and a String package into one HII package list:
  "HiiPack -rc Sample.rc -hii Sample.hii \
           -g 12345678-1234-1234-1234-123456789abc Vfr.hpk Strings.hpk"

EFI/UEFI development tools - GuidChk(檢查GUID的公用程式)

GuidChk v1.0 - GUID Check Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  GuidChk [OPTION]...
Description:
  Scan files for duplicate GUID or signature definitions.
Options:
  -d dirname     exclude searching of a directory
  -f filename    exclude searching of a file
  -e extension   exclude searching of files by extension
  -p             print all GUIDS found
  -g             check for duplicate guids
  -s             check for duplicate signatures
  -x             print guid+defined symbol name
  -b outfile     write internal GUID+basename list to outfile
  -u dirname     exclude searching all subdirectories of a directory
  -h -?          print this help text
Example Usage:
  GuidChk -g -u build -d fv -f make.inf -e .pkg

EFI/UEFI development tools - GenTEImage(產生TE影像的公用程式)

GenTEImage v1.0 - Generate TE Image Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  GenTEImage [OPTION]... PE32IMAGE
Description:
  Generate a TE image from an EFI PE32 image.
Options:
  -v             - for verbose output
  -dump          - to dump the input file to a text file
  -h -?          - for this help information
  -o OutFileName - to write output to OutFileName rather than PE32IMAGE.te

EFI/UEFI development tools - GenSection(產生部分(節)的公用程式)

GenSection v1.0 - Generate Section Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  GenSection [OPTION]
Common Options:
  -i InputFile    Specifies the input file
  -o OutputFile   Specifies the output file
  -s SectionType  Specifies the type of the section, which can be one of
                  EFI_SECTION_COMPRESSION
                  EFI_SECTION_GUID_DEFINED
                  EFI_SECTION_PE32
                  EFI_SECTION_PIC
                  EFI_SECTION_TE
                  EFI_SECTION_DXE_DEPEX
                  EFI_SECTION_VERSION
                  EFI_SECTION_USER_INTERFACE
                  EFI_SECTION_COMPATIBILITY16
                  EFI_SECTION_FIRMWARE_VOLUME_IMAGE
                  EFI_SECTION_FREEFORM_SUBTYPE_GUID
                  EFI_SECTION_RAW
                  EFI_SECTION_PEI_DEPEX
Section dependent options:
  EFI_SECTION_COMPRESSION:       -t < NONE | STANDARD >
  EFI_SECTION_GUID_DEFINED:      -t < CRC32 >  // Only CRC32 is supported
  EFI_SECTION_VERSION:           -v VersionNumber [-a "Version string"]
  EFI_SECTION_USER_INTERFACE:    -a "Human readable name"

EFI/UEFI development tools - GenPage(產生分頁表的公用程式)

GenPage v1.0 - Generate Page Table Utility
  Built from Edk1.06, project of TianoCore.org

Usage:
  GenPage SOURCE DEST [BASEADDRESS OFFSET]
Description:
  Generate a 4G page table (2M pages) in DUET x64 build for LongMode switching. The tool put the page table in the OFFSET of SOURCE and write the whole to DEST. The page table is to be put at BASEADDRESS in runtime.