Dsc
dsc ¶
Data model for the EDK II DSC.
dsc_set ¶
dsc_dict ¶
A dictionary that allows specific classes as headers and sections.
__init__ ¶
__init__(
allowed_key_classes: Optional[str] = None,
allowed_value_classes: Optional[Any] = None,
) -> dsc_dict
Initializes a dsc_dict.
__missing__ ¶
__missing__(key: int) -> str
Describes how to handle a missing key.
Makes a new dsc_set if allowed.
Raises:
Type | Description |
---|---|
KeyError
|
If not allowed |
__setitem__ ¶
__setitem__(key: int, val: str) -> None
Setting a key value pair in the Ordered Dictionary.
Raises:
Type | Description |
---|---|
ValueError
|
Adding a invalid key to restricted set |
ValueError
|
Adding a invalid set to a restricted dict |
ValueError
|
Adding a section that already exists |
dsc ¶
dsc_section_type ¶
dsc section type.
Attributes:
Name | Type | Description |
---|---|---|
arch |
str
|
architecture |
module_type |
str
|
module type |
dsc_buildoption_section_type ¶
Build option section type.
Attributes:
Name | Type | Description |
---|---|---|
codebase |
|
Examples:
BuildOptions.$(arch).CodeBase.Edk2ModuleType
BuildOptions.$(arch).CodeBase
BuildOptions.common.CodeBase
BuildOptions.$(arch)
BuildOptions.common
BuildOptions
__init__ ¶
__init__(
arch: str = "common",
codebase: str = "common",
module_type: str = "common",
) -> dsc_buildoption_section_type
Inits dsc build option section type.
IsValidCodeBase
classmethod
¶
IsValidCodeBase(codebase: str) -> bool
Determines if codebase is valid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
codebase |
str
|
codebase |
required |
Returns:
Type | Description |
---|---|
bool
|
True if COMMON, EDK, EDKII else false |
dsc_pcd_section_type ¶
This class is uses to define the PCD section type inside a component.
Attributes:
Name | Type | Description |
---|---|---|
pcdtype |
pcd type |
|
arch |
defaults to common |
|
sku |
defaults to DEFAULT |
|
store |
if none, we don't have anything done |
__init__ ¶
__init__(
pcdtype: str,
arch: str = "common",
sku: str = "DEFAULT",
store: Optional[str] = None,
) -> dsc_pcd_section_type
Inits the dsc_pcd_section object.
dsc_pcd_component_type ¶
This class is uses to define the PCD type inside a component.
sku_id ¶
Contains the data for a sku.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
int
|
sku id number |
0
|
name |
str
|
name of the sku |
'DEFAULT'
|
parent |
str
|
parent |
'DEFAULT'
|
source_info |
Optional[source_info]
|
source info |
None
|
__init__ ¶
__init__(
id: int = 0,
name: str = "DEFAULT",
parent: str = "DEFAULT",
source_info: Optional[source_info] = None,
) -> sku_id
Inits the sku_id object.
component ¶
Contains the data for a component for the EDK build system to build.
__init__ ¶
__init__(
inf: str, source_info: Optional[source_info] = None
) -> component
Inits the component object.
definition ¶
Contains the information on a definition.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
definition name |
required |
value |
str
|
definition value |
required |
local |
bool
|
if the value is local or not |
False
|
source_info |
Optional[source_info]
|
source info |
None
|
__init__ ¶
__init__(
name: str,
value: str,
local: bool = False,
source_info: Optional[source_info] = None,
) -> definition
Inits the definition object.
NOTE: Local means DEFINE is in front and is localized to that particular section
library ¶
Contains the data for a specific EDK library.
Attributes:
Name | Type | Description |
---|---|---|
inf |
str
|
inf file |
source_info |
|
__init__ ¶
__init__(
inf: str, source_info: Optional[source_info] = None
) -> library
Inits the Library object.
library_class ¶
Contains the data for a specific EDK2 library class.
Attributes:
Name | Type | Description |
---|---|---|
libraryclass |
the EDK2 library class |
|
inf) |
the inf |
|
source_info |
source info |
__init__ ¶
__init__(
libraryclass: str,
inf: str,
source_info: Optional[source_info] = None,
) -> library_class
Inits the Library class object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
libraryclass |
str
|
the EDK2 library class |
required |
inf |
str
|
the inf |
required |
source_info |
Optional[source_info]
|
source info |
None
|
pcd ¶
A PCD object.
Attributes:
Name | Type | Description |
---|---|---|
namespace |
namespace |
|
name |
pcd name |
|
value |
pcd value |
|
source_info |
source info |
__init__ ¶
__init__(
namespace: str,
name: str,
value: str,
source_info: Optional[source_info] = None,
) -> pcd
Inits a PCD object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
namespace |
str
|
namespace |
required |
name |
str
|
pcd name |
required |
value |
str
|
pcd value |
required |
source_info |
Optional[source_info]
|
source info |
None
|
pcd_typed ¶
A Typed PCD object.
Attributes:
Name | Type | Description |
---|---|---|
datum_type |
Data Type |
|
max_size |
max size of the data type |
pcd_variable ¶
A Variable PCD object.
Attributes:
Name | Type | Description |
---|---|---|
var_name |
VariableName |
|
var_guid |
VariableGuid |
|
var_offset |
VariableOffset |
|
default |
default value |
|
attribute |
Optional attributes |
|
source_info |
source info |
__init__ ¶
__init__(
namespace: str,
name: str,
var_name: str,
var_guid: str,
var_offset: str,
default: Optional[str] = None,
attributes: Optional[str] = None,
source_info: Optional[source_info] = None,
) -> pcd_variable
Inits a pcd_variable object.
build_option ¶
Build option object.
Attributes:
Name | Type | Description |
---|---|---|
tool_code |
One of the defined tool codes in the Conf/tools_def.txt file. |
|
attribute |
for example flags, d_path, path |
|
data |
the actual flags or path you want to set |
|
target |
DEBUG, RELEASE, or other |
|
tagname |
the tool chain tag |
|
arch |
ARM, AARCH64, IA32, X64, etc |
|
family |
Conf/tools_def.txt defines FAMILY as one of MSFT, INTEL or GCC. |
|
replace |
whether or not this replaces the default from tools_def, if this is false, we append |
|
source_info |
source_info object. |
Contains the data for a build option
__init__ ¶
__init__(
tool_code: str,
attribute: str,
data: str,
target: str = "*",
tagname: str = "*",
arch: str = "*",
family: Optional[str] = None,
replace: bool = False,
source_info: source_info = None,
) -> build_option
Inits a build_option object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tool_code |
str
|
One of the defined tool codes in the Conf/tools_def.txt file. |
required |
attribute |
str
|
for example flags, d_path, path |
required |
data |
str
|
the actual flags or path you want to set |
required |
target |
str
|
DEBUG, RELEASE, or other |
'*'
|
tagname |
str
|
the tool chain tag |
'*'
|
arch |
str
|
ARM, AARCH64, IA32, X64, etc |
'*'
|
family |
Optional[str]
|
Conf/tools_def.txt defines FAMILY as one of MSFT, INTEL or GCC. |
None
|
replace |
bool
|
whether or not this replaces the default from tools_def, if this is false, we append |
False
|
source_info |
source_info
|
source_info object. |
None
|
attribute Attribute:
The flags defined in this section are appended to flags defined in the tools_def.txt file for individual tools.
fam9ily Attribute:
Typically, this field is used to help the build tools determine whether the line is used for Microsoft style Makefiles or the GNU style Makefile
default_store ¶
Object containing information on a default store.
Attributes:
Name | Type | Description |
---|---|---|
index |
index |
|
value |
defaults to "Standard" |
|
source_info |
defaults to None |
__init__ ¶
__init__(
index: int = 0,
value: str = "Standard",
source_info: Optional[str] = None,
) -> default_store
Inits a default store object.
NOTE: Local means DEFINE is in front and is localized to that particular section