From 4762f741e62b3d21294d9eac4e56e949f0a9de20 Mon Sep 17 00:00:00 2001 From: Sai Hari Chandana Kalluri Date: Mon, 16 Mar 2020 12:33:08 -0700 Subject: zc702-zynq7: Add qemu wiring for zc702 machine Enable qemuboot for zc702-zynq7 machine using qemu-xilinx provider Signed-off-by: Sai Hari Chandana Kalluri Signed-off-by: Mark Hatle --- meta-xilinx-bsp/classes/qemuboot-xilinx.bbclass | 3 ++- meta-xilinx-bsp/conf/machine/zc702-zynq7.conf | 24 +++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/meta-xilinx-bsp/classes/qemuboot-xilinx.bbclass b/meta-xilinx-bsp/classes/qemuboot-xilinx.bbclass index 024626cb..e30712c0 100644 --- a/meta-xilinx-bsp/classes/qemuboot-xilinx.bbclass +++ b/meta-xilinx-bsp/classes/qemuboot-xilinx.bbclass @@ -3,7 +3,8 @@ OVERRIDES .= ":qemuboot-xilinx" # setup the target binary -QB_SYSTEM_NAME_prepend = "qemu-xilinx/" +QB_SYSTEM_NAME_prepend_aarch64 = "qemu-xilinx/" +QB_SYSTEM_NAME_prepend_microblaze = "qemu-xilinx/" # Default machine targets for Xilinx QEMU (FDT Generic) QB_MACHINE_aarch64 = "-machine arm-generic-fdt" diff --git a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf index 9642fd96..cd23a9d9 100644 --- a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf +++ b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf @@ -36,15 +36,29 @@ IMAGE_BOOT_FILES += " \ boot.scr \ " +IMAGE_CLASSES += "qemuboot-xilinx" # Although not fully supported you can run this machine on the mainline QEMU 'xilinx-zynq-a9' machine -IMAGE_CLASSES += "qemuboot" QB_MEM = "-m 1024" -QB_MACHINE = "-machine xilinx-zynq-a9" -QB_OPT_APPEND = "-nographic -serial null -serial mon:stdio" -QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" +QB_NETWORK_DEVICE = "-net nic,netdev=eth0 -netdev user,id=eth0,tftp=/tftpboot -net nic" +QB_DEFAULT_KERNEL_qemuboot-xilinx = "zImage" + +QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" +QB_DEFAULT_FSTYPE = "cpio.gz.u-boot" +QB_DTB = "system.dtb" +QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" # Xilinx's fork of QEMU has much better results, so let's default to that # Use qemu-xilinx instead of mainline PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native" -IMAGE_CLASSES += "qemuboot-xilinx" +# Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) +QB_OPT_APPEND = " \ + -nographic -serial null -serial mon:stdio \ + -initrd ${DEPLOY_DIR_IMAGE}/petalinux-image-minimal-zc702-zynq7.cpio.gz.u-boot \ + -gdb tcp::9000 \ + -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 \ + " -- cgit v1.2.3-54-g00ecf