[Top][All Lists]

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

Re: load a freebsd derived kernel on Qemu-system-arm

From: Peter Maydell
Subject: Re: load a freebsd derived kernel on Qemu-system-arm
Date: Thu, 20 Feb 2020 13:55:29 +0000

On Thu, 20 Feb 2020 at 10:52, Kamal R. Prasad <address@hidden> wrote:
>  when I try to load a freebsd kernel onto Qemu running on my Mac, I get this 
> error:-
> # qemu-system-arm -machine versatileab -kernel ./kernel

First step with any "this doesn't work on Mac" bug is
"does this repro on a Linux host?". Very few QEMU developers
use Macs.

Secondly, what QEMU version are you using? Does this repro
on the most recent version?

> qemu-system-arm: GLib: g_mapped_file_unref: assertion 'file != NULL' failed
> Can someone tell me what I am missing? The code is built for arm but online 
> linux, freebsd build does not generate a vmlinuz or ignited file. The target 
> is a cortex -arm quad core board (from Broadcom).

This explanation doesn't match up with your command line.
The 'versatileab' machine is a very old development board
which uses a single-core ARM926 CPU. As a general principle,
all Arm boards are different in significant ways. It is
not possible to run a kernel image on a particular board
unless that kernel was built to specifically include
support for that board. So you need to look at what boards
QEMU has support for, and build a FreeBSD kernel for one
of those, and then use the right -machine argument to
get QEMU to use that board model. (In particular, "I
got this kernel image file from some real hardware
embedded system and want to run it on QEMU instead" is
not going to work in 99% of cases, because QEMU will not
have a model of whatever that specific embedded hardware is.)

Finally, the -kernel argument is intended to boot a Linux
kernel, and uses the documented Arm kernel booting ABI.
I don't know whether FreeBSD kernel images are intended
to boot this way; if not, then you may find they don't
boot correctly. If I were you, I would start by seeing
if there are any online tutorials on how to build and
run a FreeBSD kernel on an Arm QEMU platform.

-- PMM

reply via email to

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