]>
Commit | Line | Data |
---|---|---|
8b8ae609 GH |
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 | |
8 | import sys\r | |
2722856a | 9 | import subprocess\r |
8b8ae609 GH |
10 | \r |
11 | sys.path.append(os.path.dirname(os.path.abspath(__file__)))\r | |
12 | from PlatformBuildLib import SettingsManager\r | |
13 | from PlatformBuildLib import PlatformBuilder\r | |
14 | \r | |
15 | # ####################################################################################### #\r | |
16 | # Common Configuration #\r | |
17 | # ####################################################################################### #\r | |
18 | class CommonPlatform():\r | |
19 | ''' Common settings for this platform. Define static data here and use\r | |
20 | for the different parts of stuart\r | |
21 | '''\r | |
22 | PackagesSupported = ("OvmfPkg",)\r | |
23 | ArchSupported = ("X64",)\r | |
24 | TargetsSupported = ("DEBUG", "RELEASE", "NOOPT")\r | |
25 | Scopes = ('ovmf', 'edk2-build')\r | |
26 | WorkspaceRoot = os.path.realpath(os.path.join(\r | |
27 | os.path.dirname(os.path.abspath(__file__)), "..", ".."))\r | |
28 | \r | |
29 | @classmethod\r | |
30 | def GetDscName(cls, ArchCsv: str) -> str:\r | |
31 | ''' return the DSC given the architectures requested.\r | |
32 | \r | |
33 | ArchCsv: csv string containing all architectures to build\r | |
34 | '''\r | |
35 | return "AmdSev/AmdSevX64.dsc"\r | |
36 | \r | |
37 | import PlatformBuildLib\r | |
38 | PlatformBuildLib.CommonPlatform = CommonPlatform\r | |
2722856a GH |
39 | \r |
40 | # hack alert -- create dummy grub.efi\r | |
41 | subprocess.run(['touch', 'OvmfPkg/AmdSev/Grub/grub.efi'])\r | |
42 | subprocess.run(['ls', '-l', '--sort=time', 'OvmfPkg/AmdSev/Grub'])\r |