]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/PlatformCI/AmdSevBuild.py
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / PlatformCI / AmdSevBuild.py
1 # @file
2 # Script to Build OVMF UEFI firmware
3 #
4 # Copyright (c) Microsoft Corporation.
5 # SPDX-License-Identifier: BSD-2-Clause-Patent
6 ##
7 import os
8 import sys
9 import subprocess
10
11 sys.path.append(os.path.dirname(os.path.abspath(__file__)))
12 from PlatformBuildLib import SettingsManager
13 from PlatformBuildLib import PlatformBuilder
14
15 # ####################################################################################### #
16 # Common Configuration #
17 # ####################################################################################### #
18 class CommonPlatform():
19 ''' Common settings for this platform. Define static data here and use
20 for the different parts of stuart
21 '''
22 PackagesSupported = ("OvmfPkg",)
23 ArchSupported = ("X64",)
24 TargetsSupported = ("DEBUG", "RELEASE", "NOOPT")
25 Scopes = ('ovmf', 'edk2-build')
26 WorkspaceRoot = os.path.realpath(os.path.join(
27 os.path.dirname(os.path.abspath(__file__)), "..", ".."))
28
29 @classmethod
30 def GetDscName(cls, ArchCsv: str) -> str:
31 ''' return the DSC given the architectures requested.
32
33 ArchCsv: csv string containing all architectures to build
34 '''
35 return "AmdSev/AmdSevX64.dsc"
36
37 import PlatformBuildLib
38 PlatformBuildLib.CommonPlatform = CommonPlatform
39
40 # hack alert -- create dummy grub.efi
41 subprocess.run(['touch', 'OvmfPkg/AmdSev/Grub/grub.efi'])
42 subprocess.run(['ls', '-l', '--sort=time', 'OvmfPkg/AmdSev/Grub'])