pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lima: Force to use legacy BIOS on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Mon Jun 13 00:06:41 2022 +0200
Changeset:	bf9d3ba18a9067d4ab011f2ba0d168ce593a7b67

Modified Files:
	lima/Makefile

Log Message:
lima: Force to use legacy BIOS on NetBSD

When using UEFI qemu aborts with:

 qemu-system-x86_64: NVMM: Mem Assist Failed [gpa=0xfffffff0]
 qemu-system-x86_64: NVMM: Failed to execute a VCPU.

From a quick skim of the command arguments passed to QEMU when using UEFI there
is this extra argument:

 -drive if=pflash,format=raw,readonly=on,file=/usr/pkg/share/qemu/edk2-x86_64-code.fd

This should be investigated further.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bf9d3ba18a9067d4ab011f2ba0d168ce593a7b67

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lima/Makefile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diffs:
diff --git a/lima/Makefile b/lima/Makefile
index d2320bdf2f..06188f7783 100644
--- a/lima/Makefile
+++ b/lima/Makefile
@@ -15,6 +15,26 @@ USE_TOOLS+=	gmake
 # Avoid to invoke/use git
 MAKE_FLAGS+=	VERSION=${GITHUB_TAG}
 
+.include "../../lang/go/go-vars.mk"
+.include "../../mk/bsd.prefs.mk"
+
+#
+# XXX: When using UEFI instead of legacy BIOS on NetBSD with NVMM QEMU aborts as
+# XXX: follows:
+# XXX:
+# XXX: qemu-system-x86_64: NVMM: Mem Assist Failed [gpa=0xfffffff0]
+# XXX: qemu-system-x86_64: NVMM: Failed to execute a VCPU.
+# XXX:
+# XXX: Force legacy BIOS to avoid that.
+#
+.if ${OPSYS} == "NetBSD"
+SUBST_CLASSES+=			legacy-bios
+SUBST_STAGE.legacy-bios=	pre-configure
+SUBST_MESSAGE.legacy-bios=	Force to use legacy BIOS on NetBSD
+SUBST_FILES.legacy-bios+=	examples/default.yaml
+SUBST_SED.legacy-bios+=		-e 's/legacyBIOS: null/legacyBIOS: true/'
+.endif
+
 do-build:
 	cd ${WRKSRC} && \
 	${RUN} ${_ULIMIT_CMD} \


Home | Main Index | Thread Index | Old Index