dhruvvyas90 / qemu-rpi-kernel

Qemu kernel for emulating Rpi on QEMU
2.04k stars 357 forks source link

why my pc can not come in gui (err:guest has not initialized the display (yet)) #141

Open ishangxue opened 2 years ago

ishangxue commented 2 years ago

1、My pc: 系统信息

2、I want to simulate the Raspberry Party

3、I installed QEMU

4、I am prepared file 使用文件

5、I am using the command 命令

6、Election information qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -drive 'F:\Raspberry Pi\qemu\raspberyyOS\2021-10-30-raspios-bullseye-armhf-full.img,if=none,index=0,media=disk,format=raw,id=disk0' -device "virtio-blk-pci,drive=disk0,disable-modern=on,disable-legacy=off" -net "user,hostfwd=tcp::5022-:22" -dtb F:\Raspberry Pi\qemu\raspberyyOS\versatile-pb-buster-5.4.51.dtb -kernel F:\Raspberry Pi\qemu\raspberyyOS\kernel-qemu-5.4.51-buster -append 'root=/dev/vda2 panic=1' -no-reboot

PS F:\RaspberryPi\qemu> .\qemu-system-arm -kernel .\raspberyyOS\kernel-qemu-5.10.63-bullseye -cpu arm1176 -m 256 -M versatilepb -dtb .\raspberyyOS\versatile-pb-bullseye-5.10.63.dtb -no-reboot -append “root=/dev/sda2 panic=1 rootfstype=ext4 rw” -net nic -net user,hostfwd=tcp::5022-:22 -drive file="F:\RaspberryPi\qemu\raspberyyOS\2021-10-30-raspios-bullseye-armhf-full.img",index=0,media=disk,format=raw -serial stdio vpb_sic_write: Bad register offset 0x2c Booting Linux on physical CPU 0x0 Linux version 5.10.63 (jmh205@jmh205pc) (arm-linux-gnueabihf-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 Thu Dec 16 11:31:22 GMT 2021 CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d CPU: VIPT aliasing data cache, unknown instruction cache OF: fdt: Machine model: ARM Versatile PB Memory policy: Data cache writeback Zone ranges: Normal [mem 0x0000000000000000-0x000000000fffffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000000000000-0x000000000fffffff] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff] Built 1 zonelists, mobility grouping on. Total pages: 64960 Kernel command line: root=/dev/sda2 panic=1 rootfstype=ext4 rw Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear) mem auto-init: stack:off, heap alloc:off, heap free:off Memory: 250548K/262144K available (6500K kernel code, 273K rwdata, 1608K rodata, 220K init, 171K bss, 11596K reserved, 0K cma-reserved) NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 VIC @(ptrval): id 0x00041190, vendor 0x41 FPGA IRQ chip 0 "interrupt-controller" @ (ptrval), 20 irqs, parent IRQ: 47 random: get_random_bytes called from start_kernel+0x2ac/0x4cc with crng_init=0 clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns Failed to initialize '/amba/timer@101e3000': -22 sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns Console: colour dummy device 80x30 printk: console [tty0] enabled Calibrating delay loop... 864.25 BogoMIPS (lpj=4321280) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) cgroup: Disabling memory control group subsystem CPU: Testing write buffer coherency: ok Setting up static identity map for 0x8220 - 0x827c devtmpfs: initialized VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 256 (order: -1, 3072 bytes, linear) NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations OF: amba_device_add() failed (-19) for /amba/smc@10100000 OF: amba_device_add() failed (-19) for /amba/mpmc@10110000 OF: amba_device_add() failed (-19) for /amba/sctl@101e0000 OF: amba_device_add() failed (-19) for /amba/watchdog@101e1000 OF: amba_device_add() failed (-19) for /amba/sci@101f0000 OF: amba_device_add() failed (-19) for /amba/spi@101f4000 OF: amba_device_add() failed (-19) for /amba/fpga/sci@a000 Serial: AMBA PL011 UART driver 101f1000.uart: ttyAMA0 at MMIO 0x101f1000 (irq = 28, base_baud = 0) is a PL011 rev1 printk: console [ttyAMA0] enabled 101f2000.uart: ttyAMA1 at MMIO 0x101f2000 (irq = 29, base_baud = 0) is a PL011 rev1 101f3000.uart: ttyAMA2 at MMIO 0x101f3000 (irq = 30, base_baud = 0) is a PL011 rev1 10009000.uart: ttyAMA3 at MMIO 0x10009000 (irq = 54, base_baud = 0) is a PL011 rev1 vgaarb: loaded SCSI subsystem initialized clocksource: Switched to clocksource arm,sp804 NET: Registered protocol family 2 IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear) tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear) TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear) TCP: Hash tables configured (established 2048 bind 2048) UDP hash table entries: 256 (order: 0, 4096 bytes, linear) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear) NET: Registered protocol family 1 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. PCI: CLS 0 bytes, default 32 NetWinder Floating Point Emulator V0.97 (double precision) workingset: timestamp_bits=14 max_order=16 bucket_order=2 Installing knfsd (copyright (C) 1996 okir@monad.swb.de). jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc. romfs: ROMFS MTD (C) 2007 Red Hat, Inc. 9p: Installing v9fs 9p2000 file system support Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) io scheduler mq-deadline registered io scheduler kyber registered pl061_gpio 101e4000.gpio: PL061 GPIO chip registered pl061_gpio 101e5000.gpio: PL061 GPIO chip registered pl061_gpio 101e6000.gpio: PL061 GPIO chip registered pl061_gpio 101e7000.gpio: PL061 GPIO chip registered versatile-pci 10001000.pci: host bridge /amba/pci@10001000 ranges: versatile-pci 10001000.pci: IO 0x0043000000..0x004300ffff -> 0x0000000000 versatile-pci 10001000.pci: MEM 0x0050000000..0x005fffffff -> 0x0050000000 versatile-pci 10001000.pci: MEM 0x0060000000..0x006fffffff -> 0x0060000000 versatile-pci 10001000.pci: PCI core found (slot 11) versatile-pci 10001000.pci: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff pref] pci 0000:00:0c.0: [1000:0012] type 00 class 0x010000 pci 0000:00:0c.0: reg 0x10: [io 0x0000-0x00ff] pci 0000:00:0c.0: reg 0x14: [mem 0x00000000-0x000003ff] pci 0000:00:0c.0: reg 0x18: [mem 0x00000000-0x00001fff] PCI: bus0: Fast back to back transfers disabled pci 0000:00:0c.0: BAR 2: assigned [mem 0x50000000-0x50001fff] pci 0000:00:0c.0: BAR 1: assigned [mem 0x50002000-0x500023ff] pci 0000:00:0c.0: BAR 0: assigned [io 0x1000-0x10ff] versatile-tft-panel 10000000.sysreg:display@0: no panel detected drm-clcd-pl111 10120000.display: set up callbacks for Versatile PL110 brd: module loaded loop: module loaded sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103) sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 66 sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking sym0: SCSI BUS has been reset. scsi host0: sym-2.2.3 scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5 scsi target0:0:0: tagged command queuing enabled, command queue depth 16. scsi target0:0:0: Beginning Domain Validation scsi target0:0:0: Domain Validation skipping write tests scsi target0:0:0: Ending Domain Validation scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5 scsi target0:0:2: tagged command queuing enabled, command queue depth 16. scsi target0:0:2: Beginning Domain Validation random: fast init done scsi target0:0:2: Domain Validation skipping write tests scsi target0:0:2: Ending Domain Validation sr 0:0:2:0: Power-on or device reset occurred sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray cdrom: Uniform CD-ROM driver Revision: 3.20 sd 0:0:0:0: Power-on or device reset occurred sd 0:0:0:0: [sda] 18096128 512-byte logical blocks: (9.27 GB/8.63 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA physmap-flash 34000000.flash: versatile/realview flash protection physmap-flash 34000000.flash: physmap platform flash device: [mem 0x34000000-0x37ffffff] 34000000.flash: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000 Intel/Sharp Extended Query Table at 0x0031 Using buffer write method sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI disk tun: Universal TUN/TAP device driver, 1.6 smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre nico@fluxnic.net smc91x 10010000.net eth0: SMC91C11xFD (rev 1) at (ptrval) IRQ 41

smc91x 10010000.net eth0: Ethernet addr: 52:54:00:12:34:56 rtc-ds1307 0-0068: registered as rtc0 rtc-ds1307 0-0068: setting system clock to 2021-12-24T12:17:18 UTC (1640348238) versatile reboot driver registered device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel@redhat.com mmci-pl18x fpga:05: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 59,60 (pio) mmci-pl18x fpga:0b: mmc1: PL181 manf 41 rev0 at 0x1000b000 irq 49,50 (pio) leds-syscon 10000000.core-module:led@08.0: registered LED (null) leds-syscon 10000000.core-module:led@08.1: registered LED (null) leds-syscon 10000000.core-module:led@08.2: registered LED (null) leds-syscon 10000000.core-module:led@08.3: registered LED (null) leds-syscon 10000000.core-module:led@08.4: registered LED (null) leds-syscon 10000000.core-module:led@08.5: registered LED (null) leds-syscon 10000000.core-module:led@08.6: registered LED (null) leds-syscon 10000000.core-module:led@08.7: registered LED (null) ledtrig-cpu: registered to indicate activity on CPUs IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP) input: AT Raw Set 2 keyboard as /devices/platform/amba/amba:fpga/10006000.kmi/serio0/input/input0 IPVS: Connection hash table configured (size=4096, memory=32Kbytes) IPVS: ipvs loaded. IPVS: [rr] scheduler registered. IPVS: [wrr] scheduler registered. IPVS: [lc] scheduler registered. IPVS: [wlc] scheduler registered. IPVS: [fo] scheduler registered. IPVS: [ovf] scheduler registered. IPVS: [lblc] scheduler registered. IPVS: [lblcr] scheduler registered. IPVS: [dh] scheduler registered. IPVS: [sh] scheduler registered. IPVS: [mh] scheduler registered. IPVS: [sed] scheduler registered. IPVS: [nq] scheduler registered. ipip: IPv4 and MPLS over IPv4 tunneling driver ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully NET: Registered protocol family 17 Bridge firewalling registered 8021q: 802.1Q VLAN Support v1.8 9pnet: Installing 9P2000 support drm-clcd-pl111 10120000.display: set up callbacks for Versatile PL110 drm-clcd-pl111 10120000.display: set up callbacks for Versatile PL110 uart-pl011 101f1000.uart: no DMA platform data input: ImExPS/2 Generic Explorer Mouse as /devices/platform/amba/amba:fpga/10007000.kmi/serio1/input/input2 drm-clcd-pl111 10120000.display: set up callbacks for Versatile PL110 EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) VFS: Mounted root (ext4 filesystem) on device 8:2. devtmpfs: mounted Freeing unused kernel memory: 220K Kernel memory protection not selected by kernel config. Run /sbin/init as init process systemd[1]: Failed to look up module alias 'autofs4': Function not implemented systemd[1]: systemd 247.3-6+rpi1 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified) systemd[1]: Detected architecture arm.

Welcome to Raspbian GNU/Linux 11 (bullseye)!

systemd[1]: Set hostname to . systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed. systemd[1]: Queued start job for default target Graphical Interface. random: systemd: uninitialized urandom read (16 bytes read) systemd[1]: system-getty.slice: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling. systemd[1]: (This warning is only shown for the first unit using IP firewalling.) systemd[1]: Created slice system-getty.slice. [ OK ] Created slice system-getty.slice. random: systemd: uninitialized urandom read (16 bytes read) systemd[1]: Created slice system-modprobe.slice. [ OK ] Created slice system-modprobe.slice. random: systemd: uninitialized urandom read (16 bytes read) systemd[1]: Created slice system-serial\x2dgetty.slice. [ OK ] Created slice system-serial\x2dgetty.slice. systemd[1]: Created slice system-systemd\x2dfsck.slice. [ OK ] Created slice system-systemd\x2dfsck.slice. systemd[1]: Created slice User and Session Slice. [ OK ] Created slice User and Session Slice. systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ OK ] Started Forward Password R鈥ests to Wall Directory Watch. systemd[1]: Condition check resulted in Arbitrary Executable File Formats File System Automount Point being skipped. systemd[1]: Reached target Slices. [ OK ] Reached target Slices. systemd[1]: Reached target Swap. [ OK ] Reached target Swap. systemd[1]: Listening on Syslog Socket. [ OK ] Listening on Syslog Socket. systemd[1]: Listening on fsck to fsckd communication Socket. [ OK ] Listening on fsck to fsckd communication Socket. systemd[1]: Listening on initctl Compatibility Named Pipe. [ OK ] Listening on initctl Compatibility Named Pipe. systemd[1]: Condition check resulted in Journal Audit Socket being skipped. systemd[1]: Listening on Journal Socket (/dev/log). [ OK ] Listening on Journal Socket (/dev/log). systemd[1]: Listening on Journal Socket. [ OK ] Listening on Journal Socket. systemd[1]: Listening on udev Control Socket. [ OK ] Listening on udev Control Socket. systemd[1]: Listening on udev Kernel Socket. [ OK ] Listening on udev Kernel Socket. systemd[1]: Condition check resulted in Huge Pages File System being skipped. systemd[1]: Mounting POSIX Message Queue File System... Mounting POSIX Message Queue File System... systemd[1]: Mounting RPC Pipe File System... Mounting RPC Pipe File System... systemd[1]: Mounting Kernel Debug File System... Mounting Kernel Debug File System... systemd[1]: Condition check resulted in Kernel Trace File System being skipped. systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped. systemd[1]: Starting Restore / save the current clock... Starting Restore / save the current clock... systemd[1]: Starting Set the console keyboard layout... Starting Set the console keyboard layout... systemd[1]: Condition check resulted in Create list of static device nodes for the current kernel being skipped. systemd[1]: Starting Load Kernel Module configfs... Starting Load Kernel Module configfs... systemd[1]: Starting Load Kernel Module drm... Starting Load Kernel Module drm... systemd[1]: Starting Load Kernel Module fuse... Starting Load Kernel Module fuse... systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped. systemd[1]: Condition check resulted in File System Check on Root Device being skipped. systemd[1]: Starting Journal Service... Starting Journal Service... systemd[1]: Starting Load Kernel Modules... Starting Load Kernel Modules... systemd[1]: Starting Remount Root and Kernel File Systems... Starting Remount Root and Kernel File Systems... systemd[1]: Starting Coldplug All udev Devices... Starting Coldplug All udev Devices... systemd[1]: Mounted POSIX Message Queue File System. [ OK ] Mounted POSIX Message Queue File System. systemd[1]: Mounted RPC Pipe File System. [ OK ] Mounted RPC Pipe File System. systemd[1]: Mounted Kernel Debug File System. [ OK ] Mounted Kernel Debug File System. systemd[1]: modprobe@configfs.service: Succeeded. systemd[1]: Finished Load Kernel Module configfs. [ OK ] Finished Load Kernel Module configfs. systemd[1]: Finished Restore / save the current clock. [ OK ] Finished Restore / save the current clock. systemd[1]: modprobe@drm.service: Succeeded. systemd[1]: Finished Load Kernel Module drm. [ OK ] Finished Load Kernel Module drm. systemd[1]: modprobe@fuse.service: Succeeded. systemd[1]: Finished Load Kernel Module fuse. [ OK ] Finished Load Kernel Module fuse. systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'. systemd[1]: Failed to start Load Kernel Modules. [FAILED] Failed to start Load Kernel Modules. See 'systemctl status systemd-modules-load.service' for details. systemd[1]: Condition check resulted in FUSE Control File System being skipped. systemd[1]: Condition check resulted in Kernel Configuration File System being skipped. systemd[1]: Starting Apply Kernel Variables... Starting Apply Kernel Variables... [ OK ] Finished Apply Kernel Variables. [ OK ] Finished Remount Root and Kernel File Systems. Starting Load/Save Random Seed... Starting Create System Users... [ OK ] Finished Load/Save Random Seed. [ OK ] Started Journal Service. Starting Flush Journal to Persistent Storage... [ OK ] Finished Create System Users. Starting Create Static Device Nodes in /dev... [ OK ] Finished Create Static Device Nodes in /dev. Starting Rule-based Manage鈥or Device Events and Files... [ OK ] Finished Flush Journal to Persistent Storage. [ OK ] Finished Set the console keyboard layout. [ OK ] Reached target Local File Systems (Pre). [ OK ] Finished Coldplug All udev Devices. Starting Helper to synchronize boot up for ifupdown... [ OK ] Finished Helper to synchronize boot up for ifupdown. [ OK ] Started Rule-based Manager for Device Events and Files. Starting Show Plymouth Boot Screen... [ OK ] Started Show Plymouth Boot Screen. [ OK ] Started Forward Password R鈥 to Plymouth Directory Watch. [ OK ] Reached target Local Encrypted Volumes. [ OK ] Found device /dev/ttyAMA0. [ OK ] Found device QEMU_HARDDISK boot. Starting File System Check鈥sk/by-partuuid/ceb251fe-01... [ OK ] Started File System Check Daemon to report status. [ OK ] Finished File System Check鈥?/disk/by-partuuid/ceb251fe-01. Mounting /boot... [ OK ] Mounted /boot. [ OK ] Reached target Local File Systems. Starting Set console font and keymap... Starting Raise network interfaces... Starting Preprocess NFS configuration... Starting Tell Plymouth To Write Out Runtime Data... Starting Create Volatile Files and Directories... [ OK ] Finished Set console font and keymap. [ OK ] Finished Preprocess NFS configuration. [ OK ] Finished Tell Plymouth To Write Out Runtime Data. [ OK ] Reached target NFS client services. [ OK ] Reached target Remote File Systems (Pre). [ OK ] Reached target Remote File Systems. [ OK ] Finished Create Volatile Files and Directories. Starting Network Time Synchronization... Starting Update UTMP about System Boot/Shutdown... [ OK ] Finished Update UTMP about System Boot/Shutdown. [ OK ] Finished Raise network interfaces. [ OK ] Started Network Time Synchronization. [ OK ] Reached target System Initialization. [ OK ] Started CUPS Scheduler. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Reached target Paths. [ OK ] Reached target System Time Set. [ OK ] Reached target System Time Synchronized. [ OK ] Started Daily apt download activities. [ OK ] Started Daily apt upgrade and clean activities. [ OK ] Started Periodic ext4 Onli鈥ta Check for All Filesystems. [ OK ] Started Discard unused blocks once a week. [ OK ] Started Daily rotation of log files. [ OK ] Started Daily man-db regeneration. [ OK ] Reached target Timers. [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Listening on CUPS Scheduler. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Listening on Erlang Port Mapper Daemon Activation Socket. [ OK ] Listening on triggerhappy.socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting Avahi mDNS/DNS-SD Stack... [ OK ] Started Regular background program processing daemon. [ OK ] Started D-Bus System Message Bus. Starting dphys-swapfile - 鈥nt, and delete a swap file... Starting Remove Stale Onli鈥4 Metadata Check Snapshots... Starting Check for glamor... Starting Check for v3d driver... Starting Authorization Manager... Starting DHCP Client Daemon... Starting LSB: Switch to on鈥less shift key is pressed)... Starting LSB: rng-tools (Debian variant)... Starting Check for Raspberry Pi EEPROM updates... Starting System Logging Service... Starting User Login Management... Starting triggerhappy global hotkey daemon... Starting Disk Manager... Starting WPA supplicant... [ OK ] Started triggerhappy global hotkey daemon. [ OK ] Finished Check for glamor. [ OK ] Finished Check for v3d driver. [ OK ] Finished Check for Raspberry Pi EEPROM updates. [ OK ] Started System Logging Service. [ OK ] Started DHCP Client Daemon. [ OK ] Finished dphys-swapfile - 鈥ount, and delete a swap file. [ OK ] Started Avahi mDNS/DNS-SD Stack. [ OK ] Started WPA supplicant. [ OK ] Started Authorization Manager. [ OK ] Reached target Network. Starting Modem Manager... Starting CUPS Scheduler... [ OK ] Started Erlang Port Mapper Daemon. Starting /etc/rc.local Compatibility... Starting Permit User Sessions... [ OK ] Started LSB: Switch to ond鈥?(unless shift key is pressed). [ OK ] Started /etc/rc.local Compatibility. [ OK ] Started User Login Management. [ OK ] Started LSB: rng-tools (Debian variant). [ OK ] Finished Permit User Sessions. Starting Light Display Manager... Starting Hold until boot process finishes up... [ OK ] Started CUPS Scheduler. [ OK ] Started Make remote CUPS printers available locally.

Raspbian GNU/Linux 11 raspberrypi ttyAMA0

raspberrypi login: pi Password: Linux raspberrypi 5.10.63 #1 Thu Dec 16 11:31:22 GMT 2021 armv6l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Dec 24 12:18:10 GMT 2021 on tty1 pi@raspberrypi:~$

7、qemu information 提示

8、What should I do to enter the desktop?

dhruvvyas90 commented 2 years ago

Hello, you can try native emulation (instead of using versatilepb) using Qemu's raspi2/3 machine and see if it works.

MrMan314 commented 2 years ago

Try using the 5.4.x kernels, as the 5.10.x kernels (from my experience) do not display, and only print to serial.
The native emulations have no keyboard or mouse support, so you will still have to use serial only.

MrMan314 commented 2 years ago

Additionally, using the versatilepb emulation with GUI will only work with the older versions (I have tested the 3.x kernels with wheezy + LXQT). The newer versions of Raspberry Pi OS don't seem to boot into a GUI due to the limitations on the memory and processing power.

dhruvvyas90 commented 2 years ago

@ishangxue : Can you try the suggestions by MrMan314 ? Thanks.

realnc commented 2 years ago

I can't get video to work either. I followed the instructions to the letter, but nothing shows up. I tried both the latest bullseye OS image (2022-04-04-raspios-bullseye-arm64.img) as well as the legacy one (2022-04-04-raspios-buster-armhf.img). I tried both versatilepb and raspi3b.

Example:

qemu-system-aarch64 \
    -M raspi3b \
    -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" \
    -kernel native-kernel/kernel8.img \
    -dtb native-kernel/bcm2710-rpi-3-b-plus.dtb \
    -m 1G \
    -smp 4 \
    -serial stdio \
    -usb -device usb-mouse -device usb-kbd \
    -sd 2022-04-04-raspios-buster-armhf.img

This prints the boot process on the terminal and it gets to the raspberrypi login: prompt. But the qemu window is completely black.

Is a video device even emulated?

realnc commented 2 years ago

Well, apparently you can't download the image from the site the README.md links to (https://www.raspberrypi.org/downloads/raspbian/). It won't work.

I had to download this instead (found on another guide):

https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-01-12/2021-01-11-raspios-buster-armhf.zip

This one worked right away with native emulation:

image

It would probably be a good idea to link to a working image directly, rather than to the RPi OS download page which only provides downloads for images that don't work anymore.

winexe0 commented 11 months ago

Additionally, using the versatilepb emulation with GUI will only work with the older versions (I have tested the 3.x kernels with wheezy + LXQT). The newer versions of Raspberry Pi OS don't seem to boot into a GUI due to the limitations on the memory and processing power.

The latest version of Raspberry Pi OS Bookworm starts the GUI perfectly fine in versatilepb, which makes sense because the ARM1176 CPU we emulate in QEMU is the same CPU in the Raspberry Pi 1 and Zero, which Raspberry Pi OS Bookworm runs perfectly fine on. image