public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>
Subject: [PATCH 1/4] OvmfPkg/QemuVideoDxe/VbeShim.sh: remove end-of-options delimiter for nasm
Date: Tue,  3 Jan 2023 16:02:41 +0100	[thread overview]
Message-ID: <20230103150244.66835-2-lersek@redhat.com> (raw)
In-Reply-To: <20230103150244.66835-1-lersek@redhat.com>

Per my bisection: nasm broke the parsing of the "--" end-of-options
delimiter in commit 55568c1193df ("nasm: scan the command line twice",
2016-10-03), part of the nasm-2.13 release. The parsing remains broken in
at least nasm-2.15.03. The (invalid) error message is: "more than one
input file specified". I've filed the following ticket for upstream nasm
(and ndisasm): <https://bugzilla.nasm.us/show_bug.cgi?id=3392829>.

Since the delimiter is not necessary in practice (due to $STEM being
"VbeShim", i.e., not starting with a hyphen), simply remove the delimiter.

Tested by enabling DEBUG in "VbeShim.asm", running the script, building
OVMF, booting Windows 7, and checking the firmware log (debug console).

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3876
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 OvmfPkg/QemuVideoDxe/VbeShim.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.sh b/OvmfPkg/QemuVideoDxe/VbeShim.sh
index aea28be35f5c..7a0095a813cf 100755
--- a/OvmfPkg/QemuVideoDxe/VbeShim.sh
+++ b/OvmfPkg/QemuVideoDxe/VbeShim.sh
@@ -27,12 +27,15 @@ trap exit_handler EXIT
 
 #
 # Assemble the source file.
+# (nasm doesn't recognize the "--" end-of-options delimiter;
+# <https://bugzilla.nasm.us/show_bug.cgi?id=3392829>.)
 #
-nasm -o "$STEM".bin -- "$STEM".asm
+nasm -o "$STEM".bin "$STEM".asm
 
 #
 # Disassemble it, in order to get a binary dump associated with the source.
-# (ndisasm doesn't recognize the "--" end-of-options delimiter.)
+# (ndisasm doesn't recognize the "--" end-of-options delimiter;
+# <https://bugzilla.nasm.us/show_bug.cgi?id=3392829>.)
 #
 ndisasm "$STEM".bin >"$STEM".disasm
 


  reply	other threads:[~2023-01-03 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 15:02 [PATCH 0/4] fixes for BZs 3876, 4235, 4236 Laszlo Ersek
2023-01-03 15:02 ` Laszlo Ersek [this message]
2023-01-03 15:02 ` [PATCH 2/4] OvmfPkg: raise DXEFV size to 13 MB in the traditional platform FDFs Laszlo Ersek
2023-01-03 15:02 ` [PATCH 3/4] UefiCpuPkg/SmmCpuFeaturesLib: drop obsolete API implementation Laszlo Ersek
2023-01-03 15:02 ` [PATCH 4/4] OvmfPkg/SmmCpuFeaturesLib: " Laszlo Ersek
2023-01-04  9:46 ` [edk2-devel] [PATCH 0/4] fixes for BZs 3876, 4235, 4236 Ard Biesheuvel
2023-01-04 12:11   ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230103150244.66835-2-lersek@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox