On Tue, 14 Nov 2017 15:46:40 +0000, Theo wrote:
> Mark Moss wrote:
>> Is it possible to emulate raspberry pi 1 with qemu without changing the
>> qemu source code?
>>
>> Example:
>>
>> qemu-system-arm -kernel raspi1/kernel7.img -M raspi2 -append "rw
>> earlyprintk loglevel=8 bcm2708.boardrev=0xd dwc_otg.lpm_enable=0 root=/
>> dev/mmcblk0p2" -sd devuan_jessie_1.0.0_armel_raspi1.img -dtb raspi1/
>> bcm2708-rpi-b.dtb
>>
>> doesn't work.
>
> Define "doesn't work".
>
> What version of qemu are you using and where are you getting it from?
>
> Theo
"doesn't work" means there is no response (boot messages) besides heavy
host cpu consumption. qemu window remains black.
I tried the latest windows installer from www.qemu.org "qemu-w64-
setup-20171108.exe" which installs qemu v2.10.90. That again seems to come
from http://repo.or.cz.
This version has a promising machine option "-M raspi" instead of the
afore mentioned "-M raspi2". Sadly this version stops with the Error
"ERROR:/home/stefan/src/qemu/repo.or.cz/qemu/ar7/qom/
object.c:176:type_get_parent: assertionfailed: (type->parent_type !=
NULL).
I also tried the master branch (qemu 2.11.0-rc1) from git.qemu.org/
qemu.git on archlinux. This version has the option "-M raspi2" only which
"doesn't work" for raspi1 images (black screen, no response, no
"decrompressing initrd/kernel image").
With the raspi2 image devuan_jessie_1.0.0_armhl_raspi2.img and
corresponding "kernel7.img" qemu shows some boot messages (until init is
killed) using qemu command line option "-dtb bcm2709-rpi-2-b.dtb" instead
of "-dtb bcm2708-rpi-b.dtb"
qemu/hw/arm/raspi.c from git.qemu.org/qemu.git seems to differentiate
between raspi 1 and 2 though:
static const int raspi_boardid[] = {[1] = 0xc42, [2] = 0xc43};
This master branch from git.qemu.org/qemu.git has a function
"raspi2_machine_init" in hw/arm/raspi.c but lacks a "raspi_machine_init"
as in https://patchwork.kernel.org/patch/9670983/.
My hope was that it is simply a question of finding the right command line
options. But the code suggests it is not (yet/anymore) implemented.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|