]>
Commit | Line | Data |
---|---|---|
6cdf647b SB |
1 | # @file\r |
2 | # Script to Build OVMF UEFI firmware\r | |
3 | #\r | |
4 | # Copyright (c) Microsoft Corporation.\r | |
5 | # SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | ##\r | |
7 | import os\r | |
61be49e0 | 8 | import sys\r |
6cdf647b | 9 | \r |
61be49e0 GH |
10 | sys.path.append(os.path.dirname(os.path.abspath(__file__)))\r |
11 | from PlatformBuildLib import SettingsManager\r | |
12 | from PlatformBuildLib import PlatformBuilder\r | |
6cdf647b SB |
13 | \r |
14 | # ####################################################################################### #\r | |
15 | # Common Configuration #\r | |
16 | # ####################################################################################### #\r | |
17 | class CommonPlatform():\r | |
18 | ''' Common settings for this platform. Define static data here and use\r | |
19 | for the different parts of stuart\r | |
20 | '''\r | |
21 | PackagesSupported = ("OvmfPkg",)\r | |
22 | ArchSupported = ("IA32", "X64")\r | |
23 | TargetsSupported = ("DEBUG", "RELEASE", "NOOPT")\r | |
24 | Scopes = ('ovmf', 'edk2-build')\r | |
25 | WorkspaceRoot = os.path.realpath(os.path.join(\r | |
26 | os.path.dirname(os.path.abspath(__file__)), "..", ".."))\r | |
27 | \r | |
28 | @classmethod\r | |
29 | def GetDscName(cls, ArchCsv: str) -> str:\r | |
30 | ''' return the DSC given the architectures requested.\r | |
31 | \r | |
32 | ArchCsv: csv string containing all architectures to build\r | |
33 | '''\r | |
34 | dsc = "OvmfPkg"\r | |
35 | if "IA32" in ArchCsv.upper().split(","):\r | |
36 | dsc += "Ia32"\r | |
37 | if "X64" in ArchCsv.upper().split(","):\r | |
38 | dsc += "X64"\r | |
39 | dsc += ".dsc"\r | |
40 | return dsc\r | |
41 | \r | |
61be49e0 GH |
42 | import PlatformBuildLib\r |
43 | PlatformBuildLib.CommonPlatform = CommonPlatform\r |