Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2017 14:36:18 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Sylvain Garrigues <sylgar@gmail.com>
Cc:        Alexey Dokuchaev <danfe@nsu.ru>, freebsd-arm@freebsd.org
Subject:   Re: How to use our stock armv7-RPI2 images with QEMU?
Message-ID:  <CANCZdfqmcce%2B%2B=4dbQ07%2B7pGrryE00hfzuPeu%2BAqaa65ZBLznQ@mail.gmail.com>
In-Reply-To: <07FDE656-3DBA-4EB6-80F5-A7E25051DB37@gmail.com>
References:  <07FDE656-3DBA-4EB6-80F5-A7E25051DB37@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 19, 2017 9:58 AM, "Sylvain Garrigues" <sylgar@gmail.com> wrote:

Hello,

> Le 18 d=C3=A9c. 2017 =C3=A0 22:59, Warner Losh <imp@bsdimp.com> a =C3=A9c=
rit :
>
>> On Sat, Dec 16, 2017 at 8:32 AM, Alexey Dokuchaev <danfe@nsu.ru> wrote:
>>
>> Hi there,
>>
>> I've noticed (per qemu-system-arm -machine help) that it claims to
support
>> 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.
>>
>> Basically I look for a fast way to setup arm6/7 VM to do some ports work=
.
>>
>> Could someone give me a hand here, and possibly update that wiki page?
>> (It covers arm64, but not arm).  Thanks,
>>
>
> OK. The answer is "It's complicated" and I'm not sure anybody has actuall=
y
> done it recently.

The trick that make it work for me is to recompile qemu with one
modification: 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
you 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
initialization. Just list the available partitions and adjust.

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


Any chance the uboot image could be used for the kernel?

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqmcce%2B%2B=4dbQ07%2B7pGrryE00hfzuPeu%2BAqaa65ZBLznQ>