@@ -3204,7 +3204,9 @@ F: package/ngrep/
N: Waldemar Brodkorb <wbx@openadk.org>
F: arch/Config.in.loongarch64
+F: board/qemu/loongarch64/
F: board/qemu/riscv32-virt/
+F: configs/qemu_loongarch64_defconfig
F: configs/qemu_riscv32_nommu_virt_defconfig
F: package/asterisk/
F: package/libjwt/
new file mode 100644
@@ -0,0 +1,2 @@
+# From https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256 b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6 linux-6.6.30.tar.xz
new file mode 100644
@@ -0,0 +1,2 @@
+# From https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256 b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6 linux-6.6.30.tar.xz
new file mode 100644
@@ -0,0 +1,11 @@
+Qemu does not bundle the BIOS file QEMU_EFI.fd. You need to build it:
+https://github.com/tianocore/edk2-platforms/tree/master/Platform/Loongson/LoongArchQemuPkg#readme
+
+For a binary you can download it from here:
+https://debug.openadk.org/QEMU_EFI.fd
+
+Run the emulation with:
+
+ qemu-system-loongarch64 -M virt -bios QEMU_EFI.fd -append "console=ttyS0,115200" -kernel output/images/vmlinux.efi -nographic # qemu_loongarch64_defconfig
+
+The login prompt will appear in the terminal that started Qemu.
new file mode 100644
@@ -0,0 +1,27 @@
+# Architecture
+BR2_loongarch64=y
+
+# Filesystem
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_ROOTFS_INITRAMFS=y
+
+# Image
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
+
+# Linux headers same as kernel
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
+BR2_LINUX_KERNEL_DEFCONFIG="loongson3"
+BR2_LINUX_KERNEL_VMLINUX_EFI=y
+
+# Disable network scripts
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> --- v1->v2: - add me to DEVELOPERS file as requested by Thomas P. - add the missing readme.txt file requested by Thomas P. --- DEVELOPERS | 2 ++ .../patches/linux-headers/linux-headers.hash | 2 ++ .../qemu/loongarch64/patches/linux/linux.hash | 2 ++ board/qemu/loongarch64/readme.txt | 11 ++++++++ configs/qemu_loongarch64_defconfig | 27 +++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 board/qemu/loongarch64/patches/linux-headers/linux-headers.hash create mode 100644 board/qemu/loongarch64/patches/linux/linux.hash create mode 100644 board/qemu/loongarch64/readme.txt create mode 100644 configs/qemu_loongarch64_defconfig