diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-09-30 10:58:36 -0700 |
|---|---|---|
| committer | Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | 2021-11-02 00:23:38 -0700 |
| commit | 8eb7bd85276d4b495c8737724c434e78503a3c87 (patch) | |
| tree | 759460f0eec34d28f71f2db90f6f9b20580a1987 | |
| parent | 014e0e885e8a8d280490dff2c9b8ddd2bf6a0a0b (diff) | |
| download | meta-xilinx-8eb7bd85276d4b495c8737724c434e78503a3c87.tar.gz | |
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 <mark.hatle@xilinx.com>
| -rw-r--r-- | meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup | 56 | ||||
| -rwxr-xr-x | meta-xilinx-standalone-experimental/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 @@ | |||
| 1 | Document Version: 20210920 | 1 | Document Version: 20210930 |
| 2 | 2 | ||
| 3 | The Yocto Project setup for the new workflow is as follows. Be sure to read | 3 | The Yocto Project setup for the new workflow is as follows. Be sure to read |
| 4 | everything below, as the steps will be updated in the future if the | 4 | 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. | |||
| 39 | <build>/prestep/dt-processor.sh <path_to_conf> <dtb> | 39 | <build>/prestep/dt-processor.sh <path_to_conf> <dtb> |
| 40 | 40 | ||
| 41 | # For example, zynqmp: | 41 | # For example, zynqmp: |
| 42 | # <build>/prestep/dt-processor.sh <build>/conf <device-tree>/zu-sep13-sdt/system-top.dts | 42 | # <build>/prestep/dt-processor.sh <build>/conf <device-tree>/zu-sdt/system-top.dts |
| 43 | # | 43 | # |
| 44 | # Follow the instructions returned by the script! | 44 | # Follow the instructions returned by the script! |
| 45 | # Such as: | 45 | # Such as: |
| 46 | #To enable this, add the following to your local.conf: | 46 | |
| 47 | # | 47 | To enable this, add the following to your local.conf: |
| 48 | #require conf/cortexa53-zynqmp-linux.conf | 48 | |
| 49 | #SYSTEM_DTFILE = "/proj/yocto/zu-sep13-sdt/system-top.dts" | 49 | require conf/cortexa53-zynqmp-linux.conf |
| 50 | #BBMULTICONFIG += " cortexa53-zynqmp-fsbl-baremetal cortexa53-zynqmp-baremetal cortexr5-zynqmp-baremetal microblaze-pmu" | 50 | SYSTEM_DTFILE = "/proj/yocto/zu_sdt/system-top.dts" |
| 51 | #FSBL_DEPENDS = "" | 51 | BBMULTICONFIG += " cortexa53-zynqmp-fsbl-baremetal cortexa53-zynqmp-baremetal cortexa53-zynqmp-freertos cortexr5-zynqmp-fsbl-baremetal cortexr5-zynqmp-baremetal cortexr5-zynqmp-freertos microblaze-pmu" |
| 52 | #FSBL_MCDEPENDS = "mc::cortexa53-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" | 52 | FSBL_DEPENDS = "" |
| 53 | #FSBL_DEPLOY_DIR = "${TOPDIR}/tmp-cortexa53-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" | 53 | FSBL_MCDEPENDS = "mc::cortexa53-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" |
| 54 | #PMU_DEPENDS = "" | 54 | FSBL_DEPLOY_DIR = "${TOPDIR}/tmp-cortexa53-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" |
| 55 | #PMU_MCDEPENDS = "mc::microblaze-pmu:pmu-firmware:do_deploy" | 55 | R5FSBL_DEPENDS = "" |
| 56 | #PMU_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmu/deploy/images/${MACHINE}" | 56 | R5FSBL_MCDEPENDS = "mc::cortexr5-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" |
| 57 | R5FSBL_DEPLOY_DIR = "${TOPDIR}/tmp-cortexr5-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" | ||
| 58 | PMU_DEPENDS = "" | ||
| 59 | PMU_MCDEPENDS = "mc::microblaze-pmu:pmu-firmware:do_deploy" | ||
| 60 | PMU_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmu/deploy/images/${MACHINE}" | ||
| 61 | |||
| 57 | # | 62 | # |
| 58 | # OR | 63 | # OR |
| 59 | # | 64 | # |
| @@ -62,18 +67,19 @@ however you may use any path you wish. | |||
| 62 | # | 67 | # |
| 63 | # Follow the instructions returned by the script! | 68 | # Follow the instructions returned by the script! |
| 64 | # Such as: | 69 | # Such as: |
| 65 | #To enable this, add the following to your local.conf: | 70 | |
| 66 | # | 71 | To enable this, add the following to your local.conf: |
| 67 | #require conf/cortexa72-versal-linux.conf | 72 | |
| 68 | #SYSTEM_DTFILE = "/proj/yocto/vck190-sdt/system-top.dts" | 73 | require conf/cortexa72-versal-linux.conf |
| 69 | #BBMULTICONFIG += " cortexa72-versal-baremetal microblaze-pmc microblaze-psm cortexr5-versal-baremetal" | 74 | SYSTEM_DTFILE = "/proj/yocto/mhatle/DTB-FLOW/testing/vck190-sdt/system-top.dts" |
| 70 | #PLM_DEPENDS = "" | 75 | BBMULTICONFIG += " cortexa72-versal-baremetal cortexa72-versal-freertos microblaze-pmc microblaze-psm cortexr5-versal-baremetal cortexr5-versal-freertos" |
| 71 | #PLM_MCDEPENDS = "mc::microblaze-pmc:plm-firmware:do_deploy" | 76 | PLM_DEPENDS = "" |
| 72 | #PLM_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmc/deploy/images/${MACHINE}" | 77 | PLM_MCDEPENDS = "mc::microblaze-pmc:plm-firmware:do_deploy" |
| 73 | #PSM_DEPENDS = "" | 78 | PLM_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-pmc/deploy/images/${MACHINE}" |
| 74 | #PSM_MCDEPENDS = "mc::microblaze-psm:psm-firmware:do_deploy" | 79 | PSM_DEPENDS = "" |
| 75 | #PSM_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-psm/deploy/images/${MACHINE}" | 80 | PSM_MCDEPENDS = "mc::microblaze-psm:psm-firmware:do_deploy" |
| 76 | #PDI_PATH = "__PATH TO PDI FILE HERE__" | 81 | PSM_FIRMWARE_DEPLOY_DIR = "${TOPDIR}/tmp-microblaze-psm/deploy/images/${MACHINE}" |
| 82 | PDI_PATH = "__PATH TO PDI FILE HERE__" | ||
| 77 | 83 | ||
| 78 | # NOTE: On versal, you MUST specify the PDI file as directed by the instructions. | 84 | # NOTE: On versal, you MUST specify the PDI file as directed by the instructions. |
| 79 | # such as: PDI_PATH = "__PATH TO PDI FILE HERE__" | 85 | # 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() { | |||
| 100 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 100 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
| 101 | MACHINE = "${machine}-generic" | 101 | MACHINE = "${machine}-generic" |
| 102 | # Override the SYSTEM_DTFILE for Linux builds | 102 | # Override the SYSTEM_DTFILE for Linux builds |
| 103 | SYSTEM_DTFILE = "${CONFIG_DTFILE}" | 103 | SYSTEM_DTFILE_linux = "\${CONFIG_DTFILE}" |
| 104 | # We don't want the kernel to build us a device-tree | 104 | # We don't want the kernel to build us a device-tree |
| 105 | KERNEL_DEVICETREE_${machine}-generic = "" | 105 | KERNEL_DEVICETREE_${machine}-generic = "" |
| 106 | # We need u-boot to use the one we passed in | 106 | # We need u-boot to use the one we passed in |
| 107 | DEVICE_TREE_NAME:pn-u-boot-zynq-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | 107 | DEVICE_TREE_NAME:pn-u-boot-zynq-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" |
| 108 | # Update bootbin to use proper device tree | 108 | # Update bootbin to use proper device tree |
| 109 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | 109 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" |
| 110 | # Remap boot files to ensure the right device tree is listed first | ||
| 111 | IMAGE_BOOT_FILES = "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))} \${@get_default_image_boot_files(d)}" | ||
| 110 | EOF | 112 | EOF |
| 111 | } | 113 | } |
| 112 | 114 | ||
| @@ -229,13 +231,15 @@ cortex_a72_linux() { | |||
| 229 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 231 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
| 230 | MACHINE = "${machine}-generic" | 232 | MACHINE = "${machine}-generic" |
| 231 | # Override the SYSTEM_DTFILE for Linux builds | 233 | # Override the SYSTEM_DTFILE for Linux builds |
| 232 | SYSTEM_DTFILE = "${CONFIG_DTFILE}" | 234 | SYSTEM_DTFILE_linux = "\${CONFIG_DTFILE}" |
| 233 | # We don't want the kernel to build us a device-tree | 235 | # We don't want the kernel to build us a device-tree |
| 234 | KERNEL_DEVICETREE_${machine}-generic = "" | 236 | KERNEL_DEVICETREE_${machine}-generic = "" |
| 235 | # We need u-boot to use the one we passed in | 237 | # We need u-boot to use the one we passed in |
| 236 | DEVICE_TREE_NAME:pn-u-boot-zynq-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | 238 | DEVICE_TREE_NAME:pn-u-boot-zynq-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" |
| 237 | # Update bootbin to use proper device tree | 239 | # Update bootbin to use proper device tree |
| 238 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | 240 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" |
| 241 | # Remap boot files to ensure the right device tree is listed first | ||
| 242 | IMAGE_BOOT_FILES = "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))} \${@get_default_image_boot_files(d)}" | ||
| 239 | EOF | 243 | EOF |
| 240 | } | 244 | } |
| 241 | 245 | ||
