官网提供的可执行文件是基于64位Linux的:zynq_linux.tar.gz.对于32位的系统,需要自己编译,解决方案如下:1) 下载代码:git clone git://git.xilinx.com/qemu-xarm.git2) 配置工程:cd qemu-xarm./configure --target-list=arm-softmmu --disable-werror --disable-kvm3) 编译: make4) 编译结果:[walt@zynq7k qemu-xarm]$ ls -l arm-softmmu/qemu-system-arm-rwxrwxr-x. 1 walt walt 18428427 Nov 6 15:27 arm-softmmu/qemu-system-arm5) 检测环境是否OK,测试如下:[walt@zynq7k qemu-xarm]$ ./arm-softmmu/qemu-system-arm -hQEMU emulator version 1.0.50, Copyright (c) 2003-2008 Fabrice Bellardusage: qemu-system-arm [options] [disk_image]‘disk_image" is a raw hard disk image for IDE hard disk 0Standard options:-h or -help display this help and exit-version display version information and exit-machine [type=]name[,prop[=value][,...]]selects emulated machine (-machine ? for list)property accel=accel1[:accel2[:...]] selects acceleratorsupported accelerators are kvm, xen, tcg (default: tcg)-cpu cpu select CPU (-cpu ? for list)…… ……注: 若无法执行,请按http://wiki.xilinx.com/zynq-qemu提示安装缺失的动态库。替换官方下载的压缩包中的文件为新编译的qemu-system-arm,测试执行如下:[walt@zynq7k zynq_linux]# ./start_qemu.shram size=40000000error reading QSPI block deviceerror no mtd drive for nand flasha0mpcore_priv: smp_priv_base f8f00000error no sd drive for sdhci controller (0)error no sd drive for sdhci controller (1)Number of configured NICs 0×1ram_size 40000000, board_id d32, loader_start 0Uncompressing Linux… done, booting the kernel.Booting Linux on physical CPU 0Linux version 3.3.0-14.2-build1 (relman@xcobldal824) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #1 SMP PREEMPT Thu Jul 12 09:04:32 MDT 2012CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387dCPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cacheMachine: Xilinx Zynq Platform, model: Xilinx Zynq ZC702bootconsole [earlycon0] enabledMemory policy: ECC disabled, Data cache writeallocPERCPU: Embedded 7 pages/cpu @c190b000 s5696 r8192 d14784 u32768Built 1 zonelists in Zone order, mobility grouping on. Total pages: 255744Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0×800000,8M ip=:::::eth0:dhcp earlyprintkPID hash table entries: 4096 (order: 2, 16384 bytes)Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)Memory: 240MB 768MB = 1008MB totalMemory: 1009280k/1009280k available, 39296k reserved, 270336K highmemVirtual kernel memory layout:vector : 0xffff0000 – 0xffff1000 ( 4 kB)fixmap : 0xfff00000 – 0xfffe0000 ( 896 kB)vmalloc : 0xf0000000 – 0xff000000 ( 240 MB)lowmem : 0xc0000000 – 0xef800000 ( 760 MB)pkmap : 0xbfe00000 – 0xc0000000 ( 2 MB)modules : 0xbf000000 – 0xbfe00000 ( 14 MB).text : 0xc0008000 – 0xc040bdb0 (4112 kB).init : 0xc040c000 – 0xc0430640 ( 146 kB).data : 0xc0432000 – 0xc045fd20 ( 184 kB).bss : 0xc045fd44 – 0xc0479f5c ( 105 kB)Preemptible hierarchical RCU implementation.Verbose stalled-CPUs detection is disabled.NR_IRQS:128xlnx,ps7-ttc-1.00.a #0 at 0xf0000000, irq=43Console: colour dummy device 80×30Calibrating delay loop… 147.35 BogoMIPS (lpj=736768)pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okCPU0: thread -1, cpu 0, socket 0, mpidr 80000000smp_twd: clock not found: -2Calibrating local timer… 84.48MHz.hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 1 counters availableSetting up static identity map for 0x2f3000 – 0x2f3034CPU1: Booted secondary processorCPU1: thread -1, cpu 1, socket 0, mpidr 80000001Brought up 2 CPUsSMP: Total of 2 processors activated (271.66 BogoMIPS).devtmpfs: initializedNET: Registered protocol family 16L2x0 series cache controller enabledl2x0: 8 ways, CACHE_ID 0×00000000, AUX_CTRL 0×72060000, Cache size: 524288 Bregistering platform device ‘pl330′ id 0registering platform device ‘arm-pmu" id 0hw-breakpoint: debug architecture 0×0 unsupported.xslcr xslcr.0: at 0xF8000000 mapped to 0xF0008000bio: create slab at 0gpiochip_add: registered GPIOs 0 to 245 on device: xgpiopsxgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xf000a000SCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbSwitching to clocksource xttcpss_timer1NET: Registered protocol family 2IP route cache hash table entries: 32768 (order: 5, 131072 bytes)TCP established hash table entries: 131072 (order: 8, 1048576 bytes)TCP bind hash table entries: 65536 (order: 7, 786432 bytes)TCP: Hash tables configured (established 131072 bind 65536)TCP reno registeredUDP hash table entries: 512 (order: 2, 16384 bytes)UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)NET: Registered protocol family 1RPC: Registered named UNIX socket transport module.RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.Trying to unpack rootfs image as initramfs…rootfs image is not initramfs (junk in compressed archive); looks like an initrdFreeing initrd memory: 8192Kxscugtimer xscugtimer.0: ioremap fe00c200 to f000c200 with size 400pl330 dev 0 probe successhighmem bounce pool size: 64 pagesJFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.msgmni has been set to 1459io scheduler noop registeredio scheduler deadline registeredio scheduler cfq registered (default)e0001000.uart: ttyPS0 at MMIO 0xe0001000 (irq = 82) is a xuartpsconsole [ttyPS0] enabled, bootconsole disabledconsole [ttyPS0] enabled, bootconsole disablede0000000.uart: ttyPS1 at MMIO 0xe0000000 (irq = 59) is a xuartpsxdevcfg f8007000.devcfg: ioremap f8007000 to f0060000 with size 100brd: module loadedloop: module loadedGEM: BASEADDRESS hw: e000b000 virt: f0062000XEMACPS mii bus: probedxemacps e000b000.eth: invalid address, use assignedMAC updated d2:c4:43:31:6b:d0eth0, pdev->id -1, baseaddr 0xe000b000, irq 54ehci_hcd: USB 2.0 ‘Enhanced" Host Controller (EHCI) Driverxusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controllerxusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1xusbps-ehci xusbps-ehci.0: irq 53, io mem 0×00000000xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 0.00hub 1-0:1.0: USB hub foundhub 1-0:1.0: 0 ports detectedInitializing USB Mass Storage driver…usbcore: registered new interface driver usb-storageUSB Mass Storage support registered.Xilinx PS USB Device Controller driver (Apr 01, 2011)mousedev: PS/2 mouse device common for all micei2c /dev entries driverLinux video capture interface: v2.00gspca_main: v2.14.0 registereduvcvideo: Unable to create debugfs directoryusbcore: registered new interface driver uvcvideoUSB Video Class driver (1.1.1)WDT OF probexwdtps f8005000.swdt: Xilinx Watchdog Timer at 0xf0066000 with timeout 10 secondssdhci: Secure Digital Host Controller Interface driversdhci: Copyright(c) Pierre Ossmansdhci-pltfm: SDHCI platform and OF driver helpermmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMAusbcore: registered new interface driver usbhidusbhid: USB HID core driverTCP cubic registeredNET: Registered protocol family 17VFP support v0.3: implementor 41 architecture 3 part 40 variant 0 rev 0Registering SWP/SWPB emulation handlerdrivers/rtc/hctosys.c: unable to open rtc device (rtc0)GEM: lp->tx_bd ffdfb000 lp->tx_bd_dma 2f2b2000 lp->tx_skb ee9199c0GEM: lp->rx_bd ffdfc000 lp->rx_bd_dma 2f2b1000 lp->rx_skb ee9198c0GEM: MAC 0x3143c4d2, 0x0000d06b, d2:c4:43:31:6b:d0GEM: phydev ee90ec00, phydev->phy_id 0x1410cc2, phydev->addr 0×17eth0, phy_addr 0×17, phy_id 0x01410cc2eth0, attach [Marvell 88E1111] phy driverSending DHCP requests ., OKIP-Config: Got DHCP answer from 10.0.2.2, my address is 10.0.2.15IP-Config: Complete:device=eth0, addr=10.0.2.15, mask=255.255.255.0, gw=10.0.2.2,host=10.0.2.15, domain=, nis-domain=(none),bootserver=10.0.2.2, rootserver=10.0.2.2, rootpath=RAMDISK: ext2 filesystem found at block 0RAMDISK: Loading 8192KiB [1 disk] into ram disk… done.VFS: Mounted root (ext2 filesystem) on device 1:0.devtmpfs: mountedFreeing init memory: 144KStarting rcS…++ Mounting filesystem++ Setting up mdeveth0: link up (1000/FULL)++ Starting telnet daemon++ Starting http daemon++ Starting ftp daemon++ Starting dropbear (ssh) daemonrcS Completezynq> uname -v#1 SMP PREEMPT Thu Jul 12 09:04:32 MDT 2012zynq> dfFilesystem 1K-blocks Used Available Use% Mounted onnone 508808 0 508808 0% /tmpzynq>
2023-01-04 00:48:181