blob: 6a69ea210df694808db297a1316ba437e5ed4836 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001DESCRIPTION = "Recipe to install BNN notebooks and PYNQ dependencies for ultra96"
2SUMMARY = "BNN example jupyter notebooks with PYNQ"
3
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=8f625d3c898c18035639b6d6943b6a9c"
6
7SRC_URI = "git://github.com/Xilinx/BNN-PYNQ.git;protocol=https \
8 file://0001-BNN-Notebooks-changed-default-picture-location.patch \
9 file://0001-Update-default-notebooks-path-from-home-xilinx-to-us.patch \
10"
11
12SRCREV = "32eed91994228d1042a16c692047dfe81e47d498"
13
14inherit xilinx-pynq
15
16RDEPENDS_${PN}-notebooks += "\
17 python3-pynq \
18 python3-pillow \
19 libstdc++ \
20 libcma \
21 bash \
22"
23
24COMPATIBLE_MACHINE = "^$"
25COMPATIBLE_MACHINE_ultra96-zynqmp = "ultra96-zynqmp"
26
27S = "${WORKDIR}/git"
28
29do_configure[noexec]="1"
30do_compile[noexec]="1"
31
32def get_board(d):
33 x = str(d.getVar("BOARD_NAME", "True"))
34 return x.lower()
35
36do_install () {
37 JUPYTER_NOTEBOOKS=${D}${PYNQ_NOTEBOOK_DIR}
38 install -d ${JUPYTER_NOTEBOOKS}/bnn_examples
39
40 install -d ${JUPYTER_NOTEBOOKS}/bnn_examples/bitstreams
41 install -d ${JUPYTER_NOTEBOOKS}/bnn_examples/bitstreams/${@get_board(d)}
42 cp -r ${S}/bnn/bitstreams/${@get_board(d)}/* ${JUPYTER_NOTEBOOKS}/bnn_examples/bitstreams/${@get_board(d)}/
43
44 install -d ${JUPYTER_NOTEBOOKS}/bnn_examples/libraries
45 install -d ${JUPYTER_NOTEBOOKS}/bnn_examples/libraries/${@get_board(d)}
46 cp -r ${S}/bnn/libraries/${@get_board(d)}/* ${JUPYTER_NOTEBOOKS}/bnn_examples/libraries/${@get_board(d)}/
47
48 cp -r ${S}/bnn/params ${JUPYTER_NOTEBOOKS}/bnn_examples/
49 cp -r ${S}/bnn/src ${JUPYTER_NOTEBOOKS}/bnn_examples/
50 cp -r ${S}/bnn/__init__.py ${JUPYTER_NOTEBOOKS}/bnn_examples/
51 cp -r ${S}/bnn/bnn.py ${JUPYTER_NOTEBOOKS}/bnn_examples/
52 cp -r ${S}/MANIFEST.in ${JUPYTER_NOTEBOOKS}/bnn_examples/
53 cp -r ${S}/setup.py ${JUPYTER_NOTEBOOKS}/bnn_examples/
54
55 cp -r ${S}/notebooks/* ${JUPYTER_NOTEBOOKS}/bnn_examples/
56}
57