summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb23
1 files changed, 13 insertions, 10 deletions
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb
index a87b37a0..97965279 100644
--- a/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb
+++ b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb
@@ -5,6 +5,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
5 5
6INHIBIT_DEFAULT_DEPS = "1" 6INHIBIT_DEFAULT_DEPS = "1"
7 7
8BITSTREAM_PATH_DEPENDS ??= ""
9DEPENDS += "${BITSTREAM_PATH_DEPENDS}"
10
8# We never want to prefer this over another provider 11# We never want to prefer this over another provider
9DEFAULT_PREFERENCE = "-1" 12DEFAULT_PREFERENCE = "-1"
10 13
@@ -54,18 +57,18 @@ addtask deploy before do_build after do_install
54FILES:${PN} += "/boot/bitstream/*.bit" 57FILES:${PN} += "/boot/bitstream/*.bit"
55 58
56def check_bitstream_vars(d): 59def check_bitstream_vars(d):
57 # If BITSTREAM_PATH is not defined, we error and instruct the user 60 # Assuming if BITSTREAM_PATH_DEPENDS exists, that the file will be available later.
58 # Don't cache this, as the items on disk can change! 61 if not d.getVar('BITSTREAM_PATH_DEPENDS'):
59 d.setVar('BB_DONT_CACHE', '1') 62 # Don't cache this, as the items on disk can change!
60 if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): 63 d.setVar('BB_DONT_CACHE', '1')
61 raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README.") 64
62 65 # If BITSTREAM_PATH is not found or defined, we error and instruct the user
63 if not d.getVar('BITSTREAM_PATH'): 66 if not d.getVar('BITSTREAM_PATH'):
64 if os.path.exists(d.expand('${TOPDIR}/download-${MACHINE}.bit')):
65 d.setVar('BITSTREAM_PATH', '${TOPDIR}/download-${MACHINE}.bit')
66 else:
67 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.") 67 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.")
68 68
69 if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')):
70 raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README." % d.getVar('BITSTREAM_PATH'))
71
69python() { 72python() {
70 # Need to allow bbappends to change the check 73 # Need to allow bbappends to change the check
71 check_bitstream_vars(d) 74 check_bitstream_vars(d)