From 8eb7bd85276d4b495c8737724c434e78503a3c87 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 30 Sep 2021 10:58:36 -0700 Subject: meta-xilinx-setup: Update dt-processor.sh The Linux build must ONLY refer to the Linux specific device tree or boot and QEMU failures can occur. The issue was resolved by ensuring that the system always considered the Linux device tree as the "system" device tree when building for the Linux OS. Additionally, as multiple device trees may be present, re-order the IMAGE_BOOT_FILES to ensure the correct device tree is listed first. This ensures that both QEMU and the u-boot configuration are referring to the correct device tree. Signed-off-by: Mark Hatle --- .../recipes-core/meta/files/README-setup | 56 ++++++++++++---------- .../recipes-core/meta/files/dt-processor.sh | 8 +++- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup b/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup index a316ecc1..41a6c0c8 100644 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup +++ b/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup @@ -1,4 +1,4 @@ -Document Version: 20210920 +Document Version: 20210930 The Yocto Project setup for the new workflow is as follows. Be sure to read everything below, as the steps will be updated in the future if the @@ -39,21 +39,26 @@ however you may use any path you wish. /prestep/dt-processor.sh # For example, zynqmp: -# /prestep/dt-processor.sh /conf /zu-sep13-sdt/system-top.dts +# /prestep/dt-processor.sh /conf /zu-sdt/system-top.dts # # Follow the instructions returned by the script! # Such as: -#To enable this, add the following to your local.conf: -# -#require conf/cortexa53-zynqmp-linux.conf -#SYSTEM_DTFILE = "/proj/yocto/zu-sep13-sdt/system-top.dts" -#BBMULTICONFIG += " cortexa53-zynqmp-fsbl-baremetal cortexa53-zynqmp-baremetal cortexr5-zynqmp-baremetal microblaze-pmu" -#FSBL_DEPENDS = "" -#FSBL_MCDEPENDS = "mc::cortexa53-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" -#FSBL_DEPLOY_DIR = "${TOPDIR}/tmp-cortexa53-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" -#PMU_DEPENDS = "" -#PMU_MCDEPENDS = "mc::microblaze-pmu:pmu-firmware:do_deploy" -#PMU_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmu/deploy/images/${MACHINE}" + +To enable this, add the following to your local.conf: + +require conf/cortexa53-zynqmp-linux.conf +SYSTEM_DTFILE = "/proj/yocto/zu_sdt/system-top.dts" +BBMULTICONFIG += " cortexa53-zynqmp-fsbl-baremetal cortexa53-zynqmp-baremetal cortexa53-zynqmp-freertos cortexr5-zynqmp-fsbl-baremetal cortexr5-zynqmp-baremetal cortexr5-zynqmp-freertos microblaze-pmu" +FSBL_DEPENDS = "" +FSBL_MCDEPENDS = "mc::cortexa53-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" +FSBL_DEPLOY_DIR = "${TOPDIR}/tmp-cortexa53-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" +R5FSBL_DEPENDS = "" +R5FSBL_MCDEPENDS = "mc::cortexr5-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" +R5FSBL_DEPLOY_DIR = "${TOPDIR}/tmp-cortexr5-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" +PMU_DEPENDS = "" +PMU_MCDEPENDS = "mc::microblaze-pmu:pmu-firmware:do_deploy" +PMU_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmu/deploy/images/${MACHINE}" + # # OR # @@ -62,18 +67,19 @@ however you may use any path you wish. # # Follow the instructions returned by the script! # Such as: -#To enable this, add the following to your local.conf: -# -#require conf/cortexa72-versal-linux.conf -#SYSTEM_DTFILE = "/proj/yocto/vck190-sdt/system-top.dts" -#BBMULTICONFIG += " cortexa72-versal-baremetal microblaze-pmc microblaze-psm cortexr5-versal-baremetal" -#PLM_DEPENDS = "" -#PLM_MCDEPENDS = "mc::microblaze-pmc:plm-firmware:do_deploy" -#PLM_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmc/deploy/images/${MACHINE}" -#PSM_DEPENDS = "" -#PSM_MCDEPENDS = "mc::microblaze-psm:psm-firmware:do_deploy" -#PSM_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-psm/deploy/images/${MACHINE}" -#PDI_PATH = "__PATH TO PDI FILE HERE__" + +To enable this, add the following to your local.conf: + +require conf/cortexa72-versal-linux.conf +SYSTEM_DTFILE = "/proj/yocto/mhatle/DTB-FLOW/testing/vck190-sdt/system-top.dts" +BBMULTICONFIG += " cortexa72-versal-baremetal cortexa72-versal-freertos microblaze-pmc microblaze-psm cortexr5-versal-baremetal cortexr5-versal-freertos" +PLM_DEPENDS = "" +PLM_MCDEPENDS = "mc::microblaze-pmc:plm-firmware:do_deploy" +PLM_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmc/deploy/images/${MACHINE}" +PSM_DEPENDS = "" +PSM_MCDEPENDS = "mc::microblaze-psm:psm-firmware:do_deploy" +PSM_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-psm/deploy/images/${MACHINE}" +PDI_PATH = "__PATH TO PDI FILE HERE__" # NOTE: On versal, you MUST specify the PDI file as directed by the instructions. # such as: PDI_PATH = "__PATH TO PDI FILE HERE__" diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh index 1f6f1ef3..8a313dd8 100755 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh +++ b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh @@ -100,13 +100,15 @@ cortex_a53_linux() { CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" MACHINE = "${machine}-generic" # Override the SYSTEM_DTFILE for Linux builds -SYSTEM_DTFILE = "${CONFIG_DTFILE}" +SYSTEM_DTFILE_linux = "\${CONFIG_DTFILE}" # We don't want the kernel to build us a device-tree KERNEL_DEVICETREE_${machine}-generic = "" # We need u-boot to use the one we passed in DEVICE_TREE_NAME:pn-u-boot-zynq-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" # Update bootbin to use proper device tree BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" +# Remap boot files to ensure the right device tree is listed first +IMAGE_BOOT_FILES = "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))} \${@get_default_image_boot_files(d)}" EOF } @@ -229,13 +231,15 @@ cortex_a72_linux() { CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" MACHINE = "${machine}-generic" # Override the SYSTEM_DTFILE for Linux builds -SYSTEM_DTFILE = "${CONFIG_DTFILE}" +SYSTEM_DTFILE_linux = "\${CONFIG_DTFILE}" # We don't want the kernel to build us a device-tree KERNEL_DEVICETREE_${machine}-generic = "" # We need u-boot to use the one we passed in DEVICE_TREE_NAME:pn-u-boot-zynq-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" # Update bootbin to use proper device tree BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" +# Remap boot files to ensure the right device tree is listed first +IMAGE_BOOT_FILES = "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))} \${@get_default_image_boot_files(d)}" EOF } -- cgit v1.2.3-54-g00ecf