2. after copying the kernel7.img and the bcm2709-rpi-2-b.dtb file into a "boot" folder, I use the following command with the lastest (up to one day ago) qemu:
note that in this particular case I'm using /dev/sdb (which is the SD card). You can adjust accordingly.
WARNING: Image format was not specified for '/dev/sdb' 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.
Warning: hub port hub0port0 has no peer
Warning: vlan 0 with no nics
Warning: netdev hub0port0 has no peer
Warning: requested NIC (anonymous, model unspecified) was not created (not supported by this machine?)
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0xf00
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.18.0-20-rpi2 (address@hidden) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) ) #21-Ubuntu SMP PREEMPT Sun Apr 5 01:56:02 UTC 2015 (Ubuntu 3.18.0-20.21-rpi2 3.18.11)
[ 0.000000] CPU: ARMv7 Processor [412fc0f1] revision 1 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine model: Raspberry Pi 2 Model B
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] cma: Reserved 8 MiB at 0x0f800000
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] On node 0 totalpages: 65536
[ 0.000000] free_area_init_node: node 0, pgdat 8095cc40, node_mem_map 8f5f3000
[ 0.000000] Normal zone: 512 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 65536 pages, LIFO batch:15
[ 0.000000] [bcm2709_smp_init_cpus] enter (85c0->f3003010)
[ 0.000000] [bcm2709_smp_init_cpus] ncores=4
[ 0.000000] PERCPU: Embedded 11 pages/cpu @8f5c1000 s12928 r8192 d23936 u45056
[ 0.000000] pcpu-alloc: s12928 r8192 d23936 u45056 alloc=11*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 panic=1 rootfstype=ext4
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] allocated 524288 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ 0.000000] Memory: 240468K/262144K available (6339K kernel code, 564K rwdata, 2352K rodata, 364K init, 806K bss, 21676K reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
[ 0.000000] vmalloc : 0x90800000 - 0xff000000 (1768 MB)
[ 0.000000] lowmem : 0x80000000 - 0x90000000 ( 256 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x80884f4c (8692 kB)
[ 0.000000] .init : 0x80885000 - 0x808e0000 ( 364 kB)
[ 0.000000] .data : 0x808e0000 - 0x8096d2ec ( 565 kB)
[ 0.000000] .bss : 0x8096d2ec - 0x80a36d20 ( 807 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU dyntick-idle grace-period acceleration is enabled.
[ 0.000000] NR_IRQS:480
[ 0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).
[ 0.000771] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 3579139424256ns
[ 0.002598] Switching to timer-based delay loop, resolution 52ns
[ 0.035758] Console: colour dummy device 80x30
[ 0.038813] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800)
[ 0.043079] pid_max: default: 32768 minimum: 301
[ 0.048556] Security Framework initialized
[ 0.063027] AppArmor: AppArmor initialized
[ 0.063841] Yama: becoming mindful.
[ 0.076510] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.078315] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.120839] Initializing cgroup subsys memory
[ 0.123174] Initializing cgroup subsys devices
[ 0.124319] Initializing cgroup subsys freezer
[ 0.125414] Initializing cgroup subsys net_cls
[ 0.127000] Initializing cgroup subsys blkio
[ 0.127930] Initializing cgroup subsys perf_event
[ 0.128884] Initializing cgroup subsys net_prio
[ 0.131767] CPU: Testing write buffer coherency: ok
[ 0.183628] CPU0: update cpu_capacity 1024
[ 0.186458] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[ 0.188520] [bcm2709_smp_prepare_cpus] enter
[ 0.196432] Setting up static identity map for 0x6064c8 - 0x606520
[ 0.408138] [bcm2709_boot_secondary] cpu:1 failed to start (85c0)
[ 1.639690] CPU1: failed to come online
[ 1.692001] [bcm2709_boot_secondary] cpu:2 failed to start (85c0)
[ 2.938004] CPU2: failed to come online
[ 2.956738] [bcm2709_boot_secondary] cpu:3 failed to start (85c0)
[ 4.188338] CPU3: failed to come online
[ 4.193769] Brought up 1 CPUs
[ 4.197829] SMP: Total of 1 processors activated (38.40 BogoMIPS).
[ 4.203740] CPU: All CPU(s) started in SVC mode.
[ 4.261739] devtmpfs: initialized
[ 4.533546] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[ 4.719236] pinctrl core: initialized pinctrl subsystem
[ 4.799254] NET: Registered protocol family 16
[ 4.869787] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[ 4.907457] cpuidle: using governor ladder
[ 4.915191] cpuidle: using governor menu
[ 4.918278] bcm2709.uart_clock = 3000000
[ 4.969190] ------------[ cut here ]------------
[ 4.972886] WARNING: CPU: 0 PID: 1 at /build/buildd/linux-3.18.0/arch/arm/mach-bcm2709/armctrl.c:148 armctrl_xlate+0x188/0x274()
[ 4.978230] Modules linked in:
[ 4.981441] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-20-rpi2 #21-Ubuntu
[ 4.990070] [<80016ab0>] (unwind_backtrace) from [<800129d0>] (show_stack+0x10/0x14)
[ 4.994280] [<800129d0>] (show_stack) from [<805fee10>] (dump_stack+0x9c/0xd4)
[ 4.998113] [<805fee10>] (dump_stack) from [<80026ed8>] (warn_slowpath_common+0x70/0x8c)
[ 5.001953] [<80026ed8>] (warn_slowpath_common) from [<80026f90>] (warn_slowpath_null+0x1c/0x24)
[ 5.005774] [<80026f90>] (warn_slowpath_null) from [<80022044>] (armctrl_xlate+0x188/0x274)
[ 5.007766] [<80022044>] (armctrl_xlate) from [<8007399c>] (irq_create_of_mapping+0x64/0x110)
[ 5.010351] [<8007399c>] (irq_create_of_mapping) from [<804c4ef4>] (irq_of_parse_and_map+0x24/0x2c)
[ 5.012473] [<804c4ef4>] (irq_of_parse_and_map) from [<804c4f14>] (of_irq_to_resource+0x18/0xb8)
[ 5.015119] [<804c4f14>] (of_irq_to_resource) from [<804c4ff0>] (of_irq_to_resource_table+0x3c/0x54)
[ 5.017399] [<804c4ff0>] (of_irq_to_resource_table) from [<804c25b8>] (of_device_alloc+0xd8/0x180)
[ 5.020123] [<804c25b8>] (of_device_alloc) from [<804c26a8>] (of_platform_device_create_pdata+0x48/0x98)
[ 5.022308] [<804c26a8>] (of_platform_device_create_pdata) from [<804c27f0>] (of_platform_bus_create+0xec/0x3ac)
[ 5.025277] [<804c27f0>] (of_platform_bus_create) from [<804c2860>] (of_platform_bus_create+0x15c/0x3ac)
[ 5.027468] [<804c2860>] (of_platform_bus_create) from [<804c2c28>] (of_platform_populate+0x5c/0xa0)
[ 5.030213] [<804c2c28>] (of_platform_populate) from [<8088cad8>] (bcm2709_init+0x64/0x3fc)
[ 5.032380] [<8088cad8>] (bcm2709_init) from [<80888870>] (customize_machine+0x20/0x40)
[ 5.034808] [<80888870>] (customize_machine) from [<800088bc>] (do_one_initcall+0xd8/0x208)
[ 5.036873] [<800088bc>] (do_one_initcall) from [<80885ef4>] (kernel_init_freeable+0x1fc/0x29c)
[ 5.039536] [<80885ef4>] (kernel_init_freeable) from [<805f9298>] (kernel_init+0x8/0xf0)
[ 5.041458] [<805f9298>] (kernel_init) from [<8000efe8>] (ret_from_fork+0x14/0x2c)
[ 5.044239] ---[ end trace 8c9564437c6fb249 ]---
[ 5.086808] No ATAGs?
[ 5.090020] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 5.092933] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 5.095000] mailbox: Broadcom VideoCore Mailbox driver
[ 5.105398] bcm2708_vcio: mailbox at f300b880
[ 5.109543] bcm_power: Broadcom power driver
[ 5.111766] bcm_power_open() -> 0
[ 5.112687] bcm_power_request(0, 8)
and then the process stops (just paralyze - aka deadlock).
V.