Hi all,
I’m trying to build a minimal PYNQ 3.1 image that includes only the pynq
Python library so I can load a bitstream via Overlay()
, without Jupyter or panda/numpy stack, and sized to fit an 8 GB eMMC. In the petalinux-config -c rootfs there are no packages selected, just the default ones provided by Trenz in their reference design.
With the standard PYNQ build I get a rootfs of about 6.3 GB; after installing a few extra dependencies it grows further and we run out of space.
What I’ve tried (none succeeded yet):
-
Remove Stage4 for my board in
sdbuild
Problem: Jupyter,pynq
, and the larger Python ecosystem (OpenCV, pandas, etc.) still ended up in the image.
This might be due to Stage2/Stage3 pulling them in. In\<PYNQ\>/sdbuild/ubuntu/jammy/aarch64
I see:STAGE2_PACKAGES_aarch64 := gcc-mb udev libsds python_packages_jammy jupyter STAGE2_PACKAGES_aarch64 += sigrok STAGE2_PACKAGES_aarch64 += bootpy STAGE2_PACKAGES_aarch64 += clear_pl_statefile STAGE3_PACKAGES_aarch64 := xrtlib pynq x11 resizefs
-
“Dirty” approach: remove unused deps from
\<PYNQ\>/sdbuild/packages/python_packages_jammy/requirements.txt
Problem: Even after editing, the rootfs was still produced with the full ecosystem (maybe cached or pulled from the repo by Stage2/Stage3 anyway). -
Use
meta-pynq
with PetaLinux (no Stage4, just kernel/DT setup + addpynq
myself)
Problem: Even when pointing to PYNQ 3.1, BitBake tries to fetchpython3-pynq_2.3
from PyPI:ERROR: python3-pynq-2.3-r0 do_fetch: ... Unable to fetch ... pynq-2.3.tar.gz
It seems the layer provides a
python3-pynq_2.3.bb
, so BitBake picks 2.3 instead of 3.1.I don’t know if this workflow is still valid, I was trying to replicate this steps:
PYNQ/sdbuild/boot/meta-pynq at master · Xilinx/PYNQ · GitHub
Questions:
- What’s the recommended way to build a minimal PYNQ 3.1 image (no Jupyter, only
pynq
so I can doOverlay("*.bit")
) that fits in 8 GB eMMC?
Thanks in advance!