| #@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-board.inc |
| require conf/machine/include/machine-xilinx-qemu.inc |
| include conf/machine/include/zynqmp-pmu-config.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" |
| PREFERRED_PROVIDER_virtual/pmu-firmware ?= "zynqmp-pmu-pmu-firmware" |
| |
| EXTRA_IMAGEDEPENDS += " \ |
| u-boot-zynq-uenv \ |
| arm-trusted-firmware \ |
| qemu-devicetrees \ |
| virtual/pmu-firmware \ |
| virtual/boot-bin \ |
| " |
| |
| IMAGE_BOOT_FILES += "uEnv.txt atf-uboot.ub ${KERNEL_IMAGETYPE}-zynqmp-zcu102-rev1.0.dtb" |
| |
| # 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=3" |
| 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" |
| 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=${DEPLOY_DIR_IMAGE}/pmu-firmware-${MACHINE}.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}'" |
| |