diff options
| author | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> | 2022-12-24 21:59:59 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-04-10 09:03:22 -0700 |
| commit | 4afc350ef9f53ea337cf33ea444d2a21085c2e60 (patch) | |
| tree | d0b3d15999b9da24fa87925fa231ebdc9b297f7a | |
| parent | 3c3eefb756e7961ab7006e1d883f85670c3e8ff4 (diff) | |
| download | meta-xilinx-4afc350ef9f53ea337cf33ea444d2a21085c2e60.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>
| -rw-r--r-- | meta-xilinx-core/conf/machine/zynqmp-generic.conf | 129 |
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 |
| 6 | USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" | 6 | USE_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 | |||
| 11 | MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}']}" | 11 | MACHINEOVERRIDES =. "${@['', '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 | ||
| 19 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
| 20 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
| 21 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
| 22 | DTC_FLAGS:pn-device-tree = "-@" | ||
| 23 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu102-rev1.0}" | ||
| 24 | |||
| 25 | # Yocto ZynqMP u-boot-xlnx variables | ||
| 26 | UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig" | ||
| 27 | BOOTMODE ?= "generic.root" | ||
| 28 | |||
| 29 | # By default U-boot SPL boot is disabled | ||
| 30 | SPL_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 | ||
| 36 | TFA_BL33_LOAD ?= "0x8000000" | ||
| 37 | |||
| 38 | # Yocto ZynqMP PMUFW variables | ||
| 39 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
| 40 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
| 41 | |||
| 42 | # Yocto ZynqMP FSBL variables | ||
| 43 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
| 44 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
| 45 | |||
| 46 | # Yocto ZynqMP KERNEL Variables | ||
| 47 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
| 48 | UBOOT_LOADADDRESS ?= "0x200000" | ||
| 49 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" | ||
| 50 | |||
| 51 | # ZynqMP Serial Console | ||
| 52 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
| 53 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" | ||
| 54 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
| 55 | |||
| 14 | require conf/machine/include/soc-zynqmp.inc | 56 | require conf/machine/include/soc-zynqmp.inc |
| 15 | require conf/machine/include/machine-xilinx-default.inc | 57 | require conf/machine/include/machine-xilinx-default.inc |
| 16 | require conf/machine/include/machine-xilinx-qemu.inc | 58 | require 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. | ||
| 63 | HDF_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: |
| 20 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" | 67 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" |
| 21 | # Ultra96 features: | ||
| 22 | MACHINE_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 |
| 25 | DEPENDS:append:pn-qemu-xilinx-native = " pmu-rom-native" | 70 | DEPENDS:append:pn-qemu-xilinx-native = " pmu-rom-native" |
| 26 | 71 | ||
| 27 | EXTRA_IMAGEDEPENDS += "libyaml-native python3-cython-native python3-pyyaml-native" | ||
| 28 | |||
| 29 | UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig" | ||
| 30 | SPL_BINARY ?= "spl/boot.bin" | ||
| 31 | BOOTMODE ?= "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 |
| 34 | IMAGE_CLASSES += "image-types-xilinx-qemu" | 73 | IMAGE_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 |
| 36 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" | 75 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" |
| 37 | 76 | ||
| 38 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
| 39 | |||
| 40 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree" | 77 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree" |
| 41 | 78 | ||
| 42 | # We need a generic one that works with QEMU... | ||
| 43 | HDF_MACHINE = "zcu102-zynqmp" | ||
| 44 | |||
| 45 | EXTRA_IMAGEDEPENDS += " \ | 79 | EXTRA_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 | ||
| 54 | IMAGE_BOOT_FILES += " \ | 93 | IMAGE_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: |
| 62 | QB_MEM = "-m 4096" | 102 | QB_MEM = "-m 4096" |
| 63 | QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" | 103 | QB_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) |
| 66 | QB_OPT_APPEND = " \ | 106 | QB_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 | ||
| 75 | QB_PMU_OPT = " \ | 115 | QB_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 | |||
| 84 | QB_OPT_APPEND += " -pmu-args '${QB_PMU_OPT}'" | 125 | QB_OPT_APPEND += " -pmu-args '${QB_PMU_OPT}'" |
| 85 | 126 | ||
| 86 | do_write_qemuboot_conf[depends] += "u-boot-xlnx-uenv:do_deploy" | 127 | do_write_qemuboot_conf[depends] += "u-boot-xlnx-uenv:do_deploy" |
