Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2022 06:30:56 +0200
From:      "lars.sonchocky-helldorf@hamburg.de" <lars.sonchocky-helldorf@hamburg.de>
To:        Mitchell Horne <mhorne@FreeBSD.org>
Cc:        "freebsd-riscv@freebsd.org" <freebsd-riscv@FreeBSD.org>
Subject:   [Solved] was: Re: Problem running FreeBSD/RISC-V in QEMU
Message-ID:  <C24130B5-27EA-4D12-AECF-B0EC6C2C0B4A@hamburg.de>
In-Reply-To: <40a8ac1a-ad1c-9e03-a66b-4b78b23f0d4a@FreeBSD.org>
References:  <2FA6ED5C-4269-4033-BAF0-466FDC7EEA1C@hamburg.de> <40a8ac1a-ad1c-9e03-a66b-4b78b23f0d4a@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
this old snapshot works! Fine!

root@freebsd:~ # uname -a
FreeBSD freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #0 =
main-n255198-1907e1c07c3: Thu May  5 06:03:11 UTC 2022     =
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/riscv.riscv64/sys/GENERIC =
riscv
root@freebsd:~ #=20



run on macOS 11.6.5:

MBP15:~ lars$ uname -a
Darwin MBP15.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Feb 22 =
21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64 x86_64
MBP15:~ lars$=20

using this command:

qemu-system-riscv64 \
    -machine virt \
    -smp 2 \
    -m 2G \
    -nographic \
    -bios /Volumes/Data/Projects/RISC-V/FreeBSD/fw_jump.elf \
    -kernel /Volumes/Data/Projects/RISC-V/FreeBSD/u-boot.bin \
    -drive =
file=3D/Volumes/Data/Projects/RISC-V/FreeBSD/FreeBSD-14.0-CURRENT-riscv-ri=
scv64-20220505-1907e1c07c3-255198.raw,format=3Draw,id=3Dhd0 \
    -device virtio-blk-device,drive=3Dhd0 \
    -device virtio-net-device,netdev=3Dnet0 \
    -netdev user,id=3Dnet0,ipv6=3Doff,hostfwd=3Dtcp::8022-:22


Thanks a lot!

	Lars

> Am 20.05.2022 um 22:44 schrieb Mitchell Horne <mhorne@FreeBSD.org>:
>=20
> On 2022-05-20 8:36 a.m., lars.sonchocky-helldorf@hamburg.de wrote:
>> Hi everybody,
>> I am trying to run FreeBSD/RISC-V in QEMU.
>> For that purpose I have installed FreeBSD/amd64 inside Virtual Box on =
a macOS machine:
>> FreeBSD FreeBSD14 14.0-CURRENT FreeBSD 14.0-CURRENT #0 =
main-n255696-716fd348e01: Thu May 19 08:29:12 UTC 2022     =
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC =
amd64
>> and then followed those instructions:
>> https://wiki.freebsd.org/riscv#Quick_Start
>> The boot process is initialized but then however I get repeatedly:
>> failed to allocate staging area: 9
>> here is the part where it fails, truncated, since the above message =
is repeated endlessly:
>> Loading kernel...
>> /boot/kernel/kernel text=3D0x5a5e88 text=3D0x172c34 data=3D0xf8350 =
data=3D0x1eac+0x273b9c 0x8+0x1efc360+0x8+0xf28d3
>> Loading configured modules...
>> can't find '/etc/hostid'
>> can't find '/boot/entropy'
>> Using DTB provided by EFI at 0x87efb000.
>> Kernel entry at 0xf660002e...
>> Kernel args: (null)
>> failed to allocate staging area: 9
>> failed to allocate staging area: 9
>> What is going wrong here?
>=20
> Seems to be a bug made visible by the recent upgrade of LLVM/clang. It =
was reported here:
>=20
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264021
>=20
> If you grab the snapshot from 2 weeks ago, it might not exhibit this =
problem. Otherwise, it looks like a fix is in progress.
>=20
> =
https://download.freebsd.org/snapshots/VM-IMAGES/14.0-CURRENT/riscv64/2022=
0505/
>=20
> Cheers,
> Mitchell
>=20
>> Thanks in advance and if you need more information please let me =
know!
>> Kind regards,
>> 	Lars




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C24130B5-27EA-4D12-AECF-B0EC6C2C0B4A>