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