這個Python Build tool是EDKII/EDK2 的一個Build tool,而底下是Build.py 目前支援的Command line options,因為我還沒追完全部的動作,所以先整理一下比較會使用到的部分:
===============================================================
"-a", "--arch", , choices=['IA32','X64','IPF','EBC','ARM'], dest="TargetArch",
"-p", "--platform"dest="PlatformFile"
"-m", "--module",, dest="ModuleFile"
"-b", "--buildtarget", dest="BuildTarget"
"-t", "--tagname", , dest="ToolChain",
"-x", "--sku-id", , dest="SkuId",
"-n", dest="ThreadNumber"
"-f", "--fdf", dest="FdfFile"
"-r", "--rom-image", dest="RomImage"
"-i", "--fv-image", dest="FvImage"
"-C", "--capsule-image", dest="CapName"
"-u", "--skip-autogen", dest="SkipAutoGen"
"-e", "--re-parse", , dest="Reparse"
"-c", "--case-insensitive", dest="CaseInsensitive"
"-w", "--warning-as-error", dest="WarningAsError
"-j", "--log", dest="LogFile"
"-s", "--silent",, dest="SilentMode",
"-q", "--quiet"
"-v", "--verbose"
"-d", "--debug"
"-D", "--define",dest="Macros"
"-y", "--report-file"dest="ReportFile"
"-Y", "--report-type" choices=['PCD','LIBRARY','FLASH','DEPEX','BUILD_FLAGS','FIXED_ADDRESS', 'EXECUTION_ORDER'], dest="ReportType"
"-p", "--platform"dest="PlatformFile"
"-m", "--module",, dest="ModuleFile"
"-b", "--buildtarget", dest="BuildTarget"
"-t", "--tagname", , dest="ToolChain",
"-x", "--sku-id", , dest="SkuId",
"-n", dest="ThreadNumber"
"-f", "--fdf", dest="FdfFile"
"-r", "--rom-image", dest="RomImage"
"-i", "--fv-image", dest="FvImage"
"-C", "--capsule-image", dest="CapName"
"-u", "--skip-autogen", dest="SkipAutoGen"
"-e", "--re-parse", , dest="Reparse"
"-c", "--case-insensitive", dest="CaseInsensitive"
"-w", "--warning-as-error", dest="WarningAsError
"-j", "--log", dest="LogFile"
"-s", "--silent",, dest="SilentMode",
"-q", "--quiet"
"-v", "--verbose"
"-d", "--debug"
"-D", "--define",dest="Macros"
"-y", "--report-file"dest="ReportFile"
"-Y", "--report-type" choices=['PCD','LIBRARY','FLASH','DEPEX','BUILD_FLAGS','FIXED_ADDRESS', 'EXECUTION_ORDER'], dest="ReportType"
"-F", "--flag", dest="Flag",
"-N", "--no-cache", dest="DisableCache"
從上面資料中可以看到-a 或是--arch對他來說應該都是同一個選項.
而底下是一些實際範例的說明,希望對大家有幫助~
======================
build.exe -p ACTIVE_PLATFORM
======================
ex: build -p DUETPkg\DuetPkg64.dsc
說明: 等同於修改Target.txt內的 ACTIVE_PLATFORM = Nt32Pkg/Nt32Pkg.dsc
=====================
build -b TARGET
=====================
ex: build -b DEBUG
說明: 等同於修改Target.txt內的TARGET= DEBUG,以及DSC file: [Defines] BUILD_TARGETS tag
[Defines]
PLATFORM_NAME = NT32
PLATFORM_GUID = EB216561-961F-47EE-9EF9-CA426EF547C2
PLATFORM_VERSION = 0.4
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/NT32
SUPPORTED_ARCHITECTURES = IA32
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = Nt32Pkg/Nt32Pkg.fdf
PLATFORM_NAME = NT32
PLATFORM_GUID = EB216561-961F-47EE-9EF9-CA426EF547C2
PLATFORM_VERSION = 0.4
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/NT32
SUPPORTED_ARCHITECTURES = IA32
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = Nt32Pkg/Nt32Pkg.fdf
=====================
build -a TARGET
=====================
ex: build -d x64
說明: 等同於修改Target.txt內的TARGET_ARCH = IA32,以及DSC file: [Defines] SUPPORTED_ARCHITECTURES tag (同上範例)
=====================
build -t TOOL_CHAIN
=====================
ex: build -t VS2010x86
說明: 等同於修改Target.txt內的TOOL_CHAIN_TAG = VS2008x86
=====================
build --log=Build.log
=====================
--log 可以產生建置過程的紀錄檔
1 則留言:
請問一下您是否在EFI Shell的環境下有遇過檔案無法覆蓋(複製)的情況,有某天我在電腦己有存在過檔案的地方,我將我寫的程式去覆蓋原來的程式,發現系統出現Access denide!
之後我暫時使用修改路徑解決
猜想是否EFI和Windows也有安全權限?導致我無法Access data,我使用的是FAT32的磁碟系統,環境是純UEFI Mode.
張貼留言