qemu-discuss
[Top][All Lists]
Advanced

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

Running RISCV linux on qemu


From: Swedha R
Subject: Running RISCV linux on qemu
Date: Thu, 21 Sep 2023 19:27:11 +0530

Hi,
I want to run riscv64 linux on top of qemu with the machine model sifive_u.
I had a preinstalled server ubuntu-23.04.img and prebuilt u-boot image.
And in the qemu website itself they mentioned there is no PCI -bus support or virtio-bus support for sifive_u board. 

when I ran this bash script with the following qemu commands,
U_BOOT=./U-boot
QEMU=/usr/local/bin/qemu-system-riscv64
IMAGE=./ubuntu-23.04.img


$QEMU   \
     -machine sifive_u  \
     -nographic \
     -m 8192 -smp 5     \
     -kernel $U_BOOT    \
     -drive file=./ubuntu-23.04.img,format=raw,if=none


It's not booting the ubuntu image. Upto the following message is booting
OpenSBI v1.2
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : SiFive HiFive Unleashed A00
Platform Features         : medeleg
Platform HART Count       : 5
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 1000000Hz
Platform Console Device   : sifive_uart
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : gpio-restart
Platform Shutdown Device  : ---
Firmware Base             : 0x80000000
Firmware Size             : 244 KB
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 3
Domain0 HARTs             : 0*,1*,2*,3*,4*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008003ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x00000000bfe00000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 3
Boot HART Domain          : root
Boot HART Priv Version    : v1.10
Boot HART Base ISA        : rv64imafdc
Boot HART ISA Extensions  : none
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count      : 0
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2023.07-rc2 (May 16 2023 - 12:25:28 +0530)

CPU:   rv64imafdc_zicsr_zifencei
Model: SiFive HiFive Unleashed A00
DRAM:  8 GiB
Core:  17 devices, 9 uclasses, devicetree: board
Loading Environment from nowhere... OK
In:    serial@10010000
Out:   serial@10010000
Err:   serial@10010000
Net:   No ethernet found.
Working FDT set to ff72f430
Hit any key to stop autoboot:  0

Device 0: unknown device
scanning bus for devices...

Device 0: unknown device
No ethernet found.
No ethernet found.

Please guide me on this on how to make it for sifive_u machine model



Thanks in advance

Regards,
Swedha 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]