diff options
Diffstat (limited to 'meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb')
| -rw-r--r-- | meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb deleted file mode 100644 index f61761f4..00000000 --- a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream" | ||
| 2 | |||
| 3 | LICENSE = "MIT" | ||
| 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 5 | |||
| 6 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 7 | |||
| 8 | # We never want to prefer this over another provider | ||
| 9 | DEFAULT_PREFERENCE = "-1" | ||
| 10 | |||
| 11 | PROVIDES = "virtual/bitstream" | ||
| 12 | |||
| 13 | COMPATIBLE_MACHINE = "$^" | ||
| 14 | COMPATIBLE_MACHINE:zynq = ".*" | ||
| 15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
| 16 | |||
| 17 | # Since we're just copying, we can run any config | ||
| 18 | COMPATIBLE_HOST = ".*" | ||
| 19 | |||
| 20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 21 | |||
| 22 | # Path where the bitstream can be found | ||
| 23 | BITSTREAM_PATH ?= "" | ||
| 24 | |||
| 25 | inherit deploy | ||
| 26 | |||
| 27 | do_install() { | ||
| 28 | if [ ! -e ${BITSTREAM_PATH} ]; then | ||
| 29 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | ||
| 30 | exit 1 | ||
| 31 | fi | ||
| 32 | |||
| 33 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/. | ||
| 34 | } | ||
| 35 | |||
| 36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 37 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 38 | do_deploy() { | ||
| 39 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 40 | if ${SHOULD_DEPLOY}; then | ||
| 41 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/. | ||
| 42 | fi | ||
| 43 | } | ||
| 44 | |||
| 45 | def check_bitstream_vars(d): | ||
| 46 | # If BITSTREAM_PATH is not defined, we error and instruct the user | ||
| 47 | # Don't cache this, as the items on disk can change! | ||
| 48 | d.setVar('BB_DONT_CACHE', '1') | ||
| 49 | if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): | ||
| 50 | raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README.") | ||
| 51 | |||
| 52 | if not d.getVar('BITSTREAM_PATH'): | ||
| 53 | raise bb.parse.SkipRecipe("Something is depending on virtual/bitstream and you have not provided a bitstream using BITSTREAM_PATH variable.\n See the meta-xilinx-core README.") | ||
| 54 | |||
| 55 | python() { | ||
| 56 | # Need to allow bbappends to change the check | ||
| 57 | check_bitstream_vars(d) | ||
| 58 | } | ||
| 59 | |||
