From dfafee05cf7f936a0941240ca43dedc06e6e12cc Mon Sep 17 00:00:00 2001 From: Sandeep Gundlupet Raju Date: Sat, 24 Dec 2022 22:00:00 -0700 Subject: zynq-generic: Update machine conf file using gen-machineconf tool 1. Update machine conf file using gen-machineconf tool by parsing zc702 xsa. 2. Add UIMAGE_LOADADDR to KERNEL_EXTRA_ARGS. 3. Move variables which changes based on xsa before required inclusion file to handle pre-expansion values. 4. Add uImage to IMAGE_BOOT_FILES. Signed-off-by: Sandeep Gundlupet Raju Signed-off-by: Mark Hatle --- meta-xilinx-core/conf/machine/zynq-generic.conf | 68 ++++++++++++++++++------- 1 file changed, 50 insertions(+), 18 deletions(-) (limited to 'meta-xilinx-core/conf') diff --git a/meta-xilinx-core/conf/machine/zynq-generic.conf b/meta-xilinx-core/conf/machine/zynq-generic.conf index c79db9f0..a4e6e725 100644 --- a/meta-xilinx-core/conf/machine/zynq-generic.conf +++ b/meta-xilinx-core/conf/machine/zynq-generic.conf @@ -1,6 +1,6 @@ #@TYPE: Machine -#@NAME: Generic Zynq -#@DESCRIPTION: Generic Zynq Device +#@NAME: zynq-generic +#@DESCRIPTION: Machine configuration for the zynq-generic devices # Deprecated board config USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" @@ -11,39 +11,71 @@ unset USE_BOARD MACHINEOVERRIDES =. "${@['', 'zynq-generic:']['zynq-generic' != '${MACHINE}']}" #### Regular settings follow -require conf/machine/include/soc-zynq.inc -require conf/machine/include/machine-xilinx-default.inc -require conf/machine/include/machine-xilinx-qemu.inc - -MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget" +# Variables that changes based on hw design or board specific requirement must be +# defined before calling the required inclusion file else pre-expansion value +# defined in local.conf without machine override will not be reflected. -EXTRA_IMAGEDEPENDS += "libyaml-native python3-cython-native python3-pyyaml-native" +# Yocto Zynq-7000 device-tree variables +YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "ps7_uart_1" +YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PS7_DDR_0" +DT_PADDING_SIZE:pn-device-tree ?= "0x1000" +DTC_FLAGS:pn-device-tree = "-@" +YAML_DT_BOARD_FLAGS ?= "{BOARD zc702}" +# Yocto Zynq-7000 u-boot-xlnx variables UBOOT_MACHINE ?= "xilinx_zynq_virt_defconfig" BOOTMODE ?= "generic.root" +# Yocto Zynq-7000 FSBL variables +YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "ps7_uart_1" +YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "ps7_uart_1" + +# Yocto KERNEL Variables +UBOOT_ENTRYPOINT ?= "0x200000" +UBOOT_LOADADDRESS ?= "0x200000" +KERNEL_EXTRA_ARGS += "UIMAGE_LOADADDR=${UBOOT_ENTRYPOINT}" + +# Zynq-7000 Serial Console settings SERIAL_CONSOLES ?= "115200;ttyPS0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" + +require conf/machine/include/soc-zynq.inc +require conf/machine/include/machine-xilinx-default.inc +require conf/machine/include/machine-xilinx-qemu.inc + +# zynq-generic.conf uses zc702-zynq7 xsa as reference input. +# User can override with custom xsa using HDF_BASE and HDF_PATH variables from +# local.conf. +HDF_MACHINE = "zc702-zynq7" + +MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "device-tree" EXTRA_IMAGEDEPENDS += " \ - virtual/boot-bin \ - virtual/fsbl \ - virtual/bootloader \ - u-boot-xlnx-scr \ - " + libyaml-native \ + python3-cython-native \ + python3-pyyaml-native \ + virtual/fsbl \ + virtual/boot-bin \ + virtual/bootloader \ + u-boot-xlnx-scr \ + " IMAGE_BOOT_FILES += " \ - boot.bin \ - ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ - boot.scr \ - " + boot.bin \ + ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ + boot.scr \ + uImage \ + " -HDF_MACHINE = "zc702-zynq7" IMAGE_CLASSES += "image-types-xilinx-qemu" # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz'}" +# Zynq-7000 QEMU Configurations +# This machine has a QEMU model, runqemu setup: QB_MEM = "-m 1024" QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" -- cgit v1.2.3-54-g00ecf