* [PATCH v2] OvmfPkg: Skip initrd command on Xcode toolchain
@ 2020-05-14 13:48 Roman Bolshakov
2020-05-14 17:12 ` Laszlo Ersek
0 siblings, 1 reply; 2+ messages in thread
From: Roman Bolshakov @ 2020-05-14 13:48 UTC (permalink / raw)
To: devel
Cc: Cameron Esfahani, LAHAYE Olivier, Philippe Mathieu-Daudé,
Roman Bolshakov, Ard Biesheuvel, Liming Gao, Andrew Fish,
Laszlo Ersek
OVMF booting stops with the assert if built with Xcode on macOS:
Loading driver at 0x0001FAB8000 EntryPoint=0x0001FABF249 LinuxInitrdDynamicShellCommand.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 1F218398
ProtectUefiImageCommon - 0x1F218140
- 0x000000001FAB8000 - 0x0000000000008A60
ASSERT_EFI_ERROR (Status = Unsupported)
ASSERT LinuxInitrdDynamicShellCommand.c(378): !EFI_ERROR (Status)
The assert comes from InitializeHiiPackage() after an attempt to
retrieve HII package list from ImageHandle.
Xcode still doesn't support HII resource section and
LinuxInitrdDynamicShellCommand depends on it. Likewise 277a3958d93a
("OvmfPkg: Don't include TftpDynamicCommand in XCODE5 tool chain"),
disable initrd command if built with Xcode toolchain
Fixes: ec41733cfd10 ("OvmfPkg: add the 'initrd' dynamic shell command")
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
---
OvmfPkg/OvmfPkgIa32.dsc | 2 +-
OvmfPkg/OvmfPkgIa32.fdf | 2 +-
OvmfPkg/OvmfPkgIa32X64.dsc | 2 +-
OvmfPkg/OvmfPkgIa32X64.fdf | 2 +-
OvmfPkg/OvmfPkgX64.dsc | 2 +-
OvmfPkg/OvmfPkgX64.fdf | 2 +-
OvmfPkg/OvmfXen.dsc | 2 +-
OvmfPkg/OvmfXen.fdf | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
Changes since v1:
- Disabled build and packaging of the command on Xcode toolchain for
all related architectures and platforms (Laszlo)
- Corrected wrong reference in Fixes tag (Laszlo)
FWIW, I can't really build for IA32X64 arch on macOS:
$ OvmfPkg/build.sh -a IA32X64
Initializing workspace
/Users/user/dev/edk2/BaseTools
Loading previous configuration from /Users/user/dev/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/user/dev/edk2
EDK_TOOLS_PATH: /Users/user/dev/edk2/BaseTools
CONF_PATH: /Users/user/dev/edk2/Conf
Unsupported processor architecture: IA32X64
Only IA32 or X64 is supported
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 41ac320296..e54aecdf27 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -871,11 +871,11 @@
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
-!endif
OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!endif
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index fd81b6fa8b..e2b759aa8d 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -290,8 +290,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
!if $(TOOL_CHAIN_TAG) != "XCODE5"
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-!endif
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
+!endif
INF ShellPkg/Application/Shell/Shell.inf
INF MdeModulePkg/Logo/LogoDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index c2f11aee2c..c0c8397cb7 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -884,11 +884,11 @@
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
-!endif
OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!endif
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index f71134a659..bfca1eff9e 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -291,8 +291,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
!if $(TOOL_CHAIN_TAG) != "XCODE5"
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-!endif
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
+!endif
INF ShellPkg/Application/Shell/Shell.inf
INF MdeModulePkg/Logo/LogoDxe.inf
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 643e6041ad..22112bcb04 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -881,11 +881,11 @@
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
-!endif
OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!endif
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
index f71134a659..bfca1eff9e 100644
--- a/OvmfPkg/OvmfPkgX64.fdf
+++ b/OvmfPkg/OvmfPkgX64.fdf
@@ -291,8 +291,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
!if $(TOOL_CHAIN_TAG) != "XCODE5"
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-!endif
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
+!endif
INF ShellPkg/Application/Shell/Shell.inf
INF MdeModulePkg/Logo/LogoDxe.inf
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 143dc6d5a7..3af0ee7054 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -675,11 +675,11 @@
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
-!endif
OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!endif
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
index 3c4164a5f5..d9ee14b484 100644
--- a/OvmfPkg/OvmfXen.fdf
+++ b/OvmfPkg/OvmfXen.fdf
@@ -363,8 +363,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
!if $(TOOL_CHAIN_TAG) != "XCODE5"
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-!endif
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
+!endif
INF ShellPkg/Application/Shell/Shell.inf
INF MdeModulePkg/Logo/LogoDxe.inf
--
2.26.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] OvmfPkg: Skip initrd command on Xcode toolchain
2020-05-14 13:48 [PATCH v2] OvmfPkg: Skip initrd command on Xcode toolchain Roman Bolshakov
@ 2020-05-14 17:12 ` Laszlo Ersek
0 siblings, 0 replies; 2+ messages in thread
From: Laszlo Ersek @ 2020-05-14 17:12 UTC (permalink / raw)
To: Roman Bolshakov, devel
Cc: Cameron Esfahani, LAHAYE Olivier, Philippe Mathieu-Daudé,
Ard Biesheuvel, Liming Gao, Andrew Fish
On 05/14/20 15:48, Roman Bolshakov wrote:
> OVMF booting stops with the assert if built with Xcode on macOS:
>
> Loading driver at 0x0001FAB8000 EntryPoint=0x0001FABF249 LinuxInitrdDynamicShellCommand.efi
> InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 1F218398
> ProtectUefiImageCommon - 0x1F218140
> - 0x000000001FAB8000 - 0x0000000000008A60
>
> ASSERT_EFI_ERROR (Status = Unsupported)
> ASSERT LinuxInitrdDynamicShellCommand.c(378): !EFI_ERROR (Status)
>
> The assert comes from InitializeHiiPackage() after an attempt to
> retrieve HII package list from ImageHandle.
>
> Xcode still doesn't support HII resource section and
> LinuxInitrdDynamicShellCommand depends on it. Likewise 277a3958d93a
> ("OvmfPkg: Don't include TftpDynamicCommand in XCODE5 tool chain"),
> disable initrd command if built with Xcode toolchain
>
> Fixes: ec41733cfd10 ("OvmfPkg: add the 'initrd' dynamic shell command")
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
> OvmfPkg/OvmfPkgIa32.dsc | 2 +-
> OvmfPkg/OvmfPkgIa32.fdf | 2 +-
> OvmfPkg/OvmfPkgIa32X64.dsc | 2 +-
> OvmfPkg/OvmfPkgIa32X64.fdf | 2 +-
> OvmfPkg/OvmfPkgX64.dsc | 2 +-
> OvmfPkg/OvmfPkgX64.fdf | 2 +-
> OvmfPkg/OvmfXen.dsc | 2 +-
> OvmfPkg/OvmfXen.fdf | 2 +-
> 8 files changed, 8 insertions(+), 8 deletions(-)
>
> Changes since v1:
> - Disabled build and packaging of the command on Xcode toolchain for
> all related architectures and platforms (Laszlo)
> - Corrected wrong reference in Fixes tag (Laszlo)
>
> FWIW, I can't really build for IA32X64 arch on macOS:
>
> $ OvmfPkg/build.sh -a IA32X64
> Initializing workspace
> /Users/user/dev/edk2/BaseTools
> Loading previous configuration from /Users/user/dev/edk2/Conf/BuildEnv.sh
> WORKSPACE: /Users/user/dev/edk2
> EDK_TOOLS_PATH: /Users/user/dev/edk2/BaseTools
> CONF_PATH: /Users/user/dev/edk2/Conf
> Unsupported processor architecture: IA32X64
> Only IA32 or X64 is supported
For passing both the IA32 and X64 arches to the "build" utility, you
have to use separate "-a" options, as in: "-a IA32 -a X64".
The same seems to apply to the "OvmfPkg/build.sh" wrapper script; see:
> -a)
> if [[ x"$arg" != x"IA32" && x"$arg" != x"X64" ]]; then
> echo Unsupported processor architecture: $arg
> echo Only IA32 or X64 is supported
> exit 1
> fi
> eval ARCH_$arg=yes
> ;;
followed by:
> if [[ "$ARCH_IA32" == "yes" && "$ARCH_X64" == "yes" ]]; then
> PROCESSOR=IA32X64
> Processor=Ia32X64
> BUILD_OPTIONS="$BUILD_OPTIONS -a IA32 -a X64"
> PLATFORM_BUILD_DIR=Ovmf3264
> BUILD_ROOT_ARCH=X64
For the patch:
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Merged as commit bcf181a33b2e, via
<https://github.com/tianocore/edk2/pull/617>.
Thanks!
Laszlo
>
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 41ac320296..e54aecdf27 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -871,11 +871,11 @@
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> -!endif
> OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> +!endif
> ShellPkg/Application/Shell/Shell.inf {
> <LibraryClasses>
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
> index fd81b6fa8b..e2b759aa8d 100644
> --- a/OvmfPkg/OvmfPkgIa32.fdf
> +++ b/OvmfPkg/OvmfPkgIa32.fdf
> @@ -290,8 +290,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
>
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
> -!endif
> INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
> +!endif
> INF ShellPkg/Application/Shell/Shell.inf
>
> INF MdeModulePkg/Logo/LogoDxe.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index c2f11aee2c..c0c8397cb7 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -884,11 +884,11 @@
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> -!endif
> OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> +!endif
> ShellPkg/Application/Shell/Shell.inf {
> <LibraryClasses>
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
> index f71134a659..bfca1eff9e 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.fdf
> +++ b/OvmfPkg/OvmfPkgIa32X64.fdf
> @@ -291,8 +291,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
>
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
> -!endif
> INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
> +!endif
> INF ShellPkg/Application/Shell/Shell.inf
>
> INF MdeModulePkg/Logo/LogoDxe.inf
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 643e6041ad..22112bcb04 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -881,11 +881,11 @@
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> -!endif
> OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> +!endif
> ShellPkg/Application/Shell/Shell.inf {
> <LibraryClasses>
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index f71134a659..bfca1eff9e 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -291,8 +291,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
>
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
> -!endif
> INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
> +!endif
> INF ShellPkg/Application/Shell/Shell.inf
>
> INF MdeModulePkg/Logo/LogoDxe.inf
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 143dc6d5a7..3af0ee7054 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -675,11 +675,11 @@
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> -!endif
> OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
> <PcdsFixedAtBuild>
> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> }
> +!endif
> ShellPkg/Application/Shell/Shell.inf {
> <LibraryClasses>
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
> index 3c4164a5f5..d9ee14b484 100644
> --- a/OvmfPkg/OvmfXen.fdf
> +++ b/OvmfPkg/OvmfXen.fdf
> @@ -363,8 +363,8 @@ INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
>
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
> -!endif
> INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
> +!endif
> INF ShellPkg/Application/Shell/Shell.inf
>
> INF MdeModulePkg/Logo/LogoDxe.inf
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-14 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-14 13:48 [PATCH v2] OvmfPkg: Skip initrd command on Xcode toolchain Roman Bolshakov
2020-05-14 17:12 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox