Sorry, you need to enable JavaScript to visit this website.

Unable to run qemu

Unsolved
8 posts / 0 new
svv
Junior(0)
Unable to run qemu

I am using the TRD 14.4 for development. I built the kernel with CONFIG_XILINX_FIXED_DEVTREE_ADDR=y"
I see the following warnings:
1. Warning: Neither atags nor dtb found
2. cma: CMA: failed to reserve 16 MiB
3. clk_divider_recalc_rate: Invalid divisor for clock 0x00000006 0x00000006
4. clk_divider_recalc_rate: Invalid divisor for clock 0x00000004 0x00000004

with these warnings the program hangs with the message:
"Calibrating delay loop..."

The device tree that i specify on the qemu command line is the same as the one used for an actual zedboard.

I am a newbie to linux and would appreciate help in understanding and resolving the issue.
The full log is as shown below.
Thanks
svv

-----------------------------------------
start_qemu.sh

./arm-softmmu/qemu-system-arm -M xilinx-zynq-a9 -m 1024 -serial null -serial mon:stdio -dtb ./devicetree.dtb -smp 2 -nographic -kernel ../linux-xlnx/arch/arm/boot/zImage -initrd ../ramdisk32M.image -net nic,model=cadence_gem -net user -tftp ~/ -redir tcp:10023::23 -redir tcp:10080::80 -redir tcp:10022::22 -redir tcp:10021::21 -redir tcp:1234::123

--------------------------------------------

svv@HP-LT:~/Xilinx/qemu$ ./start_qemu.sh
Uncompressing Linux... done, booting the kernel.
Warning: Neither atags nor dtb found
Booting Linux on physical CPU 0
Linux version 3.6.0-xilinx-dirty (svv@HP-LT) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #1 SMP PREEMPT Mon Apr 29 00:03:44 EDT 2013
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Xilinx Zynq Platform
Warning: Neither atags nor dtb found
bootconsole [earlycon0] enabled
cma: CMA: failed to reserve 16 MiB
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 7 pages/cpu @c05d2000 s7488 r8192 d12992 u32768
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064
Kernel command line: console=ttyPS0,115200n8 root=/dev/ram rw earlyprintk mtdparts=physmap-flash.0:512K(nor-fsbl),512K(nor-u-boot),5M(nor-linux),9M(nor-user),1M(nor-scratch),-(nor-rootfs)
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 10316k/10316k available, 6068k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc1800000 - 0xff000000 ( 984 MB)
lowmem : 0xc0000000 - 0xc1000000 ( 16 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0516218 (5177 kB)
.init : 0xc0517000 - 0xc053dd40 ( 156 kB)
.data : 0xc053e000 - 0xc05847c0 ( 282 kB)
.bss : 0xc05847e4 - 0xc05ae9f0 ( 169 kB)
Preemptible hierarchical RCU implementation.
Dump stacks of tasks blocking RCU-preempt GP.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:512
Zynq clock init
clk_divider_recalc_rate: Invalid divisor for clock 0x00000006 0x00000006
clk_divider_recalc_rate: Invalid divisor for clock 0x00000004 0x00000004
Xilinx, no compatible timer found, using default
xlnx,ps7-ttc-1.00.a #0 at 0xc1800000, irq=43
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop...

rlewis65
Junior(0)
Known Issue

Xilinx is aware and working on a fix.

Search for Getting-started-with-Zynq-14-5-and-QEMU on the Xilinx forum

svv
Junior(0)
Known issue

Is it going to be fixed on 14.5 only or 14.4. Any idea?
Thanks

rlewis65
Junior(0)
Not sure

I would assume only 14.5 based on past experience

rlewis65
Junior(0)
Answer from Xilinx

From Xilinx:

Problem solved: The qemu's '-initrd' switch expects a plain initrd/initramfs. Not one with a u-boot header. Stripping the u-boot header from the uramdisk.image.gz file works. I think I'll upload that file to the wiki later. To remove the u-boot header from the uramdisk.image.gz file use the following command:
dd if=./uramdisk.image.gz of=./ramdisk.image.gz skip=16 bs=4
And then use the file 'ramdisk.image.gz' to boot on qemu.

Roberto
Junior(1)
qemu stops booting the kernel

hi,

I'm trying to use qemu on a Ubuntu 12.04 under VMware
I followed the steps form http://www.wiki.xilinx.com/QEMU, the compilation went fine
I can recompile the kernel

these kernel and filesystem work on the zedboard

when I launch qemu it stops at the mouse PS/2 line: is there something I have to enable or disable on the kernel configuration?

here is the launch sequence:
zedboard:\> ./arm-softmmu/qemu-system-arm -M xilinx-zynq-a9 -m 512 -serial null -serial mon:stdio -dtb /mnt/sharedFolder/qemu/devicetree.dtb -smp 1 -nographic -kernel /mnt/sharedFolder/qemu/zImageQemu -initrd /mnt/sharedFolder/qemu/ramdisk64M.img -net nic,model=cadence_gem -net user -tftp ~/ -redir tcp:10023::23 -redir tcp:10080::80 -redir tcp:10022::22 -redir tcp:10021::21 -redir tcp:1234::1234
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.6.0-Roberto-16042013-00006-g61c3f9d-dirty (zedboard@ubuntu) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #22 SMP PREEMPT Sat May 18 12:58:14 CEST 2013
[ 0.000000] CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] PERCPU: Embedded 7 pages/cpu @c08cb000 s6976 r8192 d13504 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw init=/init earlyprintk rootwait devtmpfs.mount=1
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 449256k/449256k available, 75032k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc044d9f8 (4375 kB)
[ 0.000000] .init : 0xc044e000 - 0xc0473b40 ( 151 kB)
[ 0.000000] .data : 0xc0474000 - 0xc04acec0 ( 228 kB)
[ 0.000000] .bss : 0xc04acee4 - 0xc04c3ef0 ( 93 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Dump stacks of tasks blocking RCU-preempt GP.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[ 0.000000] NR_IRQS:512
[ 0.000000] Zynq clock init
[ 0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.190000] Calibrating delay loop... 441.13 BogoMIPS (lpj=2205696)
[ 0.190000] pid_max: default: 32768 minimum: 301
[ 0.200000] Mount-cache hash table entries: 512
[ 0.230000] CPU: Testing write buffer coherency: ok
[ 0.240000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.240000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 1 counters available
[ 0.240000] Setting up static identity map for 0x306020 - 0x306054
[ 0.240000] L2x0 series cache controller enabled
[ 0.240000] l2x0: 8 ways, CACHE_ID 0x00000000, AUX_CTRL 0x72060000, Cache size: 524288 B
[ 0.250000] Brought up 1 CPUs
[ 0.250000] SMP: Total of 1 processors activated (441.13 BogoMIPS).
[ 0.270000] devtmpfs: initialized
[ 0.290000] NET: Registered protocol family 16
[ 0.300000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.370000] xgpiops e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xe084a000
[ 0.400000] registering platform device 'pl330' id 0
[ 0.400000] registering platform device 'arm-pmu' id 0
[ 0.400000] registering platform device 'zynq-dvfs' id 0
[ 0.400000]
[ 0.400000] ###############################################
[ 0.400000] # #
[ 0.400000] # Board ZED Init #
[ 0.400000] # #
[ 0.400000] ###############################################
[ 0.400000]
[ 0.400000] hw-breakpoint: debug architecture 0x0 unsupported.
[ 0.560000] xslcr xslcr.0: at 0xF8000000 mapped to 0xF8000000
[ 0.650000] bio: create slab <bio-0> at 0
[ 0.670000] vgaarb: loaded
[ 0.670000] SCSI subsystem initialized
[ 0.690000] usbcore: registered new interface driver usbfs
[ 0.690000] usbcore: registered new interface driver hub
[ 0.700000] usbcore: registered new device driver usb
[ 0.710000] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.720000] Switching to clocksource xttcpss_timer1
[ 0.850000] NET: Registered protocol family 2
[ 0.860000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.860000] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.870000] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.870000] TCP: reno registered
[ 0.870000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.870000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.870000] NET: Registered protocol family 1
[ 0.880000] Trying to unpack rootfs image as initramfs...
[ 0.890000] rootfs image is not initramfs (junk in compressed archive); looks like an initrd
[ 1.930000] Freeing initrd memory: 65536K
[ 1.930000] pl330 dev 0 probe success
[ 1.960000] msgmni has been set to 1005
[ 1.970000] io scheduler noop registered
[ 1.970000] io scheduler deadline registered
[ 1.970000] io scheduler cfq registered (default)
[ 1.970000] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82) is a xuartps
[ 2.190000] console [ttyPS0] enabled
[ 2.200000] xdevcfg f8007000.ps7-dev-cfg: ioremap f8007000 to e0850000 with size 1000
: r_unlock_post_write: successful unlock
[ 2.210000] [drm] Initialized drm 1.1.0 20060810
[ 2.380000] brd: module loaded
[ 2.470000] loop: module loaded
[ 2.540000] xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated
[ 2.540000] xqspips e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE0852000, irq=51
[ 2.580000] libphy: XEMACPS mii bus: probed
[ 2.590000] xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
[ 2.610000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.630000] usb_hcd_xusbps_probe: No OTG assigned!
[ 2.630000] usb_hcd_xusbps_probe: OTG now assigned!
[ 2.630000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
[ 2.630000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
[ 2.640000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[ 2.660000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[ 2.690000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.690000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.700000] usb usb1: Product: Xilinx PS USB EHCI Host Controller
[ 2.700000] usb usb1: Manufacturer: Linux 3.6.0-Roberto-16042013-00006-g61c3f9d-dirty ehci_hcd
[ 2.700000] usb usb1: SerialNumber: xusbps-ehci.0
[ 2.730000] hub 1-0:1.0: USB hub found
[ 2.730000] hub 1-0:1.0: 6 ports detected
[ 2.740000] Initializing USB Mass Storage driver...
[ 2.750000] usbcore: registered new interface driver usb-storage
[ 2.750000] USB Mass Storage support registered.
[ 2.760000] mousedev: PS/2 mouse device common for all mice

best regards,
Roberto

Roberto
Junior(1)
qemu is waiting for sdhci

in the real zedboard, after the
mousedev: PS/2 mouse device common for all mice

the next executed line is:
sdhci: Secured Digital Host Controller Interface driver

so it seems that qemu cannot emulate this device: any idea how to fix this?

best regards,

Roberto

Roberto
Junior(1)
boot-strap executed

I've found a work around for my problem:
I used a .dtb that does not completely work on the zedboard, but is able to boot the kernel/filesystem with qemu
-
now I'm in the strange situation with a .dtb that only works with the card and one that only allows qemu to work...