summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/conf
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2022-12-24 21:59:59 -0700
committerMark Hatle <mark.hatle@amd.com>2023-01-06 10:58:21 -0800
commitfdb3e6e167665315899e796e3a6eadc8e645f44b (patch)
treef25625fc80e158b08521d941ea8e9b1a7fdba309 /meta-xilinx-core/conf
parentfeb387df7116ac5e7284039660a01467e7d77540 (diff)
downloadmeta-xilinx-fdb3e6e167665315899e796e3a6eadc8e645f44b.tar.gz
zynqmp-generic: Update machine conf file using gen-machineconf tool
1. Update machine conf file using gen-machineconf tool by parsing zcu102 xsa. 2. Use TFA_BL33_LOAD for TF-A preloadded bl33 base address. 3. Move variables which changes based on xsa before required inclusion file to handle pre-expansion values. 4. Remove uEnv.txt from IMAGE_BOOT_FILES. 5. Disable U-boot SPL boot by default. User has to set explicitly to use it. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/conf')
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-generic.conf129
1 files changed, 85 insertions, 44 deletions
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf
index 3aff9c65..bf95c117 100644
--- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf
+++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf
@@ -1,6 +1,6 @@
1#@TYPE: Machine 1#@TYPE: Machine
2#@NAME: Generic zynqmp 2#@NAME: zynqmp-generic
3#@DESCRIPTION: zynqmp devices 3#@DESCRIPTION: Machine configuration for the zynqmp-generic devices
4 4
5# Deprecated board config 5# Deprecated board config
6USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" 6USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}"
@@ -11,76 +11,117 @@ unset USE_BOARD
11MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}']}" 11MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}']}"
12#### Regular settings follow 12#### Regular settings follow
13 13
14# Variables that changes based on hw design or board specific requirement must be
15# defined before calling the required inclusion file else pre-expansion value
16# defined in local.conf without machine override will not be reflected.
17
18# Yocto device-tree variables
19YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0"
20YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0"
21DT_PADDING_SIZE:pn-device-tree ?= "0x1000"
22DTC_FLAGS:pn-device-tree = "-@"
23YAML_DT_BOARD_FLAGS ?= "{BOARD zcu102-rev1.0}"
24
25# Yocto ZynqMP u-boot-xlnx variables
26UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig"
27BOOTMODE ?= "generic.root"
28
29# By default U-boot SPL boot is disabled
30SPL_BINARY ?= ""
31
32# If user needs U-boot SPL boot, then enable SPL from local.conf as shown below.
33# SPL_BINARY = "spl/boot.bin"
34
35# Yocto ZynqMP arm-trusted-firmware(TF-A) variables
36TFA_BL33_LOAD ?= "0x8000000"
37
38# Yocto ZynqMP PMUFW variables
39YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0"
40YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0"
41
42# Yocto ZynqMP FSBL variables
43YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0"
44YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0"
45
46# Yocto ZynqMP KERNEL Variables
47UBOOT_ENTRYPOINT ?= "0x200000"
48UBOOT_LOADADDRESS ?= "0x200000"
49KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
50
51# ZynqMP Serial Console
52SERIAL_CONSOLES ?= "115200;ttyPS0"
53SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
54YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200"
55
14require conf/machine/include/soc-zynqmp.inc 56require conf/machine/include/soc-zynqmp.inc
15require conf/machine/include/machine-xilinx-default.inc 57require conf/machine/include/machine-xilinx-default.inc
16require conf/machine/include/machine-xilinx-qemu.inc 58require conf/machine/include/machine-xilinx-qemu.inc
17 59
60# zynqmp-generic.conf uses zcu102-zynqmp xsa as reference input.
61# User can override with custom xsa using HDF_BASE and HDF_PATH variables from
62# local.conf.
63HDF_MACHINE = "zcu102-zynqmp"
64
18# Machine features must result in a superset 65# Machine features must result in a superset
19# Basic features: 66# Basic features:
20MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" 67MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth"
21# Ultra96 features:
22MACHINE_FEATURES += " usbgadget wifi bluetooth"
23 68
24# Qemu Xilinx Native when targeting ZynqMP generic requries the pmu rom 69# Qemu Xilinx Native when targeting ZynqMP generic requires the pmu rom
25DEPENDS:append:pn-qemu-xilinx-native = " pmu-rom-native" 70DEPENDS:append:pn-qemu-xilinx-native = " pmu-rom-native"
26 71
27EXTRA_IMAGEDEPENDS += "libyaml-native python3-cython-native python3-pyyaml-native"
28
29UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig"
30SPL_BINARY ?= "spl/boot.bin"
31BOOTMODE ?= "generic.root"
32
33# Default SD image build onfiguration, use qemu-sd to pad 72# Default SD image build onfiguration, use qemu-sd to pad
34IMAGE_CLASSES += "image-types-xilinx-qemu" 73IMAGE_CLASSES += "image-types-xilinx-qemu"
35# Add wic.qemu-sd only if initramfs_image not set due to circular dependecies 74# Add wic.qemu-sd only if initramfs_image not set due to circular dependecies
36IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" 75IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}"
37 76
38SERIAL_CONSOLES ?= "115200;ttyPS0"
39
40MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree" 77MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree"
41 78
42# We need a generic one that works with QEMU...
43HDF_MACHINE = "zcu102-zynqmp"
44
45EXTRA_IMAGEDEPENDS += " \ 79EXTRA_IMAGEDEPENDS += " \
46 u-boot-xlnx-uenv \ 80 libyaml-native \
47 arm-trusted-firmware \ 81 python3-cython-native \
48 qemu-devicetrees \ 82 python3-pyyaml-native \
49 virtual/boot-bin \ 83 virtual/fsbl \
50 virtual/bootloader \ 84 virtual/pmu-firmware \
51 u-boot-xlnx-scr \ 85 arm-trusted-firmware \
52 " 86 virtual/boot-bin \
87 virtual/bootloader \
88 qemu-devicetrees \
89 u-boot-xlnx-uenv \
90 u-boot-xlnx-scr \
91 "
53 92
54IMAGE_BOOT_FILES += " \ 93IMAGE_BOOT_FILES += " \
55 uEnv.txt \ 94 boot.bin \
56 atf-uboot.ub \ 95 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \
57 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ 96 boot.scr \
58 boot.scr \ 97 Image \
59 " 98 "
60 99
100# ZynqMP QEMU Configurations
61# This machine has a QEMU model, runqemu setup: 101# This machine has a QEMU model, runqemu setup:
62QB_MEM = "-m 4096" 102QB_MEM = "-m 4096"
63QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" 103QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@"
64 104
65# Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) 105# Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW)
66QB_OPT_APPEND = " \ 106QB_OPT_APPEND = " \
67 -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \ 107 -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \
68 ${@qemu_zynqmp_unhalt(d, True)} \ 108 ${@qemu_zynqmp_unhalt(d, True)} \
69 -device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \ 109 -device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \
70 -device loader,file=${DEPLOY_DIR_IMAGE}/u-boot.elf \ 110 -device loader,file=${DEPLOY_DIR_IMAGE}/u-boot.elf \
71 -device loader,file=${DEPLOY_DIR_IMAGE}/system.dtb,addr=0x100000,force-raw=on \ 111 -device loader,file=${DEPLOY_DIR_IMAGE}/system.dtb,addr=0x100000,force-raw=on \
72 ${@qemu_add_extra_args(d)} \ 112 ${@qemu_add_extra_args(d)} \
73 " 113 "
74 114
75QB_PMU_OPT = " \ 115QB_PMU_OPT = " \
76 -M microblaze-fdt \ 116 -M microblaze-fdt \
77 -display none \ 117 -display none \
78 -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zynqmp-pmu.dtb \ 118 -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zynqmp-pmu.dtb \
79 -kernel ${PMU_ROM} \ 119 -kernel ${PMU_ROM} \
80 -device loader,file=${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf \ 120 -device loader,file=${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf \
81 -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ 121 -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \
82 -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ 122 -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \
83 " 123 "
124
84QB_OPT_APPEND += " -pmu-args '${QB_PMU_OPT}'" 125QB_OPT_APPEND += " -pmu-args '${QB_PMU_OPT}'"
85 126
86do_write_qemuboot_conf[depends] += "u-boot-xlnx-uenv:do_deploy" 127do_write_qemuboot_conf[depends] += "u-boot-xlnx-uenv:do_deploy"