diff options
| -rw-r--r-- | meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb (renamed from meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb) | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb index f61761f4..cf7ca100 100644 --- a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb +++ b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb | |||
| @@ -24,13 +24,20 @@ BITSTREAM_PATH ?= "" | |||
| 24 | 24 | ||
| 25 | inherit deploy | 25 | inherit deploy |
| 26 | 26 | ||
| 27 | BITSTREAM_NAME ?= "download" | ||
| 28 | BITSTREAM_NAME:microblaze ?= "system" | ||
| 29 | |||
| 30 | BITSTREAM_BASE_NAME ?= "${BITSTREAM_NAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
| 31 | |||
| 32 | SYSROOT_DIRS += "/boot/bitstream" | ||
| 33 | |||
| 27 | do_install() { | 34 | do_install() { |
| 28 | if [ ! -e ${BITSTREAM_PATH} ]; then | 35 | if [ ! -e ${BITSTREAM_PATH} ]; then |
| 29 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | 36 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" |
| 30 | exit 1 | 37 | exit 1 |
| 31 | fi | 38 | fi |
| 32 | 39 | install -d ${D}/boot/bitstream/ | |
| 33 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/. | 40 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/bitstream/${BITSTREAM_BASE_NAME}.bit |
| 34 | } | 41 | } |
| 35 | 42 | ||
| 36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | 43 | # If the item is already in OUR deploy_image_dir, nothing to deploy! |
| @@ -38,10 +45,14 @@ SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar( | |||
| 38 | do_deploy() { | 45 | do_deploy() { |
| 39 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | 46 | # If the item is already in OUR deploy_image_dir, nothing to deploy! |
| 40 | if ${SHOULD_DEPLOY}; then | 47 | if ${SHOULD_DEPLOY}; then |
| 41 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/. | 48 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/${BITSTREAM_BASE_NAME}.bit |
| 42 | fi | 49 | fi |
| 43 | } | 50 | } |
| 44 | 51 | ||
| 52 | addtask deploy before do_build after do_install | ||
| 53 | |||
| 54 | FILES:${PN} += "/boot/bitstream/*.bit" | ||
| 55 | |||
| 45 | def check_bitstream_vars(d): | 56 | def check_bitstream_vars(d): |
| 46 | # If BITSTREAM_PATH is not defined, we error and instruct the user | 57 | # If BITSTREAM_PATH is not defined, we error and instruct the user |
| 47 | # Don't cache this, as the items on disk can change! | 58 | # Don't cache this, as the items on disk can change! |
