Skip to content

Instantly share code, notes, and snippets.

@PeterOgden
Created November 15, 2019 14:18
Show Gist options
  • Save PeterOgden/5a02912a2d1b997ba46df8fd8fd5b23e to your computer and use it in GitHub Desktop.
Save PeterOgden/5a02912a2d1b997ba46df8fd8fd5b23e to your computer and use it in GitHub Desktop.
Example Bitbake recipe for PYNQ-Helloworld
diff --git a/setup.py b/setup.py
index 708dc25..21595f1 100644
--- a/setup.py
+++ b/setup.py
@@ -34,13 +34,13 @@ import shutil
# global variables
board = os.environ['BOARD']
-repo_board_folder = f'boards/{board}/resizer'
+repo_board_folder = 'boards/'+board+'/resizer'
board_notebooks_dir = os.environ['PYNQ_JUPYTER_NOTEBOOKS']
hw_data_files = []
# check whether board is supported
def check_env():
if not os.path.isdir(repo_board_folder):
raise ValueError("Board {} is not supported.".format(board))
if not os.path.isdir(board_notebooks_dir):
--
diff --git a/boards/ZCU104/resizer/notebooks/resizer_PL.ipynb b/boards/ZCU104/resizer/notebooks/resizer_PL.ipynb
index 1658d78..cd04d93 100644
--- a/boards/ZCU104/resizer/notebooks/resizer_PL.ipynb
+++ b/boards/ZCU104/resizer/notebooks/resizer_PL.ipynb
@@ -78,7 +78,7 @@
"outputs": [],
"source": [
"resize_design = Overlay(\n",
- " \"/usr/local/lib/python3.6/dist-packages/helloworld/bitstream/resizer.bit\")"
+ " \"/usr/lib/python3.5/site-packages/helloworld/bitstream/resizer.bit\")"
]
},
{
--
SUMMARY = "PYNQ Helloworld"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9990fcc34ccf1f82ccf1bc5a1cc3bfc"
SRC_URI = "git://github.com/Xilinx/PYNQ-HelloWorld.git;protocol=https \
file://build-fixes.patch \
"
SRC_URI[md5sum] = "ac1bfe94a18301b26ae5110ea26ca596"
SRC_URI[sha256sum] = "f522c54c9418d1b1fdb6098cd7139439d47b041900000812c51200482d423460"
SRCREV = "0e10a7ee06c3e7d873f4468e06e523e2d58d07f8"
S = "${WORKDIR}/git"
inherit xilinx-pynq setuptools3
do_compile_prepend() {
export BOARD=ZCU104
export PYNQ_JUPYTER_NOTEBOOKS=${D}${PYNQ_NOTEBOOK_DIR}
}
do_install_prepend() {
export BOARD=ZCU104
export PYNQ_JUPYTER_NOTEBOOKS=${D}${PYNQ_NOTEBOOK_DIR}
install -d ${PYNQ_JUPYTER_NOTEBOOKS}
}
do_configure_prepend() {
export BOARD=ZCU104
export PYNQ_JUPYTER_NOTEBOOKS=${D}${PYNQ_NOTEBOOK_DIR}
install -d ${PYNQ_JUPYTER_NOTEBOOKS}
}
RDEPENDS_${PN} += "\
python3-pynq \
python3-audio \
python3-pillow \
pynq-overlay \
libstdc++ \
"
RDEPENDS_${PN}-notebooks += "\
python3-jupyter \
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment