Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2024 23:56:20 +0530
From:      Himanshu Chauhan <himanshu@thechauhan.dev>
To:        Mitchell Horne <mhorne@freebsd.org>
Cc:        freebsd-riscv@freebsd.org
Subject:   Re: Unable to boot custom kernel
Message-ID:  <D1B0B5A8-5194-47C7-B340-08F601137691@thechauhan.dev>
In-Reply-To: <3f4d8075-4372-46dd-9ce6-ca925c799857@freebsd.org>
References:  <632BA64E-2BF6-46F4-9375-C74E534A8F40@thechauhan.dev> <3f4d8075-4372-46dd-9ce6-ca925c799857@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 27-Feb-2024, at 11:42=E2=80=AFPM, Mitchell Horne =
<mhorne@freebsd.org> wrote:
>=20
> Can you share the commandline you are using to launch QEMU?
>=20
> Mitchell
>=20
> On 2/27/24 13:37, Himanshu Chauhan wrote:
>> Hi Everyone,
>> I am unable to boot my custom kernel from commit ID =
04440331b57(Feb22). Qemu throws the following error and exits:
>> qemu-system-riscv64: Some ROM regions are overlapping
>> These ROM regions might have been loaded by direct user request or by =
default.
>> They could be BIOS/firmware images, a guest kernel, initrd or some =
other file loaded into guest memory.
>> Check whether you intended to load all this guest code, and whether =
it has been built to load to the correct addresses.
>> The following two regions overlap (in the memory address space):
>>   <MY_BUILD_PATH>/riscv.riscv64/sys/GENERIC/kernel ELF program header =
segment 1 (addresses 0x0000000080200000 - 0x00000000807e0226)
>>   fdt (addresses 0x0000000080200000 - 0x0000000080201346)
>> I have tried with packaged Qemu as well as the latest one compiled =
from source code.
>> Any one else faced or facing this problem?
>> Thanks
>> Regards
>> Himanshu
>=20

qemu-system-riscv64 \
	-machine virt \
	-m 2048M \
	-smp 2 \
	-nographic \
    	-bios <path/to/opensbi> \
    	-kernel <path/to/freebsd/kernel> \
    	-append "vfs.root.mountfrom=3Dufs:/dev/vtbd0" \
    	-drive riscv.img,format=3Draw,id=3Dhd0 \
	-device virtio-blk-device,drive=3Dhd0

I have always been following instruction from: =
https://wiki.freebsd.org/riscv
It used to work fine earlier.


Regards
Himanshu=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1B0B5A8-5194-47C7-B340-08F601137691>