zc706编译及qemu启动和使用

2 篇文章 0 订阅
2 篇文章 0 订阅
本文详细介绍了如何在Ubuntu上使用Xilinx tools对zc706开发板进行编译,包括创建工程、petalinux-build命令的执行,以及后续的qemu启动和使用步骤。重点展示了启动过程中的关键信息和常见问题解决方法。
摘要由CSDN通过智能技术生成

zc706编译及qemu启动和使用

1、zc706编译

从xilinx官网下载xilinx-zc706-v2021.1-final.bsp文件,并将文件拷贝到ubuntu虚拟机下。

使用如下命令创建zc706工程

petalinux-create -t project -s /home/www/mnt1/xilinx/tools/xilinx-zc706-v2021.1-final.bsp

在这里插入图片描述

生成xilinx-zc706-2021.1文件夹之后,表示创建zc706工程成功

执行petalinux-build命令编译zc706工程

在这里插入图片描述

编译完成后是这样的

在这里插入图片描述

编译完之后images下生成了相关程序

在这里插入图片描述

2、qemu启动和使用

使用命令petalinux-boot --qemu --prebuilt不带参数时,启动qemu会提示使用方法。

在这里插入图片描述

使用如下命令,可以启动qemu

petalinux-boot --qemu --prebuilt 3

在这里插入图片描述

如此进入qemu启动流程

当出现root@xilinx-zc706-2021_1:~#打印之后,表示qemu启动zc706开发板模拟环境成功

在这里插入图片描述

启动流程如下:

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 ranges
  node   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 ready



random: crng init done
Starting tcf-agent: OK

root@xilinx-zc706-2021_1:~# 

查看cpu信息

在这里插入图片描述

可以看到zc706是xilinx zynq平台,其arm平台是双核ARMv7处理器。

查看版本信息

在这里插入图片描述

查看其它信息

在这里插入图片描述

退出qemu

执行poweroff指令执行关电操作

在这里插入图片描述

果然不出意外的卡住了

所以还是需要另外开一个窗口,执行kill命令方法退出qemu了

在这里插入图片描述

qemu运行窗口已退出qemu状态

在这里插入图片描述

于是,zc706-2021工程编译编译成功,zc706的qemu也正常启动。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值