Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 1 | #@TYPE: Machine |
| 2 | #@NAME: vmk180-versal |
| 3 | ##@DESCRIPTION: Machine support for vmk180-versal . |
| 4 | |
| 5 | require conf/machine/include/soc-versal.inc |
| 6 | require conf/machine/include/machine-xilinx-default.inc |
| 7 | require conf/machine/include/machine-xilinx-qemu.inc |
| 8 | |
| 9 | MACHINE_FEATURES = "rtc ext2 ext3 vfat usbhost" |
| 10 | |
| 11 | UBOOT_MACHINE ?= "xilinx_versal_virt_defconfig" |
| 12 | |
| 13 | SERIAL_CONSOLES ?= "115200;ttyAMA0" |
| 14 | |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 15 | IMAGE_CLASSES += "image-types-xilinx-qemu" |
| 16 | IMAGE_FSTYPES += "wic.qemu-sd" |
| 17 | WKS_FILES ?= "sdimage-bootpart.wks" |
| 18 | |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 19 | EXTRA_IMAGEDEPENDS += " \ |
| 20 | arm-trusted-firmware \ |
| 21 | virtual/boot-bin \ |
| 22 | virtual/bootloader \ |
| 23 | virtual/psm-firmware \ |
| 24 | virtual/plm \ |
| 25 | u-boot-zynq-scr \ |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 26 | qemu-devicetrees \ |
| 27 | virtual/cdo \ |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 28 | " |
| 29 | |
| 30 | IMAGE_BOOT_FILES += " \ |
| 31 | boot.bin \ |
| 32 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ |
| 33 | Image \ |
| 34 | boot.scr \ |
| 35 | " |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 36 | |
| 37 | # This machine has a QEMU model, runqemu setup: |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 38 | QB_MEM = "-m 8G" |
| 39 | QB_DEFAULT_KERNEL = "none" |
| 40 | QB_NETWORK_DEVICE = "" |
| 41 | QB_KERNEL_CMDLINE_APPEND ?= "" |
| 42 | QB_NET = "none" |
| 43 | |
| 44 | QB_DEFAULT_FSTYPE_qemuboot-xilinx = "wic.qemu-sd" |
| 45 | QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=5" |
| 46 | QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" |
| 47 | |
| 48 | # Use booti 80000 6000000 4000000 to launch |
| 49 | QB_OPT_APPEND ?= " -serial null -serial null -serial mon:stdio -display none" |
| 50 | |
| 51 | QB_OPT_APPEND_append_qemuboot-xilinx = " \ |
| 52 | -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/board-versal-ps-vc-p-a2197-00.dtb \ |
| 53 | -display none \ |
| 54 | -net nic -net user,tftp=${DEPLOY_DIR_IMAGE} \ |
| 55 | " |
| 56 | |
| 57 | # PLM instance args |
| 58 | QB_PLM_OPT = " \ |
| 59 | -M microblaze-fdt \ |
| 60 | -device loader,file=${DEPLOY_DIR_IMAGE}/BOOT-${MACHINE}_bh.bin,addr=0xF201E000,force-raw \ |
| 61 | -device loader,addr=0xf0000000,data=0xba020004,data-len=4 \ |
| 62 | -device loader,addr=0xf0000004,data=0xb800fffc,data-len=4 \ |
| 63 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw \ |
| 64 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ |
| 65 | -device loader,addr=0xF1110624,data=0x0,data-len=4 \ |
| 66 | -device loader,addr=0xF1110620,data=0x1,data-len=4 \ |
| 67 | -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/board-versal-pmc-vc-p-a2197-00.dtb \ |
| 68 | -display none \ |
| 69 | " |
| 70 | QB_OPT_APPEND_append_qemuboot-xilinx = " -plm-args '${QB_PLM_OPT}'" |