Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU for raspberry Pi always reboot #31

Closed
t-sharabi opened this issue Apr 6, 2017 · 13 comments
Closed

QEMU for raspberry Pi always reboot #31

t-sharabi opened this issue Apr 6, 2017 · 13 comments

Comments

@t-sharabi
Copy link

I NEED HELP

**I have done everything wright....i think, but I am stuck in rebooting

here is the output and i did put panic value to 100 for delay**

WARNING: Image format was not specified for '2016-11-25-raspbian-jessie-lite.img' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.26+ (amit@penguin) (gcc version 6.2.1 20161119 (Debian 6.2.1-4) ) #2 Thu Dec 1 12:27:44 IST 2016
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
CPU: VIPT aliasing data cache, unknown instruction cache
Machine: ARM-Versatile PB
Memory policy: Data cache writeback
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
Kernel command line: root=/dev/sda2 panic=100 rootfstype=ext4 rw console=ttyAMA0,115200
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 253716K/262144K available (4266K kernel code, 56K rwdata, 1008K rodata, 180K init, 139K bss, 8428K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc052ecf0 (5276 kB)
.init : 0xc052f000 - 0xc055c000 ( 180 kB)
.data : 0xc055c000 - 0xc056a120 ( 57 kB)
.bss : 0xc059ae70 - 0xc05bdb78 ( 140 kB)
NR_IRQS:224
VIC @f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "SIC" @ f1003000, 13 irqs, parent IRQ: 63
clocksource: timer3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Console: colour dummy device 80x30
Calibrating delay loop... 400.58 BogoMIPS (lpj=2002944)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Disabling cpuset control group subsystem
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
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
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45, base_baud = 0) is a PL011 rev1
dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46, base_baud = 0) is a PL011 rev1
fpga:09: ttyAMA3 at MMIO 0x10009000 (irq = 70, base_baud = 0) is a PL011 rev1
PCI core found (slot 11)
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff pref]
pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
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]
vgaarb: loaded
SCSI subsystem initialized
clocksource: Switched to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
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.
NetWinder Floating Point Emulator V0.97 (double precision)
futex hash table entries: 256 (order: -1, 3072 bytes)
Installing knfsd (copyright (C) 1996 [email protected]).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pl061_gpio dev:e4: PL061 GPIO chip @0x101e4000 registered
pl061_gpio dev:e5: PL061 GPIO chip @0x101e5000 registered
pl061_gpio dev:e6: PL061 GPIO chip @0x101e6000 registered
pl061_gpio dev:e7: PL061 GPIO chip @0x101e7000 registered
clcd-pl11x dev:20: PL110 rev0 at 0x10120000
clcd-pl11x dev:20: Versatile hardware, VGA display
Console: switching to colour frame buffer device 80x30
brd: module loaded
sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym0: SCSI BUS has been reset.
scsi host0: sym-2.2.3
sym0: unknown interrupt(s) ignored, ISTAT=0x5 DSTAT=0x80 SIST=0x0
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
scsi target0:0:2: Domain Validation skipping write tests
scsi target0:0:2: Ending Domain Validation
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: [sda] 2715648 512-byte logical blocks: (1.39 GB/1.29 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 platform flash device: 04000000 at 34000000
physmap-flash.0: 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
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre [email protected]
smc91x smc91x.0 eth0: SMC91C11xFD (rev 1) at d0a68000 IRQ 57
[nowait]
smc91x smc91x.0 eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
ledtrig-cpu: registered to indicate activity on CPUs
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (3964 buckets, 15856 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
Bridge firewalling registered
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/fpga:07/serio1/input/input2
EXT4-fs (sda2): recovery complete
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: 180K (c052f000 - c055c000)
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

CPU: 0 PID: 1 Comm: init Not tainted 4.4.26+ #2
Hardware name: ARM-Versatile PB
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (panic+0x94/0x240)
[] (panic) from [] (do_exit+0x8d8/0x914)
[] (do_exit) from [] (do_group_exit+0x3c/0xa8)
[] (do_group_exit) from [] (get_signal+0x210/0x528)
[] (get_signal) from [] (do_signal+0xcc/0x438)
[] (do_signal) from [] (do_work_pending+0xb8/0xd0)
[] (do_work_pending) from [] (slow_work_pending+0xc/0x20)
Rebooting in 100 seconds..

@Urmel
Copy link

Urmel commented Apr 6, 2017

@t-sharabi I don't see an error message - funny :) Maybe no init? Guessing...
Can you post your command line, as well as whether this is your first boot? Which image did you use for the HDD? Did you modify it?

@t-sharabi
Copy link
Author

thank you for your swift reply, here is some information that may help

  • my system is Ubuntu 16.04 LTS 64bit

  • sudo qemu-system-arm --version
    QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.10), Copyright (c) 2003-2008 Fabrice Bellard

  • the raspberry pi image is "2016-11-25-raspbian-jessie-lite.img"

  • the qemu kernel is kernel-qemu-4.4.34-jessie

  • I am running a config file to start the process as follow:
    qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash" -hda 2016-11-25-raspbian-jessie-lite.img

  • after the process is finished it always says reboot in second

so what do you think the problem is?

@dhruvvyas90
Copy link
Owner

@t-sharabi: Did you change the content of your image as per wiki ? Link: https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki/Emulating-Jessie-image-with-4.x.xx-kernel
Hope it helps.

@drkurrey
Copy link

@dhruvvyas90, I have followed the instructions provided in the above link mentioned by you.

@t-sharabi, can you provide me your config file, so that I can find the error in my PC.

@t-sharabi
Copy link
Author

hello @drkurrey
which config do you want, the normal one or the one that can give you log file on screen?

@t-sharabi
Copy link
Author

Dear @dhruvvyas90
I would like to thank you, its working perfect

@t-sharabi
Copy link
Author

t-sharabi commented Apr 23, 2017

Hello @drkurrey
i think you need this

qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu-4.4.26-jessie -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=100 rootfstype=ext4 rw console=ttyAMA0,115200" -hda /home/talal/2017-01-11-raspbian-jessie.img

@t-sharabi t-sharabi reopened this Apr 23, 2017
@drkurrey
Copy link

@t-sharabi, I have tried the above config but still it returns the same error as mentioned in /issues/32

Configuration used in my PC

#!/bin/bash
#Starts raspberry pi image in configuration mode
qemu-system-arm -kernel ./qemuRpiKernel/kernelQemu31025wheezy /-cpu arm1176 /-m 256 /-M versatilepb /-no-reboot /-serial stdio /-append "root=/dev/sda2 panic=100 rootfstype=ext4 rw console=ttyAMA0,115200" -hda /home/learner/Documents/Resources/RPi/rpiJessie.img

Response by my PC

screenshot from 2017-04-23 21-25-50

@t-sharabi
Copy link
Author

@drkurrey
I have noticed two thing, first of all there is a forward slash after (kernelQemu31025wheezy) and second I have noticed that your are using the wheezy kernal for jessie image which will not work based on my tests, the following link is a useful one

https://github.com/dhruvvyas90/qemu-rpi-kernel

@drkurrey
Copy link

@t-sharabi the second response was for kernel 4.x.x.

@MagicValy
Copy link

Dear All,

I took the time to read all threads on this topic, follow advise and I am still getting an issue:
When starting QEMU with raspbian version 2017-06-21-raspbian.img, I am getting this message:

"Uncompressing Linux... done, booting the kernel"
and it reboots for a while !

Do I need a kernel-qemu-4.4.34-jessie to be rebuilded with the lastest Raspbian version ?
Some help or feedback are welcome

Thanks a lot,

@MagicValy
Copy link

Hello All,

I took an old version of Raspbian (year 2016 nov 25) and it is working as expected. Please discard my issue.

@dhruvvyas90
Copy link
Owner

Discarding issue upon request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants