qemu-discuss
[Top][All Lists]
Advanced

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

On emulating Raspberry Pi


From: Дилян Палаузов
Subject: On emulating Raspberry Pi
Date: Tue, 26 Jan 2021 00:08:29 +0200
User-agent: Evolution 3.39.2

Hello,

I download the Rapsberry OS
image 
https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-01-12/2021-01-11-raspios-buster-armhf.zip

the kernel kernel-qemu-4.19.50-buster and versatile-pb-buster.dtb
from https://github.com/dhruvvyas90/qemu-rpi-kernel and run with
version 5.2.0:


$ qemu-system-arm -dtb ./versatile-pb-buster.dtb -kernel ./kernel-qemu-
4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -append
"root=/dev/sda2 rootfstype=ext4 rw" -drive driver=raw,file=./2021-01-
11-raspios-buster-armhf.img,index=0,media=disk -serial stdio    


1. On the running system I type “sudo poweroff”.  Why do I get this
error, instead of clean shutdown:

[  OK  ] Removed slice system-systemd\x2dfsck.slice.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Started Power-Off.
[  OK  ] Reached target Power-Off.
reboot: System halted
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000

CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.19.50+ #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001d230>] (unwind_backtrace) from [<c00190ac>] (show_stack+0x10/0x14)
[<c00190ac>] (show_stack) from [<c0025f14>] (panic+0xc8/0x240)
[<c0025f14>] (panic) from [<c0028444>] (do_exit+0x950/0x9fc)
[<c0028444>] (do_exit) from [<c0042440>] (sys_reboot+0x1a0/0x1f0)
[<c0042440>] (sys_reboot) from [<c0009000>] (ret_fast_syscall+0x0/0x54)
Exception stack(0xcf823fa8 to 0xcf823ff0)
3fa0:                   00000000 00000000 fee1dead 28121969 4321fedc 26f8ad00
3fc0: 00000000 00000000 00000000 00000058 00000fff be905c08 00000000 00424b80
3fe0: 00436e3c be905b88 004214a8 b6e54a38
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
 ]---


2. The raspberry Pi OS image has two partitions, fdisk -l

2021-01-11-raspios-buster-armhf.img1        8192  532479   524288  256M  c W95 
FAT32 (LBA)
2021-01-11-raspios-buster-armhf.img2      532480 7741439  7208960  3.4G 83 Linux


so I can mount the first one it with

sudo mount -o offset=4194304 -t vfat 2021-01-11-raspios-buster-armhf.img disk/

It contains: $ ls

bcm2708-rpi-b.dtb*       bcm2709-rpi-2-b.dtb*       bcm2711-rpi-4-b.dtb*  
fixup4cd.dat*  fixup_db.dat*  kernel.img*        start4x.elf*
bcm2708-rpi-b-plus.dtb*  bcm2710-rpi-2-b.dtb*       bcm2711-rpi-cm4.dtb*  
fixup4.dat*    fixup_x.dat*   LICENCE.broadcom*  start_cd.elf*
bcm2708-rpi-b-rev1.dtb*  bcm2710-rpi-3-b.dtb*       bootcode.bin*         
fixup4db.dat*  issue.txt*     overlays/          start_db.elf*
bcm2708-rpi-cm.dtb*      bcm2710-rpi-3-b-plus.dtb*  cmdline.txt*          
fixup4x.dat*   kernel7.img*   start4cd.elf*      start.elf*
bcm2708-rpi-zero.dtb*    bcm2710-rpi-cm3.dtb*       config.txt*           
fixup_cd.dat*  kernel7l.img*  start4db.elf*      start_x.elf*
bcm2708-rpi-zero-w.dtb*  bcm2711-rpi-400.dtb*       COPYING.linux*        
fixup.dat*     kernel8.img*   start4.elf*


Why does the internet say, that the bundled in the raw image kernels cannot be 
used with Qemu, but the one I have written above must be used?

Can youn give me a suggestion, how to run Qemu 5.2, so that it emulates 
Rasberry 3A+, Raspberry 3B, and Rapsberry 3B+ with WiFi card?

Thanks
  Дилян




reply via email to

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