[edk2-devel] [PATCH v4 6/7] OvmfPkg/PlatformCI: dummy grub.efi for AmdSev

Gerd Hoffmann posted 7 patches 4 years, 1 month ago
[edk2-devel] [PATCH v4 6/7] OvmfPkg/PlatformCI: dummy grub.efi for AmdSev
Posted by Gerd Hoffmann 4 years, 1 month ago
Building grub.efi for AmdSev is difficult because it depends on patches
not yet merged to upstream grub.  So shortcut the grub build by simply
creating an empty grub.efi file.  That allows to at least build-test the
AmdSev variant.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Dov Murik <dovmurik@linux.ibm.com>
---
 OvmfPkg/PlatformCI/AmdSevBuild.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/OvmfPkg/PlatformCI/AmdSevBuild.py b/OvmfPkg/PlatformCI/AmdSevBuild.py
index 2dd72cfe80d9..816caafb0084 100644
--- a/OvmfPkg/PlatformCI/AmdSevBuild.py
+++ b/OvmfPkg/PlatformCI/AmdSevBuild.py
@@ -6,6 +6,7 @@
 ##
 import os
 import sys
+import subprocess
 
 sys.path.append(os.path.dirname(os.path.abspath(__file__)))
 from PlatformBuildLib import SettingsManager
@@ -35,3 +36,7 @@ class CommonPlatform():
 
 import PlatformBuildLib
 PlatformBuildLib.CommonPlatform = CommonPlatform
+
+# hack alert -- create dummy grub.efi
+subprocess.run(['touch', 'OvmfPkg/AmdSev/Grub/grub.efi'])
+subprocess.run(['ls', '-l', '--sort=time', 'OvmfPkg/AmdSev/Grub'])
-- 
2.33.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84683): https://edk2.groups.io/g/devel/message/84683
Mute This Topic: https://groups.io/mt/87693645/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v4 6/7] OvmfPkg/PlatformCI: dummy grub.efi for AmdSev
Posted by Philippe Mathieu-Daudé 4 years, 1 month ago
On 12/13/21 09:14, Gerd Hoffmann wrote:
> Building grub.efi for AmdSev is difficult because it depends on patches
> not yet merged to upstream grub.  So shortcut the grub build by simply
> creating an empty grub.efi file.  That allows to at least build-test the
> AmdSev variant.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> Reviewed-by: Dov Murik <dovmurik@linux.ibm.com>
> ---
>  OvmfPkg/PlatformCI/AmdSevBuild.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/OvmfPkg/PlatformCI/AmdSevBuild.py b/OvmfPkg/PlatformCI/AmdSevBuild.py
> index 2dd72cfe80d9..816caafb0084 100644
> --- a/OvmfPkg/PlatformCI/AmdSevBuild.py
> +++ b/OvmfPkg/PlatformCI/AmdSevBuild.py
> @@ -6,6 +6,7 @@
>  ##
>  import os
>  import sys
> +import subprocess
>  
>  sys.path.append(os.path.dirname(os.path.abspath(__file__)))
>  from PlatformBuildLib import SettingsManager
> @@ -35,3 +36,7 @@ class CommonPlatform():
>  
>  import PlatformBuildLib
>  PlatformBuildLib.CommonPlatform = CommonPlatform
> +
> +# hack alert -- create dummy grub.efi
> +subprocess.run(['touch', 'OvmfPkg/AmdSev/Grub/grub.efi'])
> +subprocess.run(['ls', '-l', '--sort=time', 'OvmfPkg/AmdSev/Grub'])

Why run 'ls'?

What about replacing subprocess by open?

  open('OvmfPkg/AmdSev/Grub/grub.efi', 'a').close()





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84765): https://edk2.groups.io/g/devel/message/84765
Mute This Topic: https://groups.io/mt/87693645/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-