Skip to content

Commit

Permalink
loongarch: Restrict booting to QEMU 8.0.0+
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
nathanchance committed Aug 1, 2023
1 parent 0b1bbe3 commit 35c4d6e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lkt/loongarch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self):
self.make_vars['LLVM_IAS'] = 1

self._clang_target = CLANG_TARGET
self._qemu_version = lkt.utils.create_qemu_version(f"qemu-system-{QEMU_ARCH}")

def _add_defconfig_runners(self):
runner = LoongArchLLVMKernelRunner()
Expand Down Expand Up @@ -89,4 +90,14 @@ def run(self):
if not self.only_test_boot and 'other' in self.targets:
self._add_otherconfig_runners()

# QEMU older than 8.0.0 hits an assert in Loongson's EDK2 firmware:
# ASSERT [VirtNorFlashDxe] .../Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c(56): !(((INTN)(RETURN_STATUS)(FindNodeStatus)) < 0)
if self._qemu_version < (8, 0, 0):
found_ver = '.'.join(str(val) for val in self._qemu_version)
for runner in self._runners:
if runner.bootable:
runner.bootable = False
runner.result[
'boot'] = f"skipped due to qemu older than 8.0.0 (found {found_ver})"

return super().run()

0 comments on commit 35c4d6e

Please sign in to comment.