blob: d7f19ca6f2a5cc0e3ba08de61c09b01b35c8f38a [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001#@TYPE: Machine
2#@NAME: zcu102-zynqmp
3#@DESCRIPTION: Machine support for ZCU102 Evaluation Board.
4
5SOC_VARIANT ?= "eg"
6
7require conf/machine/include/tune-zynqmp.inc
8require conf/machine/include/machine-xilinx-overrides.inc
9require conf/machine/include/machine-xilinx-default.inc
10require conf/machine/include/machine-xilinx-board.inc
11require conf/machine/include/machine-xilinx-qemu.inc
12include conf/machine/include/zynqmp-pmu-config.inc
13
14MACHINE_FEATURES = "rtc ext2 ext3 vfat usbhost"
15
16UBOOT_MACHINE = "xilinx_zynqmp_zcu102_rev1_0_defconfig"
17SPL_BINARY = "spl/boot.bin"
18
19# Default SD image build onfiguration, use qemu-sd to pad
20IMAGE_CLASSES += "image-types-xilinx-qemu"
21IMAGE_FSTYPES += "wic.qemu-sd"
22WKS_FILES ?= "sdimage-bootpart.wks"
23
24SERIAL_CONSOLE = "115200 ttyPS0"
25SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
26
27KERNEL_DEVICETREE = "xilinx/zynqmp-zcu102-rev1.0.dtb"
28
29PREFERRED_PROVIDER_virtual/kernel ?= "linux-xlnx"
30PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-xlnx"
31PREFERRED_PROVIDER_virtual/pmu-firmware ?= "zynqmp-pmu-pmu-firmware"
32
33EXTRA_IMAGEDEPENDS += " \
34 u-boot-zynq-uenv \
35 arm-trusted-firmware \
36 qemu-devicetrees \
37 virtual/pmu-firmware \
38 virtual/boot-bin \
39 "
40
41IMAGE_BOOT_FILES += "uEnv.txt atf-uboot.ub ${KERNEL_IMAGETYPE}-zynqmp-zcu102-rev1.0.dtb"
42
43# This machine has a QEMU model, runqemu setup:
44IMAGE_CLASSES += "qemuboot-xilinx"
45QB_MACHINE = "-machine xlnx-zcu102"
46QB_MEM = "-m 4096"
47QB_OPT_APPEND = "-nographic -serial mon:stdio -serial null"
48QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@"
49
50# Use qemu-xilinx instead of mainline
51PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native"
52
53# Use the multiarch script instead of launching QEMU directly
54QB_SYSTEM_NAME_append = "-multiarch"
55
56# Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW)
57QB_OPT_APPEND_append_qemuboot-xilinx = " \
58 -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \
59 ${@qemu_zynqmp_unhalt(d, True)} \
60 -device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \
61 -device loader,file=${DEPLOY_DIR_IMAGE}/u-boot.elf \
62 "
63
64# Attach the rootfs disk image to the second SD interface of QEMU (which is SD0)
65QB_DEFAULT_FSTYPE_qemuboot-xilinx = "wic.qemu-sd"
66QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=3"
67QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw"
68
69# PMU instance args
70PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf"
71QB_PMU_OPT = " \
72 -M microblaze-fdt \
73 -display none \
74 -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zynqmp-pmu.dtb \
75 -kernel ${PMU_ROM} \
76 -device loader,file=${DEPLOY_DIR_IMAGE}/pmu-firmware-${MACHINE}.elf \
77 -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \
78 -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \
79 "
80QB_OPT_APPEND_append_qemuboot-xilinx = " -pmu-args '${QB_PMU_OPT}'"
81