diff options
16 files changed, 258 insertions, 65 deletions
diff --git a/meta-xilinx-core/conf/machine/include/soc-versal.inc b/meta-xilinx-core/conf/machine/include/soc-versal.inc index f2a033ad..40145963 100644 --- a/meta-xilinx-core/conf/machine/include/soc-versal.inc +++ b/meta-xilinx-core/conf/machine/include/soc-versal.inc | |||
| @@ -22,14 +22,14 @@ UBOOT_ELF ?= "u-boot.elf" | |||
| 22 | 22 | ||
| 23 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version | 23 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version |
| 24 | # The Linux compatible plm/psm-firmware though requires meta-xilinx-tools | 24 | # The Linux compatible plm/psm-firmware though requires meta-xilinx-tools |
| 25 | PLM_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '', 'plm-firmware:do_deploy', d)}" | 25 | PLM_DEPENDS ??= "" |
| 26 | PLM_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'mc::versal-fw:plm-firmware:do_deploy', '', d)}" | 26 | PLM_MCDEPENDS ??= "" |
| 27 | PLM_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | 27 | PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" |
| 28 | PLM_IMAGE_NAME ??= "plm-${MACHINE}" | ||
| 28 | PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | 29 | PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 29 | PLM_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'plm-versal-mb', 'plm-${MACHINE}', d)}" | ||
| 30 | 30 | ||
| 31 | PSM_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '', 'psm-firmware:do_deploy', d)}" | 31 | PSM_DEPENDS ??= "" |
| 32 | PSM_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'mc::versal-fw:psm-firmware:do_deploy', '', d)}" | 32 | PSM_MCDEPENDS ??= "" |
| 33 | PSM_FIRMWARE_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | 33 | PSM_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" |
| 34 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}" | ||
| 34 | PSM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | 35 | PSM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 35 | PSM_FIRMWARE_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'psm-firmware-versal-mb', 'psm-firmware-${MACHINE}', d)}" | ||
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc index e32fd617..d67fa95d 100644 --- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc +++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc | |||
| @@ -34,18 +34,12 @@ XSERVER_EXT:zynqmp ?= "xf86-video-armsoc" | |||
| 34 | # Default PMU ROM | 34 | # Default PMU ROM |
| 35 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" | 35 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" |
| 36 | 36 | ||
| 37 | # Default, if multiconfig is off, call pmu-firmware directly, otherwise call the zynqmp-pmufw multiconfig version | 37 | |
| 38 | # The Linux compatible pmu-firmware though requires meta-xilinx-tools | 38 | # Default expects the user to provide a specific pmu-firwmare in the deploy |
| 39 | PMU_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', '', 'pmu-firmware:do_deploy', d)}" | 39 | # directory, named "pmu-firmware-${MACHINE}.elf" and "pmu-firmware-${MACHINE}.bin" |
| 40 | PMU_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'mc::zynqmp-pmufw:pmu-firmware:do_deploy', '', d)}" | 40 | PMU_DEPENDS ??= "" |
| 41 | PMU_FIRMWARE_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', '${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | 41 | PMU_MCDEPENDS ??= "" |
| 42 | PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
| 43 | PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}" | ||
| 44 | |||
| 42 | PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | 45 | PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 43 | PMU_FIRMWARE_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'pmu-firmware-zynqmp-pmu', 'pmu-firmware-${MACHINE}', d)}" | ||
| 44 | |||
| 45 | # Default, if multiconfig is off, the fsbl is in the regular deploydir, otherwise | ||
| 46 | # it is located under a multiconfig specific deploydir | ||
| 47 | FSBL_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '', 'fsbl-firmware:do_deploy', d)}" | ||
| 48 | FSBL_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'mc::fsbl-fw:fsbl-firmware:do_deploy', '', d)}" | ||
| 49 | FSBL_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
| 50 | FSBL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
| 51 | FSBL_IMAGE_NAME ?= "fsbl-${MACHINE}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb index ae2123e7..f8679f0e 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | DESCRIPTION = "Xilinx First Stage Boot Loader" | 1 | DESCRIPTION = "Xilinx First Stage Boot Loader" |
| 2 | 2 | ||
| 3 | LICENSE = "MIT" | 3 | LICENSE = "CLOSED" |
| 4 | 4 | ||
| 5 | PROVIDES = "virtual/fsbl" | 5 | PROVIDES = "virtual/fsbl" |
| 6 | 6 | ||
| @@ -10,19 +10,21 @@ COMPATIBLE_MACHINE = "^$" | |||
| 10 | COMPATIBLE_MACHINE:zynq = "zynq" | 10 | COMPATIBLE_MACHINE:zynq = "zynq" |
| 11 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 11 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
| 12 | 12 | ||
| 13 | # Since we're just copying, we can run any config | ||
| 14 | COMPATIBLE_HOST = ".*" | ||
| 15 | |||
| 13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 16 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 14 | 17 | ||
| 15 | # Default would be a multiconfig (versal) build | 18 | # Default expects the user to provide the fsbl in the deploy |
| 16 | # For this to work, BBMULTICONFIG += "fsbl-fw" must be in the user's local.conf! | 19 | # directory, named "fsbl.elf" |
| 20 | # A machine, multiconfig, or local.conf should override this | ||
| 17 | FSBL_DEPENDS ??= "" | 21 | FSBL_DEPENDS ??= "" |
| 18 | FSBL_MCDEPENDS ??= "mc::fsbl-fw:fsbl-firmware:do_deploy" | 22 | FSBL_MCDEPENDS ??= "" |
| 19 | 23 | FSBL_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | |
| 20 | # This must be defined to the file output by whatever is providing the fsbl-firmware | 24 | FSBL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 21 | # The following sets the default, but the BSP may select a different name | 25 | FSBL_IMAGE_NAME ??= "fsbl-${MACHINE}" |
| 22 | FSBL_IMAGE_NAME ??= "fsbl" | ||
| 23 | FSBL_DEPLOY_DIR ??= "${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}" | ||
| 24 | 26 | ||
| 25 | # Default is for the multilib case (without the extension .elf/.bin) | 27 | # Default is for the multilib case (without the extension .elf) |
| 26 | FSBL_FILE ??= "${FSBL_DEPLOY_DIR}/${FSBL_IMAGE_NAME}" | 28 | FSBL_FILE ??= "${FSBL_DEPLOY_DIR}/${FSBL_IMAGE_NAME}" |
| 27 | FSBL_FILE[vardepsexclude] = "FSBL_DEPLOY_DIR" | 29 | FSBL_FILE[vardepsexclude] = "FSBL_DEPLOY_DIR" |
| 28 | 30 | ||
| @@ -56,3 +58,22 @@ INSANE_SKIP:${PN}-dbg = "arch" | |||
| 56 | 58 | ||
| 57 | SYSROOT_DIRS += "/boot" | 59 | SYSROOT_DIRS += "/boot" |
| 58 | FILES:${PN} = "/boot/${PN}.elf" | 60 | FILES:${PN} = "/boot/${PN}.elf" |
| 61 | |||
| 62 | def check_fsbl_variables(d): | ||
| 63 | # If both are blank, the user MUST pass in the path to the firmware! | ||
| 64 | if not d.getVar('FSBL_DEPENDS') and not d.getVar('FSBL_MCDEPENDS'): | ||
| 65 | # Don't cache this, as the items on disk can change! | ||
| 66 | d.setVar('BB_DONT_CACHE', '1') | ||
| 67 | |||
| 68 | if not os.path.exists(d.getVar('FSBL_FILE') + ".elf"): | ||
| 69 | raise bb.parse.SkipRecipe("The expect file %s.elf is not available.\nSet FSBL_FILE to the path with a precompiled FSBL binary. See the meta-xilinx-core README for more information." % d.getVar('FSBL_FILE')) | ||
| 70 | else: | ||
| 71 | # We found the file, so be sure to track it | ||
| 72 | d.setVar('SRC_URI', 'file://${FSBL_FILE}.elf') | ||
| 73 | d.setVarFlag('do_install', 'file-checksums', '${FSBL_FILE}.elf:True') | ||
| 74 | d.setVarFlag('do_deploy', 'file-checksums', '${FSBL_FILE}.elf:True') | ||
| 75 | |||
| 76 | python() { | ||
| 77 | # Need to allow bbappends to change the check | ||
| 78 | check_fsbl_variables(d) | ||
| 79 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb index 6a2a5172..0306ef46 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb | |||
| @@ -1,26 +1,28 @@ | |||
| 1 | DESCRIPTION = "Platform Loader and Manager" | 1 | DESCRIPTION = "Platform Loader and Manager" |
| 2 | SUMMARY = "Platform Loader and Manager for Versal devices" | 2 | SUMMARY = "Platform Loader and Manager for Versal devices" |
| 3 | 3 | ||
| 4 | LICENSE = "MIT" | 4 | LICENSE = "CLOSED" |
| 5 | 5 | ||
| 6 | PROVIDES = "virtual/plm" | 6 | PROVIDES = "virtual/plm" |
| 7 | 7 | ||
| 8 | INHERIT_DEFAULT_DEPENDS = "1" | 8 | INHERIT_DEFAULT_DEPENDS = "1" |
| 9 | 9 | ||
| 10 | COMPATIBLE_MACHINE = "^$" | 10 | COMPATIBLE_MACHINE = "^$" |
| 11 | COMPATIBLE_MACHINE:versal = "versal" | 11 | COMPATIBLE_MACHINE:versal = ".*" |
| 12 | |||
| 13 | # Since we're just copying, we can run any config | ||
| 14 | COMPATIBLE_HOST = ".*" | ||
| 12 | 15 | ||
| 13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 16 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 14 | 17 | ||
| 15 | # Default would be a multiconfig (versal) build | 18 | # Default expects the user to provide the plm-firmware in the deploy |
| 16 | # For this to work, BBMULTICONFIG += "versal-fw" must be in the user's local.conf! | 19 | # directory, named "plm-${MACHINE}.elf" and "plm-${MACHINE}.bin" |
| 20 | # A machine, multiconfig, or local.conf should override this | ||
| 17 | PLM_DEPENDS ??= "" | 21 | PLM_DEPENDS ??= "" |
| 18 | PLM_MCDEPENDS ??= "mc::versal-fw:plm-firmware:do_deploy" | 22 | PLM_MCDEPENDS ??= "" |
| 19 | 23 | PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | |
| 20 | # This must be defined to the file output by whatever is providing the plm-firmware | 24 | PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 21 | # The following sets the default, but the BSP may select a different name | 25 | PLM_IMAGE_NAME ??= "plm-${MACHINE}" |
| 22 | PLM_IMAGE_NAME ??= "plm-versal-mb" | ||
| 23 | PLM_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" | ||
| 24 | 26 | ||
| 25 | # Default is for the multilib case (without the extension .elf/.bin) | 27 | # Default is for the multilib case (without the extension .elf/.bin) |
| 26 | PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" | 28 | PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" |
| @@ -57,3 +59,31 @@ INSANE_SKIP:${PN}-dbg = "arch" | |||
| 57 | 59 | ||
| 58 | SYSROOT_DIRS += "/boot" | 60 | SYSROOT_DIRS += "/boot" |
| 59 | FILES:${PN} = "/boot/${PN}.elf" | 61 | FILES:${PN} = "/boot/${PN}.elf" |
| 62 | |||
| 63 | def check_plm_vars(d): | ||
| 64 | # If both are blank, the user MUST pass in the path to the firmware! | ||
| 65 | if not d.getVar('PLM_DEPENDS') and not d.getVar('PLM_MCDEPENDS'): | ||
| 66 | # Don't cache this, as the items on disk can change! | ||
| 67 | d.setVar('BB_DONT_CACHE', '1') | ||
| 68 | |||
| 69 | msg = "" | ||
| 70 | fail = False | ||
| 71 | if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): | ||
| 72 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') | ||
| 73 | fail = True | ||
| 74 | if not os.path.exists(d.getVar('PLM_FILE') + ".bin"): | ||
| 75 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE') | ||
| 76 | fail = True | ||
| 77 | if fail: | ||
| 78 | raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg) | ||
| 79 | else: | ||
| 80 | # We found the file, so be sure to track it | ||
| 81 | d.setVar('SRC_URI', 'file://${PLM_FILE}.elf file://${PLM_FILE}.bin') | ||
| 82 | d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') | ||
| 83 | d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True') | ||
| 84 | |||
| 85 | python() { | ||
| 86 | # Need to allow bbappends to change the check | ||
| 87 | check_plm_vars(d) | ||
| 88 | } | ||
| 89 | |||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb index ea0eb5a6..b3f9664e 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb | |||
| @@ -1,25 +1,27 @@ | |||
| 1 | DESCRIPTION = "PMU Firmware" | 1 | DESCRIPTION = "PMU Firmware" |
| 2 | 2 | ||
| 3 | LICENSE = "MIT" | 3 | LICENSE = "CLOSED" |
| 4 | 4 | ||
| 5 | PROVIDES = "virtual/pmu-firmware" | 5 | PROVIDES = "virtual/pmu-firmware" |
| 6 | 6 | ||
| 7 | INHERIT_DEFAULT_DEPENDS = "1" | 7 | INHERIT_DEFAULT_DEPENDS = "1" |
| 8 | 8 | ||
| 9 | COMPATIBLE_MACHINE = "^$" | 9 | COMPATIBLE_MACHINE = "^$" |
| 10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 10 | COMPATIBLE_MACHINE:zynqmp = ".*" |
| 11 | |||
| 12 | # Since we're just copying, we can run any config | ||
| 13 | COMPATIBLE_HOST = ".*" | ||
| 11 | 14 | ||
| 12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 15 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 13 | 16 | ||
| 14 | # Default would be a multiconfig (zynqmp-pmufw) build | 17 | # Default expects the user to provide the pmu-firmware in the deploy |
| 15 | # For this to work, BBMULTICONFIG += "zynqmp-pmufw" must be in the user's local.conf! | 18 | # directory, named "pmu-firmware-${MACHINE}.elf" and "pmu-firmware-${MACHINE}.bin" |
| 19 | # A machine, multiconfig, or local.conf should override this | ||
| 16 | PMU_DEPENDS ??= "" | 20 | PMU_DEPENDS ??= "" |
| 17 | PMU_MCDEPENDS ??= "mc::zynqmp-pmufw:pmu-firmware:do_deploy" | 21 | PMU_MCDEPENDS ??= "" |
| 18 | 22 | PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | |
| 19 | # This must be defined to the file output by whatever is providing the pmu-firmware | 23 | PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 20 | # The following sets the default, but the BSP may select a different name | 24 | PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}" |
| 21 | PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu" | ||
| 22 | PMU_FIRMWARE_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}" | ||
| 23 | 25 | ||
| 24 | # Default is for the multilib case (without the extension .elf/.bin) | 26 | # Default is for the multilib case (without the extension .elf/.bin) |
| 25 | PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}" | 27 | PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}" |
| @@ -55,3 +57,31 @@ INSANE_SKIP:${PN}-dbg = "arch" | |||
| 55 | 57 | ||
| 56 | SYSROOT_DIRS += "/boot" | 58 | SYSROOT_DIRS += "/boot" |
| 57 | FILES:${PN} = "/boot/${PN}.elf" | 59 | FILES:${PN} = "/boot/${PN}.elf" |
| 60 | |||
| 61 | def check_pmu_vars(d): | ||
| 62 | # If both are blank, the user MUST pass in the path to the firmware! | ||
| 63 | if not d.getVar('PMU_FIRMWARE_DEPENDS') and not d.getVar('PMU_FIRMWARE_MCDEPENDS'): | ||
| 64 | # Don't cache this, as the items on disk can change! | ||
| 65 | d.setVar('BB_DONT_CACHE', '1') | ||
| 66 | |||
| 67 | msg = "" | ||
| 68 | fail = False | ||
| 69 | if not os.path.exists(d.getVar('PMU_FILE') + ".elf"): | ||
| 70 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE') | ||
| 71 | fail = True | ||
| 72 | if not os.path.exists(d.getVar('PMU_FILE') + ".bin"): | ||
| 73 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE') | ||
| 74 | fail = True | ||
| 75 | if fail: | ||
| 76 | raise bb.parse.SkipRecipe("%s See the meta-xilinx-core README." % msg) | ||
| 77 | else: | ||
| 78 | # We found the file, so be sure to track it | ||
| 79 | d.setVar('SRC_URI', 'file://${PMU_FILE}.elf file://${PMU_FILE}.bin') | ||
| 80 | d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True') | ||
| 81 | d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True') | ||
| 82 | |||
| 83 | |||
| 84 | python() { | ||
| 85 | # Need to allow bbappends to change the check | ||
| 86 | check_pmu_vars(d) | ||
| 87 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb index 89a9e93f..46124591 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb | |||
| @@ -1,26 +1,28 @@ | |||
| 1 | DESCRIPTION = "PSM Firmware" | 1 | DESCRIPTION = "PSM Firmware" |
| 2 | SUMMARY = "PSM firmware for versal devices" | 2 | SUMMARY = "PSM firmware for versal devices" |
| 3 | 3 | ||
| 4 | LICENSE = "MIT" | 4 | LICENSE = "CLOSED" |
| 5 | 5 | ||
| 6 | PROVIDES = "virtual/psm-firmware" | 6 | PROVIDES = "virtual/psm-firmware" |
| 7 | 7 | ||
| 8 | INHERIT_DEFAULT_DEPENDS = "1" | 8 | INHERIT_DEFAULT_DEPENDS = "1" |
| 9 | 9 | ||
| 10 | COMPATIBLE_MACHINE = "^$" | 10 | COMPATIBLE_MACHINE = "^$" |
| 11 | COMPATIBLE_MACHINE:versal = "versal" | 11 | COMPATIBLE_MACHINE:versal = ".*" |
| 12 | |||
| 13 | # Since we're just copying, we can run any config | ||
| 14 | COMPATIBLE_HOST = ".*" | ||
| 12 | 15 | ||
| 13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 16 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 14 | 17 | ||
| 15 | # Default would be a multiconfig (versal) build | 18 | # Default expects the user to provide the psm-firmware in the deploy |
| 16 | # For this to work, BBMULTICONFIG += "versal-fw" must be in the user's local.conf! | 19 | # directory, named "psm-firmware-${MACHINE}.elf" and "psm-firmware-${MACHINE}.bin" |
| 20 | # A machine, multiconfig, or local.conf should override this | ||
| 17 | PSM_DEPENDS ??= "" | 21 | PSM_DEPENDS ??= "" |
| 18 | PSM_MCDEPENDS ??= "mc::versal-fw:psm-firmware:do_deploy" | 22 | PSM_MCDEPENDS ??= "" |
| 19 | 23 | PSM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | |
| 20 | # This must be defined to the file output by whatever is providing the psm-firmware | 24 | PSM_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
| 21 | # The following sets the default, but the BSP may select a different name | 25 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}" |
| 22 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb" | ||
| 23 | PSM_FIRMWARE_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" | ||
| 24 | 26 | ||
| 25 | # Default is for the multilib case (without the extension .elf/.bin) | 27 | # Default is for the multilib case (without the extension .elf/.bin) |
| 26 | PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}" | 28 | PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}" |
| @@ -57,3 +59,32 @@ INSANE_SKIP:${PN}-dbg = "arch" | |||
| 57 | 59 | ||
| 58 | SYSROOT_DIRS += "/boot" | 60 | SYSROOT_DIRS += "/boot" |
| 59 | FILES:${PN} = "/boot/${PN}.elf" | 61 | FILES:${PN} = "/boot/${PN}.elf" |
| 62 | |||
| 63 | def check_psm_vars(d): | ||
| 64 | # If both are blank, the user MUST pass in the path to the firmware! | ||
| 65 | if not d.getVar('PSM_DEPENDS') and not d.getVar('PSM_MCDEPENDS'): | ||
| 66 | # Don't cache this, as the items on disk can change! | ||
| 67 | d.setVar('BB_DONT_CACHE', '1') | ||
| 68 | |||
| 69 | msg = "" | ||
| 70 | fail = False | ||
| 71 | if not os.path.exists(d.getVar('PSM_FILE') + ".elf"): | ||
| 72 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE') | ||
| 73 | fail = True | ||
| 74 | if not os.path.exists(d.getVar('PSM_FILE') + ".bin"): | ||
| 75 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE') | ||
| 76 | fail = True | ||
| 77 | |||
| 78 | if fail: | ||
| 79 | raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg) | ||
| 80 | else: | ||
| 81 | # We found the file, so be sure to track it | ||
| 82 | d.setVar('SRC_URI', 'file://${PSM_FILE}.elf file://${PSM_FILE}.bin') | ||
| 83 | d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True') | ||
| 84 | d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True') | ||
| 85 | |||
| 86 | python() { | ||
| 87 | # Need to allow bbappends to change the check | ||
| 88 | check_psm_vars(d) | ||
| 89 | } | ||
| 90 | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc new file mode 100644 index 00000000..5499befd --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Default fsbl configuration, using fsbl-fw multiconfig | ||
| 2 | # | ||
| 3 | # This requires MULTICONFIG += "fsbl-fw" to be added to local.conf | ||
| 4 | FSBL_DEPENDS ?= "" | ||
| 5 | FSBL_MCDEPENDS ?= "mc::fsbl-fw:fsbl-firmware:do_deploy" | ||
| 6 | FSBL_DEPLOY_DIR ?= "${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}" | ||
| 7 | FSBL_IMAGE_NAME ?= "fsbl" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend new file mode 100644 index 00000000..5b02e3de --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # Include the fsbl-fw setting, if it's enabled | ||
| 2 | FSBL_INC = "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'fsbl-fw-cfg.inc', '', d)}" | ||
| 3 | require ${FSBL_INC} | ||
| 4 | |||
| 5 | def check_fsbl_variables(d): | ||
| 6 | if not d.getVar('FSBL_DEPENDS') and not d.getVar('FSBL_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'fsbl-fw' in d.getVar('BBMULTICONFIG').split()): | ||
| 7 | if not os.path.exists(d.getVar('FSBL_FILE') + ".elf"): | ||
| 8 | d.setVar('BB_DONT_CACHE', '1') | ||
| 9 | raise bb.parse.SkipRecipe("The expect file %s.elf is not available.\nEither specify FSBL_FILE, or you may need to enable BBMULTICONFIG += 'fsbl-fw' to generate it." % d.getVar('FSBL_FILE')) | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc index 355a55ed..44e428ff 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc | |||
| @@ -65,7 +65,7 @@ do_install() { | |||
| 65 | PACKAGES = "" | 65 | PACKAGES = "" |
| 66 | 66 | ||
| 67 | # This is the default in most BSPs. A MACHINE.conf can override this! | 67 | # This is the default in most BSPs. A MACHINE.conf can override this! |
| 68 | PLM_IMAGE_NAME ??= "plm-versal-mb" | 68 | PLM_IMAGE_NAME ??= "plm-${MACHINE}" |
| 69 | 69 | ||
| 70 | inherit image-artifact-names | 70 | inherit image-artifact-names |
| 71 | 71 | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend new file mode 100644 index 00000000..d63529ff --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | # Include the versal-fw setting, if it's enabled | ||
| 2 | PLMFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'versal-fw-cfg.inc', '', d)}" | ||
| 3 | require ${PLMFW_INC} | ||
| 4 | |||
| 5 | def check_plm_vars(d): | ||
| 6 | if not d.getVar('PLM_DEPENDS') and not d.getVar('PLM_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'versal-fw' in d.getVar('BBMULTICONFIG').split()): | ||
| 7 | msg = "" | ||
| 8 | fail = False | ||
| 9 | if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): | ||
| 10 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') | ||
| 11 | fail = True | ||
| 12 | if not os.path.exists(d.getVar('PLM_FILE') + ".bin"): | ||
| 13 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE') | ||
| 14 | fail = True | ||
| 15 | if fail: | ||
| 16 | d.setVar('BB_DONT_CACHE', '1') | ||
| 17 | raise bb.parse.SkipRecipe("%s\nEither specify PLM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc index 22352fab..b789af5d 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc | |||
| @@ -64,7 +64,7 @@ do_install() { | |||
| 64 | PACKAGES = "" | 64 | PACKAGES = "" |
| 65 | 65 | ||
| 66 | # This is the default in most BSPs. A MACHINE.conf can override this! | 66 | # This is the default in most BSPs. A MACHINE.conf can override this! |
| 67 | PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu" | 67 | PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}" |
| 68 | 68 | ||
| 69 | inherit image-artifact-names | 69 | inherit image-artifact-names |
| 70 | 70 | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend new file mode 100644 index 00000000..947408a1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | # Include the zynqmp-pmufw setting, if it's enabled | ||
| 2 | PMUFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'zynqmp-pmufw-cfg.inc', '', d)}" | ||
| 3 | require ${PMUFW_INC} | ||
| 4 | |||
| 5 | def check_pmu_vars(d): | ||
| 6 | if not d.getVar('PMU_DEPENDS') and not d.getVar('PMU_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'zynqmp-pmufw' in d.getVar('BBMULTICONFIG').split()): | ||
| 7 | msg = "" | ||
| 8 | fail = False | ||
| 9 | if not os.path.exists(d.getVar('PMU_FILE') + ".elf"): | ||
| 10 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE') | ||
| 11 | fail = True | ||
| 12 | if not os.path.exists(d.getVar('PMU_FILE') + ".bin"): | ||
| 13 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE') | ||
| 14 | fail = True | ||
| 15 | if fail: | ||
| 16 | d.setVar('BB_DONT_CACHE', '1') | ||
| 17 | raise bb.parse.SkipRecipe("%s\nEither specify PMU_FILE, or you may need to enable BBMULTICONFIG += 'zynqmp-pmufw' to generate it." % msg) | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc index 2bdae284..a7acfbb7 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc | |||
| @@ -65,7 +65,7 @@ do_install() { | |||
| 65 | PACKAGES = "" | 65 | PACKAGES = "" |
| 66 | 66 | ||
| 67 | # This is the default in most BSPs. A MACHINE.conf can override this! | 67 | # This is the default in most BSPs. A MACHINE.conf can override this! |
| 68 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb" | 68 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}" |
| 69 | 69 | ||
| 70 | inherit image-artifact-names | 70 | inherit image-artifact-names |
| 71 | 71 | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend new file mode 100644 index 00000000..8944152d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | # Include the versal-fw setting, if it's enabled | ||
| 2 | PSMFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'versal-fw-cfg.inc', '', d)}" | ||
| 3 | require ${PSMFW_INC} | ||
| 4 | |||
| 5 | def check_psm_vars(d): | ||
| 6 | if not d.getVar('PSM_DEPENDS') and not d.getVar('PSM_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'versal-fw' in d.getVar('BBMULTICONFIG').split()): | ||
| 7 | msg = "" | ||
| 8 | fail = False | ||
| 9 | if not os.path.exists(d.getVar('PSM_FILE') + ".elf"): | ||
| 10 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE') | ||
| 11 | fail = True | ||
| 12 | if not os.path.exists(d.getVar('PSM_FILE') + ".bin"): | ||
| 13 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE') | ||
| 14 | fail = True | ||
| 15 | if fail: | ||
| 16 | d.setVar('BB_DONT_CACHE', '1') | ||
| 17 | raise bb.parse.SkipRecipe("%s\nEither specify PSM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc new file mode 100644 index 00000000..bae740e2 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # Default fsbl configuration, using fsbl-fw multiconfig | ||
| 2 | # | ||
| 3 | # This requires MULTICONFIG += "versal-fw" to be added to local.conf | ||
| 4 | PSM_DEPENDS ?= "" | ||
| 5 | PSM_MCDEPENDS ?= "mc::versal-fw:psm-firmware:do_deploy" | ||
| 6 | PSM_FIRMWARE_IMAGE_NAME ?= "psm-firmware-${MACHINE}" | ||
| 7 | PSM_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" | ||
| 8 | |||
| 9 | PLM_DEPENDS ?= "" | ||
| 10 | PLM_MCDEPENDS ?= "mc::versal-fw:plm-firmware:do_deploy" | ||
| 11 | PLM_IMAGE_NAME ?= "plm-${MACHINE}" | ||
| 12 | PLM_DEPLOY_DIR ?= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" | ||
| 13 | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc new file mode 100644 index 00000000..982c4425 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Default fsbl configuration, using fsbl-fw multiconfig | ||
| 2 | # | ||
| 3 | # This requires MULTICONFIG += "zynqmp-pmufw" to be added to local.conf | ||
| 4 | PMU_DEPENDS ?= "" | ||
| 5 | PMU_MCDEPENDS ?= "mc::zynqmp-pmufw:pmu-firmware:do_deploy" | ||
| 6 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}" | ||
| 7 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-${MACHINE}" | ||
