diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-20 12:19:43 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-20 14:57:39 -0700 |
| commit | 770eb410e21ddbbec943a1a813258d47646efef6 (patch) | |
| tree | d1320b72a57a96739066dce44f2919db8f3cb3ee | |
| parent | 828cf0111d474fedf7e27f4cb3bdeca847490682 (diff) | |
| download | meta-xilinx-770eb410e21ddbbec943a1a813258d47646efef6.tar.gz | |
plmfw/psmfw: Fix missing do_deploy addtask, and local check
If the fw is pulling from the same config, we don't want to re-deploy the
firmware (it will fail.) Otherwise copy it from the other config into
our config, as other tools may look for it.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
| -rw-r--r-- | meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb | 5 | ||||
| -rw-r--r-- | meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb index b4135a83..e890b875 100644 --- a/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb | |||
| @@ -44,14 +44,17 @@ do_install() { | |||
| 44 | install -Dm 0644 ${PLM_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} | 44 | install -Dm 0644 ${PLM_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 48 | SHOULD_DEPLOY = "${@'false' if (d.getVar('PLM_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 47 | do_deploy() { | 49 | do_deploy() { |
| 48 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | 50 | # If the item is already in OUR deploy_image_dir, nothing to deploy! |
| 49 | if [ "x${@'' if d.getVar('PLM_FILE').startswith(d.getVar('DEPLOY_IMAGE_DIR')) else 'copy'}" != "x" ]; then | 51 | if ${SHOULD_DEPLOY}; then |
| 50 | install -Dm 0644 ${PLM_FILE}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf | 52 | install -Dm 0644 ${PLM_FILE}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf |
| 51 | install -Dm 0644 ${PLM_FILE}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin | 53 | install -Dm 0644 ${PLM_FILE}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin |
| 52 | fi | 54 | fi |
| 53 | } | 55 | } |
| 54 | 56 | ||
| 57 | addtask deploy before do_build after do_install | ||
| 55 | 58 | ||
| 56 | ALTERNATIVE_${PN} = "plmfw" | 59 | ALTERNATIVE_${PN} = "plmfw" |
| 57 | ALTERNATIVE_TARGET[plmfw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | 60 | ALTERNATIVE_TARGET[plmfw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" |
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb index 24044f77..0b2b86cf 100644 --- a/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb | |||
| @@ -44,14 +44,18 @@ do_install() { | |||
| 44 | install -Dm 0644 ${PSM_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} | 44 | install -Dm 0644 ${PSM_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 48 | SHOULD_DEPLOY = "${@'false' if (d.getVar('PSM_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 47 | do_deploy() { | 49 | do_deploy() { |
| 48 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | 50 | # If the item is already in OUR deploy_image_dir, nothing to deploy! |
| 49 | if [ "x${@'' if d.getVar('PSM_FILE').startswith(d.getVar('DEPLOY_IMAGE_DIR')) else 'copy'}" != "x" ]; then | 51 | if ${SHOULD_DEPLOY}; then |
| 50 | install -Dm 0644 ${PSM_FILE}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf | 52 | install -Dm 0644 ${PSM_FILE}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf |
| 51 | install -Dm 0644 ${PSM_FILE}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin | 53 | install -Dm 0644 ${PSM_FILE}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin |
| 52 | fi | 54 | fi |
| 53 | } | 55 | } |
| 54 | 56 | ||
| 57 | addtask deploy before do_build after do_install | ||
| 58 | |||
| 55 | ALTERNATIVE_${PN} = "psmfw" | 59 | ALTERNATIVE_${PN} = "psmfw" |
| 56 | ALTERNATIVE_TARGET[psmfw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | 60 | ALTERNATIVE_TARGET[psmfw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" |
| 57 | ALTERNATIVE_LINK_NAME[psmfw] = "/boot/${BINARY_NAME}${BINARY_EXT}" | 61 | ALTERNATIVE_LINK_NAME[psmfw] = "/boot/${BINARY_NAME}${BINARY_EXT}" |
