id = 1849 title = "Problems with building riscv Linux using qemu on wsl2" state = "closed" created_at = "2023-08-27T13:43:24.401Z" closed_at = "2023-08-28T02:39:07.234Z" labels = [] url = "https://gitlab.com/qemu-project/qemu/-/issues/1849" host-os = "microsoft-standard-WSL2" host-arch = "n/a" qemu-version = "7.0.0" guest-os = "n/a" guest-arch = "n/a" description = """execute: `qemu-system-riscv64 -M virt -m 256M -nographic -kernel /home/ysc/test/linux-6.1.46/arch/riscv/boot/Image -drive file=rootfs.img,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -append "root=/dev/vda rw console=ttyS0"` **appear:** OpenSBI / \\_\\_ \\\\ / **_| \\_ \\_ | | | | | \\_\\_ \\__\\_ \\_ \\_\\_ | (_**\\_ | |_) || | | | | | '\\_ \\\\ / \\_ \\\\ '\\_ \\\\ \\__\\_ | \\_ \\< | | | |\\*\\*| | |_) | \\_\\_/ | | |) | |) || | \\_\\_**/| .**/ \\_\\*\\*|_| |_|**_/|\\___\\_/_**| | | |\\_| Platform Name : riscv-virtio,qemu Platform Features : medeleg Platform HART Count : 1 Platform IPI Device : aclint-mswi Platform Timer Device : aclint-mtimer @ 10000000Hz Platform Console Device : uart8250 Platform HSM Device : --- Platform Reboot Device : sifive_test Platform Shutdown Device : sifive_test Firmware Base : 0x80000000 Firmware Size : 252 KB Runtime SBI Version : 0.3 Domain0 Name : root Domain0 Boot HART : 0 Domain0 HARTs : 0\\* Domain0 Region00 : 0x0000000002000000-0x000000000200ffff (I) Domain0 Region01 : 0x0000000080000000-0x000000008003ffff () Domain0 Region02 : 0x0000000000000000-0xffffffffffffffff (R,W,X) Domain0 Next Address : 0x0000000080200000 Domain0 Next Arg1 : 0x000000008f000000 Domain0 Next Mode : S-mode Domain0 SysReset : yes Boot HART ID : 0 Boot HART Domain : root Boot HART ISA : rv64imafdcsuh Boot HART Features : scounteren,mcounteren,time Boot HART PMP Count : 16 Boot HART PMP Granularity : 4 Boot HART PMP Address Bits: 54 Boot HART MHPM Count : 0 Boot HART MIDELEG : 0x0000000000001666 Boot HART MEDELEG : 0x0000000000f0b509 When I run qemu, it's stuck here""" reproduce = """1. Build the kernel file using Linux-6.1.46 2. Use busbox to build rootfs 3. run qemu""" additional = "n/a"