Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2017 17:58:27 +0100
From:      Sylvain Garrigues <sylgar@gmail.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Alexey Dokuchaev <danfe@nsu.ru>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: How to use our stock armv7-RPI2 images with QEMU?
Message-ID:  <07FDE656-3DBA-4EB6-80F5-A7E25051DB37@gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

> Le 18 d=C3=A9c. 2017 =C3=A0 22:59, Warner Losh <imp@bsdimp.com> a =C3=A9cr=
it :
>=20
>> On Sat, Dec 16, 2017 at 8:32 AM, Alexey Dokuchaev <danfe@nsu.ru> wrote:
>>=20
>> Hi there,
>>=20
>> I've noticed (per qemu-system-arm -machine help) that it claims to suppor=
t
>> Raspberry Pi 2 (raspi2), so I wanted to boot one of our stock armv7-RPI2
>> images, but did not find recipe at https://wiki.freebsd.org/QemuRecipes,
>> and my FreeBSD/arm knowledge is lacking.
>>=20
>> Basically I look for a fast way to setup arm6/7 VM to do some ports work.=

>>=20
>> Could someone give me a hand here, and possibly update that wiki page?
>> (It covers arm64, but not arm).  Thanks,
>>=20
>=20
> OK. The answer is "It's complicated" and I'm not sure anybody has actually=

> done it recently.

The trick that make it work for me is to recompile qemu with one modificatio=
n: change KERNEL_LOAD_ADDR to 0x100000 instead of 0x10000 in hw/arm/boot.c

Then you can boot the GENERIC kernel with the -kernel kernel.bin option and y=
ou may attach the RPI2 snapshot to the VM with the -sd command.

You may have to type the boot root fs to mount it at the end of the kernel i=
nitialization. Just list the available partitions and adjust.=20

It works pretty well, you even have the RPI framebuffer working.=20

Cheers,
Sylvain.=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?07FDE656-3DBA-4EB6-80F5-A7E25051DB37>