blob: 281110d9653947d9a45f14ab9f86d42da7ef87cf [file] [log] [blame]
#@TYPE: Machine
#@NAME: zcu102-zynqmp
#@DESCRIPTION: Machine support for ZCU102 Evaluation Board.
SOC_VARIANT ?= "eg"
require conf/machine/include/tune-zynqmp.inc
require conf/machine/include/machine-xilinx-overrides.inc
require conf/machine/include/machine-xilinx-default.inc
require conf/machine/include/machine-xilinx-qemu.inc
MACHINE_FEATURES = "rtc ext2 ext3 vfat usbhost"
UBOOT_MACHINE = "xilinx_zynqmp_zcu102_rev1_0_defconfig"
SPL_BINARY ?= "spl/boot.bin"
# Default SD image build onfiguration, use qemu-sd to pad
IMAGE_CLASSES += "image-types-xilinx-qemu"
IMAGE_FSTYPES += "wic.qemu-sd"
WKS_FILES ?= "sdimage-bootpart.wks"
SERIAL_CONSOLE = "115200 ttyPS0"
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
KERNEL_DEVICETREE = "xilinx/zynqmp-zcu102-rev1.0.dtb"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-xlnx"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-xlnx"
EXTRA_IMAGEDEPENDS += " \
u-boot-zynq-uenv \
arm-trusted-firmware \
qemu-devicetrees \
virtual/boot-bin \
virtual/bootloader \
"
IMAGE_BOOT_FILES += " \
uEnv.txt \
atf-uboot.ub \
"
# This machine has a QEMU model, runqemu setup:
IMAGE_CLASSES += "qemuboot-xilinx"
QB_MACHINE = "-machine xlnx-zcu102"
QB_MEM = "-m 4096"
QB_OPT_APPEND ?= "-nographic -serial mon:stdio -serial null"
QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@"
# Use qemu-xilinx instead of mainline
PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native"
# Use the multiarch script instead of launching QEMU directly
QB_SYSTEM_NAME_append = "-multiarch"
# Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW)
QB_OPT_APPEND_append_qemuboot-xilinx = " \
-hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \
${@qemu_zynqmp_unhalt(d, True)} \
-device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \
-device loader,file=${DEPLOY_DIR_IMAGE}/u-boot.elf \
"
# Attach the rootfs disk image to the second SD interface of QEMU (which is SD0)
QB_DEFAULT_FSTYPE_qemuboot-xilinx = "wic.qemu-sd"
QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=5"
QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw"
# PMU instance args
PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf"
PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu"
PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu"
QB_PMU_OPT = " \
-M microblaze-fdt \
-display none \
-hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zynqmp-pmu.dtb \
-kernel ${PMU_ROM} \
-device loader,file=${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf \
-device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \
-device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \
"
QB_OPT_APPEND_append_qemuboot-xilinx = " -pmu-args '${QB_PMU_OPT}'"
do_write_qemuboot_conf[depends] += "u-boot-zynq-uenv:do_deploy"