public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Willy Tarreau" <w@1wt.eu>, "Sasha Levin" <sashal@kernel.org>,
	masahiroy@kernel.org, linux-kbuild@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu
Date: Mon, 15 Jan 2024 19:15:12 -0500	[thread overview]
Message-ID: <20240116001514.214199-7-sashal@kernel.org> (raw)
In-Reply-To: <20240116001514.214199-1-sashal@kernel.org>

From: Thomas Weißschuh <linux@weissschuh.net>

[ Upstream commit bdeeeaba83682225a7bf5f100fe8652a59590d33 ]

qemu for LoongArch does not work properly with direct kernel boot.
The kernel will panic during initialization and hang without any output.

When booting in EFI mode everything work correctly.

While users most likely don't have the LoongArch EFI binary installed at
least an explicit error about 'file not found' is better than a hanging
test without output that can never succeed.

Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-1-47c92f73590a@weissschuh.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 500edb9d9f15..33d118fbb432 100644
--- a/Makefile
+++ b/Makefile
@@ -584,6 +584,13 @@ ifdef config-build
 # *config targets only - make sure prerequisites are updated, and descend
 # in scripts/kconfig to make the *config target
 
+QEMU_BIOS_DIR = /usr/share/edk2/
+QEMU_BIOS_loongarch = $(QEMU_BIOS_DIR)/loongarch64/OVMF_CODE.fd
+
+ifneq ($(QEMU_BIOS_$(XARCH)),)
+QEMU_ARGS_BIOS = -bios $(QEMU_BIOS_$(XARCH))
+endif
+
 # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
 # KBUILD_DEFCONFIG may point out an alternative default configuration
 # used for 'make defconfig'
@@ -1375,7 +1382,7 @@ _modinst_:
 	@sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order
 	@sed 's:^:kernel/:' modules.builtin > $(MODLIB)/modules.builtin
 	@cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
-	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
+	$(Q)$(MAKE) $(QEMU_ARGS_BIOS) -f $(srctree)/scripts/Makefile.modinst
 
 # This depmod is only for convenience to give the initial
 # boot a modules.dep even before / is mounted read-write.  However the
-- 
2.43.0


  parent reply	other threads:[~2024-01-16  0:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16  0:15 [PATCH AUTOSEL 5.4 1/7] regulator: core: Only increment use_count when enable_count changes Sasha Levin
2024-01-16  0:15 ` [PATCH AUTOSEL 5.4 2/7] audit: Send netlink ACK before setting connection in auditd_set Sasha Levin
2024-01-16  0:15 ` [PATCH AUTOSEL 5.4 3/7] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo Sasha Levin
2024-01-16  0:15 ` [PATCH AUTOSEL 5.4 4/7] ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop Sasha Levin
2024-01-16  0:15 ` [PATCH AUTOSEL 5.4 5/7] PNP: ACPI: fix fortify warning Sasha Levin
2024-01-16  0:15 ` [PATCH AUTOSEL 5.4 6/7] ACPI: extlog: fix NULL pointer dereference check Sasha Levin
2024-01-16  0:15 ` Sasha Levin [this message]
2024-01-16 10:50   ` [PATCH AUTOSEL 5.4 7/7] selftests/nolibc: use EFI -bios for LoongArch qemu Masahiro Yamada
2024-01-16 11:29     ` Sasha Levin

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-all 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=20240116001514.214199-7-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=masahiroy@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=w@1wt.eu \
    /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