我刚开始写的,meta-data file是指dsc、dec、inf和fdf文件。 来自dsc spec,
thebuildtoolsuseedkiimeta-data files (INF、DEC、DSC and、optionally、the FDF ) to create Makefiles that are
then processed by third party tools。
首先,FDF是用于创建firmware images、option rom images或可引导映像的flash描述文件的缩写。
为了讨论本节,我们还参考FlashMap.fdf文件,并通常承诺将FlashMap.fdf用作flash描述文件(flash )
description file ) .通常,建议在flash描述文件中使用fdf后缀。
通常,flash描述文件与dsc文件位于同一文件夹中。
下一章使用fdf代替flash描述文件. '
EDK II编译生成符合UEFI和PI规范的二进制图像。
注意: FDF文件中的路径和文件名是区分大小写的,因为它们必须支持unix style操作系统。
条件语句Conditional Statements (! if . )
条件语句用于确定编译工具的预处理函数是否包含语句。
3.10PCD会话
thepcdsectionsareoptional.optional不分青红皂白。
pcdvalueslistedinthedscfilemustbeabsolutevalues,macronamesorexpressionswhichmayinclude
otherpcdnamesand/ormacronamesthathavebeenpreviouslydefined.whileeachpcdtypehasitsown
section definition,itispossibleforpcdsaccessedusingeitherthefixedatbuildorpatchableinmodule
methodstohavedifferentvaluesfordifferentmodules。
itisnotpermittedtolistapcdindifferenttypesections.apcdcanonlybelistedunderonetype.all
pcdslistedinthesesectionsmustbedeclaredinadecfileifthepcdisusedinanymoduleslistedinthe
DSC or fdf文件。
inf表示模块,dsc表示平台,如果编译时遇到error 40003360 instanceoflibrayclass [ dxeserviceslib ] is not found
如果我在nt32pkg.dsc
dxeserviceslib/mde pkg/library/dxeserviceslib/dxeserviceslib.INF
评论一下,DxeMain.inf还会使用这个lib。
所以这个问题会发生。
作为例外,还可以在模块中显示特定的lib
以下是官方的DSC [库类] sec iton的介绍
每个模块都使用不同的lib,但lib始终有相应的实例。 要建立此映射关系,必须依赖此处提到的库类部分。
例如,在EDK II中,调试库有很多实例,但具体来说,在每个组件时,只有一个链接。 此时,需要我们做出选择:
DSC文件配置
接下来是这些section
[Defines]
[构建选项]
[BuildOptions.IA32]
[BuildOptions.X64]
[SkuIds]
[LibraryClasses.common]
LibraryClasses.IA32.SEC]
[LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE,LibraryClasses.IA32.SEC]
[ library classes.com mon.dxe _ driver ]
[ library classes.com mon.dxe _ SMM _ driver ]
library classes.com mon.SMM _ core ]
[ library classes.com mon.dxe _ runtime _ driver ]
[ library classes.com mon.uefi _ driver ]
[ library classes.x64.uefi _ application ]
Pcd Section
[PcdsFeatureFlag.common]
[PcdsFixedAtBuild.common]
[PcdsPatchableInModule.common]
[ pcdsdynamicexhii.com mon.default ]
[ pcdsdynamicexdefault.com mon.ia32 ]
[ pcdsdynamicexdefault.com mon.default ]
组件区段
可以不[ components.ia32 ] [ components.x64 ]?
组件部分是必不可少的。
components section中列出的一些模块或组件由编译器和EDK II A工具生成PE32/PE32 /Coff image文件。
在组件部分中! 可以使用include语句,但一般不推荐。
[Components.common]
[构建选项]
[BuildOptions.Common.EDKII]