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