zc706编译及qemu启动和使用
zc706編譯及qemu啟動(dòng)和使用
1、zc706編譯
從xilinx官網(wǎng)下載xilinx-zc706-v2021.1-final.bsp文件,并將文件拷貝到ubuntu虛擬機(jī)下。
使用如下命令創(chuàng)建zc706工程
petalinux-create -t project -s /home/www/mnt1/xilinx/tools/xilinx-zc706-v2021.1-final.bsp
生成xilinx-zc706-2021.1文件夾之后,表示創(chuàng)建zc706工程成功
執(zhí)行petalinux-build命令編譯zc706工程
編譯完成后是這樣的
編譯完之后images下生成了相關(guān)程序
2、qemu啟動(dòng)和使用
使用命令petalinux-boot --qemu --prebuilt不帶參數(shù)時(shí),啟動(dòng)qemu會(huì)提示使用方法。
使用如下命令,可以啟動(dòng)qemu
petalinux-boot --qemu --prebuilt 3
如此進(jìn)入qemu啟動(dòng)流程
當(dāng)出現(xiàn)root@xilinx-zc706-2021_1:~#打印之后,表示qemu啟動(dòng)zc706開(kāi)發(fā)板模擬環(huán)境成功
啟動(dòng)流程如下:
www@ubuntu:~/mnt1/xilinx/projects/zc706-v2021.1/xilinx-zc706-2021.1$ petalinux-boot --qemu --prebuilt 3 [INFO] Sourcing buildtools INFO: The image provided is a zImage INFO: TCP PORT is free INFO: Starting arm QEMU INFO: qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial /dev/null -serial mon:stdio -display none -kernel /home/www/mnt1/xilinx/projects/zc706-v2021.1/xilinx-zc706-2021.1/pre-built/linux/images/zImage -initrd /home/www/mnt1/xilinx/projects/zc706-v2021.1/xilinx-zc706-2021.1/pre-built/linux/images/rootfs.cpio.gz.u-boot -gdb tcp::9000 -dtb /home/www/mnt1/xilinx/projects/zc706-v2021.1/xilinx-zc706-2021.1/pre-built/linux/images/system.dtb -net nic,netdev=eth0 -netdev user,id=eth0,tftp=/tftpboot -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 qemu-system-aarch64: warning: hub 0 is not connected to host network Booting Linux on physical CPU 0x0 Linux version 5.10.0-xilinx-v2021.1 (oe-user@oe-host) (arm-xilinx-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Fri Jun 4 15:57:16 UTC 2021 CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache OF: fdt: Machine model: Zynq ZC706 Development Board earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8') printk: bootconsole [cdns0] enabled Memory policy: Data cache writealloc cma: Reserved 16 MiB at 0x3f000000 Zone ranges:Normal [mem 0x0000000000000000-0x000000002fffffff]HighMem [mem 0x0000000030000000-0x000000003fffffff] Movable zone start for each node Early memory node rangesnode 0: [mem 0x0000000000000000-0x000000003fffffff] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff] percpu: Embedded 15 pages/cpu s32332 r8192 d20916 u61440 Built 1 zonelists, mobility grouping on. Total pages: 260416 Kernel command line: console=ttyPS0,115200 earlycon root=/dev/ram0 rw Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear) Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear) mem auto-init: stack:off, heap alloc:off, heap free:off Memory: 1000420K/1048576K available (7168K kernel code, 270K rwdata, 1872K rodata, 1024K init, 161K bss, 31772K reserved, 16384K cma-reserved, 245760K highmem) rcu: Preemptible hierarchical RCU implementation. rcu: RCU event tracing is enabled. rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.Trampoline variant of Tasks RCU enabled. rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 efuse mapped to (ptrval) slcr mapped to (ptrval) GIC physical location is 0xf8f01000 L2C: platform modifies aux control register: 0x00000000 -> 0x30400000 L2C: DT/platform modifies aux control register: 0x00000000 -> 0x30400000 L2C-310 errata 588369 769419 enabled L2C-310 full line of zeros enabled for Cortex-A9 L2C-310 cache controller enabled, 8 ways, 64 kB L2C-310: CACHE_ID 0x00000000, AUX_CTRL 0x00000000 random: get_random_bytes called from start_kernel+0x2c0/0x4a0 with crng_init=0 zynq_clock_init: clkc starts at (ptrval) Zynq clock init global-timer: non support for this cpu version. Failed to initialize '/axi/timer@f8f00200': -38 Console: colour dummy device 80x30 sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns Calibrating delay loop... 294.91 BogoMIPS (lpj=1474560) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) CPU: Testing write buffer coherency: ok CPU0: Spectre v2: using BPIALL workaround CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 Setting up static identity map for 0x100000 - 0x100060 rcu: Hierarchical SRCU implementation. smp: Bringing up secondary CPUs ... CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 CPU1: Spectre v2: using BPIALL workaround smp: Brought up 1 node, 2 CPUs SMP: Total of 2 processors activated (658.63 BogoMIPS). CPU: All CPU(s) started in SVC mode. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 512 (order: 3, 32768 bytes, linear) pinctrl core: initialized pinctrl subsystem NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations thermal_sys: Registered thermal governor 'step_wise' cpuidle: using governor menu OF: amba_device_add() failed (-19) for /axi/etb@f8801000 OF: amba_device_add() failed (-19) for /axi/tpiu@f8803000 OF: amba_device_add() failed (-19) for /axi/funnel@f8804000 OF: amba_device_add() failed (-19) for /axi/ptm@f889c000 OF: amba_device_add() failed (-19) for /axi/ptm@f889d000 hw-breakpoint: debug architecture 0x4 unsupported. zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval) vgaarb: loaded SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb mc: Linux media interface: v0.10 videodev: Linux video capture interface: v2.00 pps_core: LinuxPPS API ver. 1 registered pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> PTP clock support registered EDAC MC: Ver: 3.0.0 FPGA manager framework Advanced Linux Sound Architecture Driver Initialized. NET: Registered protocol family 2 tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear) TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear) TCP: Hash tables configured (established 8192 bind 8192) UDP hash table entries: 512 (order: 2, 16384 bytes, linear) UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) 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. PCI: CLS 0 bytes, default 64 Trying to unpack rootfs image as initramfs... Freeing initrd memory: 9300K hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing. hw perfevents: enabled with armv7_cortex_a9 PMU driver, 5 counters available workingset: timestamp_bits=14 max_order=18 bucket_order=4 jffs2: version 2.2. (NAND) (SUMMARY) ? 2001-2006 Red Hat, Inc. bounce: pool size: 64 pages io scheduler mq-deadline registered io scheduler kyber registered zynq-pinctrl 700.pinctrl: zynq pinctrl initialized dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330 dma-pl330 f8003000.dmac: DBUFF-256x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16 brd: module loaded loop: module loaded spi-nor spi0.0: trying to lock already unlocked area spi-nor spi0.0: n25q128a11 (32768 Kbytes) 4 fixed-partitions partitions found on MTD device spi0.0 Creating 4 MTD partitions on "spi0.0": 0x000000000000-0x000000e00000 : "boot" 0x000000c00000-0x000001000000 : "qspi-bitstream" 0x000000e00000-0x000000e20000 : "bootenv" 0x000000e20000-0x0000018a0000 : "kernel" libphy: Fixed MDIO Bus: probed CAN device driver interface libphy: MACB_mii_bus: probed macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 34 (00:0a:35:00:1e:53) e1000e: Intel(R) PRO/1000 Network Driver e1000e: Copyright(c) 1999 - 2015 Intel Corporation. ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci-pci: EHCI PCI platform driver usbcore: registered new interface driver usb-storage ULPI transceiver vendor/product ID 0x0000/0x0000 ULPI integrity check: failed! ci_hdrc ci_hdrc.0: unable to init phy: -19 i2c /dev entries driver cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 29 si570 1-005d: registered, current frequency 148500000 Hz i2c i2c-0: Added multiplexed i2c bus 1 i2c i2c-0: Added multiplexed i2c bus 2 at24 3-0054: supply vcc not found, using dummy regulator regulator-dummy: Underflow of regulator enable count i2c i2c-0: Added multiplexed i2c bus 3 i2c i2c-0: Added multiplexed i2c bus 4 rtc-pcf8563 5-0051: pcf8563_write_block_data: err=-6 addr=0e, data=03 rtc-pcf8563 5-0051: pcf8563_probe: write error rtc-pcf8563: probe of 5-0051 failed with error -5 i2c i2c-0: Added multiplexed i2c bus 5 i2c i2c-0: Added multiplexed i2c bus 6 i2c i2c-0: Added multiplexed i2c bus 7 i2c i2c-0: Added multiplexed i2c bus 8 pca954x 0-0074: registered 8 multiplexed busses for I2C switch pca9548 ucd9000 8-0065: Failed to read device ID cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s EDAC MC: ECC not enabled Xilinx Zynq CpuIdle Driver started sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman sdhci-pltfm: SDHCI platform and OF driver helper ledtrig-cpu: registered to indicate activity on CPUs clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 826992825 ns clocksource: Switched to clocksource ttc_clocksource sched_clock: 16 bits at 35kHz, resolution 28357ns, wraps every 929205421ns timer #0 at (ptrval), irq=48 usbcore: registered new interface driver usbhid usbhid: USB HID core driver fpga_manager fpga0: Xilinx Zynq FPGA Manager registered mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA 64-bit NET: Registered protocol family 10 Segment Routing with IPv6 sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver NET: Registered protocol family 17 can: controller area network core NET: Registered protocol family 29 can: raw protocol can: broadcast manager protocol can: netlink gateway - max_hops=1 Registering SWP/SWPB emulation handler e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 32, base_baud = 992063) is a xuartps printk: console [ttyPS0] enabled printk: console [ttyPS0] enabled printk: bootconsole [cdns0] disabled printk: bootconsole [cdns0] disabled of-fpga-region fpga-full: FPGA Region probed of_cfs_init hrtimer: interrupt took 30597776 ns of_cfs_init: OK ALSA device list:No soundcards found. Freeing unused kernel memory: 1024K Run /init as init process INIT: version 2.97 booting Starting udev udevd[69]: starting version 3.2.9 random: udevd: uninitialized urandom read (16 bytes read) random: udevd: uninitialized urandom read (16 bytes read) random: udevd: uninitialized urandom read (16 bytes read) udevd[70]: starting eudev-3.2.9 urandom_read: 1 callbacks suppressed random: udevd: uninitialized urandom read (16 bytes read) random: dd: uninitialized urandom read (512 bytes read) macb e000b000.ethernet eth0: PHY [e000b000.ethernet-ffffffff:07] driver [Marvell 88E1149R] (irq=POLL) macb e000b000.ethernet eth0: configuring for phy/rgmii-id link mode macb e000b000.ethernet eth0: Link is Up - 1Gbps/Full - flow control tx IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes readyrandom: crng init done Starting tcf-agent: OKroot@xilinx-zc706-2021_1:~#查看cpu信息
可以看到zc706是xilinx zynq平臺(tái),其arm平臺(tái)是雙核ARMv7處理器。
查看版本信息
查看其它信息
退出qemu
執(zhí)行poweroff指令執(zhí)行關(guān)電操作
果然不出意外的卡住了
所以還是需要另外開(kāi)一個(gè)窗口,執(zhí)行kill命令方法退出qemu了
qemu運(yùn)行窗口已退出qemu狀態(tài)
于是,zc706-2021工程編譯編譯成功,zc706的qemu也正常啟動(dòng)。
總結(jié)
以上是生活随笔為你收集整理的zc706编译及qemu启动和使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 计算机ppt操作知识,计算机基础知识.p
- 下一篇: 45套(毕业答辩、开题报告、职场)PPT