Emulating ArchLinuxARM-rpi-2-latest in Ubuntu using Qemu.

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Emulating ArchLinuxARM-rpi-2-latest in Ubuntu using Qemu.

Postby dpremkum » Fri Mar 03, 2017 5:01 am

Hi
I'm trying to emulate ArchLinuxARM-rpi-2-latest in ubuntu using QEMU. It has been done before. The link below shows the article.
https://balaskas.gr/blog/2013/03/25/ras ... nder-qemu/
But when i try to do it with the latest archlinux image and kernel, it doesn't work. The error i get,

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
CPU: 0 PID: 1 Comm: init Not tainted 4.4.34+ #3

The kernel source is,
https://github.com/dhruvvyas90/qemu-rpi-kernel
The kernels work for raspian though! I have also tried compiling my own kernel from the git repository. But it didn't work too.

Kindly help me out.
Thank you.
_~dpremkum
dpremkum
 
Posts: 4
Joined: Thu Feb 09, 2017 2:21 am

Re: Emulating ArchLinuxARM-rpi-2-latest in Ubuntu using Qemu

Postby WarheadsSE » Fri Mar 03, 2017 2:10 pm

Whatever kernel you are using is probably missing some configuration options needed for this distribution. We'd need to seem more of the dmesg backlog.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6695
Joined: Mon Oct 18, 2010 2:12 pm

Re: Emulating ArchLinuxARM-rpi-2-latest in Ubuntu using Qemu

Postby dpremkum » Mon Mar 13, 2017 6:08 am

The message I get,
Code: Select all
audio: Could not init `oss' audio driver
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.34+ (amit@penguin) (gcc version 6.2.1 20161119 (Debian 6.2.1-4) ) #3 Thu Dec 1 14:44:23 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 rw panic=0 console=ttyAMA0
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 (4270K kernel code, 56K rwdata, 1008K rodata, 176K 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 - 0xc052fd68   (5280 kB)
      .init : 0xc0530000 - 0xc055c000   ( 176 kB)
      .data : 0xc055c000 - 0xc056a120   (  57 kB)
       .bss : 0xc059ae50 - 0xc05bdb58   ( 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... 912.99 BogoMIPS (lpj=4564992)
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 okir@monad.swb.de).
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
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
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
sd 0:0:0:0: [sda] 3970048 512-byte logical blocks: (2.03 GB/1.89 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
 sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
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): couldn't mount as ext3 due to feature incompatibilities
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: 176K (c0530000 - c055c000)
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

CPU: 0 PID: 1 Comm: init Not tainted 4.4.34+ #3
Hardware name: ARM-Versatile PB
[<c001ca90>] (unwind_backtrace) from [<c0018f14>] (show_stack+0x10/0x14)
[<c0018f14>] (show_stack) from [<c0080c2c>] (panic+0x94/0x240)
[<c0080c2c>] (panic) from [<c0027c9c>] (do_exit+0x8d8/0x914)
[<c0027c9c>] (do_exit) from [<c0027d44>] (do_group_exit+0x3c/0xa8)
[<c0027d44>] (do_group_exit) from [<c0031064>] (get_signal+0x210/0x528)
[<c0031064>] (get_signal) from [<c0018598>] (do_signal+0xcc/0x438)
[<c0018598>] (do_signal) from [<c0018aec>] (do_work_pending+0xb8/0xd0)
[<c0018aec>] (do_work_pending) from [<c0015154>] (slow_work_pending+0xc/0x20)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004


This is the message I get when i try to run the following,
qemu-system-arm -M versatilepb -kernel ./qemu-rpi-kernel/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -no-reboot -serial stdio -net nic,model=smc91c111 -net user -append "root=/dev/sda2 rw panic=0 console=ttyAMA0" -drive format=raw,file=ArchLinuxARM-rpi-2-latest.img
And the kernel I used is 4.4.34.
dpremkum
 
Posts: 4
Joined: Thu Feb 09, 2017 2:21 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 2 guests