From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.5182.1635930707769615852 for ; Wed, 03 Nov 2021 02:11:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MfoAm7ap; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635930705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NfBumEUST+RirKvYeHcc16iYBAovo9a6HUk/w1E5a68=; b=MfoAm7aprlbfrgYauzPmgp555VRnVEgcS9gHzz3K9GQSh/6hlgo75QVsndV+bkWuJShWjk zx7rqOqsJcYj2FySnsIshtGQG/OCUeZ/X3jHVWAmCypVWd9UGlJpfaxGg/oOb6j2aaIEBE yrUAigY+5xqPUZ2qhy8szHYqeDNtHl8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-551-KpQOs1oVO6ikTjDLjoIMHA-1; Wed, 03 Nov 2021 05:11:44 -0400 X-MC-Unique: KpQOs1oVO6ikTjDLjoIMHA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 045F81006AA7; Wed, 3 Nov 2021 09:11:43 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 656135D9D3; Wed, 3 Nov 2021 09:11:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4594F1801AB8; Wed, 3 Nov 2021 10:11:23 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Bret Barkelew , Michael D Kinney , Sean Brogan , Gerd Hoffmann , Ard Biesheuvel , Jordan Justen , Liming Gao , Jiewen Yao , Jiewen Yao , Ard Biesheuvel Subject: [PATCH v3 5/7] OvmfPkg/PlatformCI: add AmdSevBuild.py Date: Wed, 3 Nov 2021 10:11:21 +0100 Message-Id: <20211103091123.2953172-6-kraxel@redhat.com> In-Reply-To: <20211103091123.2953172-1-kraxel@redhat.com> References: <20211103091123.2953172-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Add build test for OvmfPkg/AmdSev. Acked-by: Jiewen Yao Acked-by: Ard Biesheuvel Signed-off-by: Gerd Hoffmann --- .../.azurepipelines/Ubuntu-GCC5.yml | 10 +++++ OvmfPkg/PlatformCI/AmdSevBuild.py | 37 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 OvmfPkg/PlatformCI/AmdSevBuild.py diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index cd7eaae54ec7..803bc8bbba6a 100644 --- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -114,6 +114,16 @@ jobs: Run.Flags: $(run_flags) Run: $(should_run) + AMDSEV_X64_DEBUG: + Build.File: "$(package)/PlatformCI/AmdSevBuild.py" + Build.Arch: "X64" + Build.Flags: "" + Build.Target: "DEBUG" + # restricted + stripped down build + # can't boot to uefi shell -> skip test + Run.Flags: "QEMU_SKIP=TRUE" + Run: $(should_run) + BHYVE_X64_DEBUG: Build.File: "$(package)/PlatformCI/BhyveBuild.py" Build.Arch: "X64" diff --git a/OvmfPkg/PlatformCI/AmdSevBuild.py b/OvmfPkg/PlatformCI/AmdSevBuild.py new file mode 100644 index 000000000000..2dd72cfe80d9 --- /dev/null +++ b/OvmfPkg/PlatformCI/AmdSevBuild.py @@ -0,0 +1,37 @@ +# @file +# Script to Build OVMF UEFI firmware +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +import os +import sys + +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +from PlatformBuildLib import SettingsManager +from PlatformBuildLib import PlatformBuilder + + # ####################################################################################### # + # Common Configuration # + # ####################################################################################### # +class CommonPlatform(): + ''' Common settings for this platform. Define static data here and use + for the different parts of stuart + ''' + PackagesSupported = ("OvmfPkg",) + ArchSupported = ("X64",) + TargetsSupported = ("DEBUG", "RELEASE", "NOOPT") + Scopes = ('ovmf', 'edk2-build') + WorkspaceRoot = os.path.realpath(os.path.join( + os.path.dirname(os.path.abspath(__file__)), "..", "..")) + + @classmethod + def GetDscName(cls, ArchCsv: str) -> str: + ''' return the DSC given the architectures requested. + + ArchCsv: csv string containing all architectures to build + ''' + return "AmdSev/AmdSevX64.dsc" + +import PlatformBuildLib +PlatformBuildLib.CommonPlatform = CommonPlatform -- 2.31.1