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