ERROR:Failed to generate meta-plnx layer


I am trying to build an image for a custom board and run into the error, but this also happens for the Pynq-Z1 board.

I followed the vagrant install instructions and installed the 2019.1 Xilinx tools to /workspace/Xilinx/Vivado/2019.1 and /workspace/Xilinx/petalinux/2019.1

I am using commit c2f9290eab95603c5d867b5452bf53c4888bc33f (master current) of the PYNQ repo.

Running make BOARDS=Pynq-Z1 in /pynq/sdbuild after sourcing the settings scripts produces the following on stdout:


Built pynqz1 successfully!

make[1]: Leaving directory '/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/hardware_project'
+ cd /pynq/sdbuild/build/Pynq-Z1/petalinux_bsp
+ petalinux-create --type project --template zynq --name xilinx-pynqz1-2019.1
INFO: Create project: xilinx-pynqz1-2019.1
INFO: New project successfully created in /pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/xilinx-pynqz1-2019.1
+ cd xilinx-pynqz1-2019.1
+ petalinux-config --get-hw-description=/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/hardware_project --silentconfig
INFO: Getting hardware description...
INFO: Rename pynqz1.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] silentconfig project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
ERROR: Failed to generate meta-plnx-generated layer
ERROR: Failed to config project.
ERROR: Get hw description Failed!.
Makefile:324: recipe for target '/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/xilinx-pynqz1-2019.1.bsp' failed
make: *** [/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/xilinx-pynqz1-2019.1.bsp] Error 255

I get the same result for my custom board presumably the result would be the same for the other supported boards.

Any help or pointers on how to debug would be appreciated, I have read relevant posts and had no luck.


If I use petalinux-create to create a project in the vagrant home folder, cd to it, then
petalinux-config --get-hw-description /pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/hardware_project. Using the hardware_project produced by make before the error, petalinux-config completes and the recipe is produced.

Any advice?

I think you should make your work space in /workspace. Not in /pynq. Remember /pynq is a small shared folder with your host machine. Check step 7 of

Hi Rock,

Thanks for the reply I am getting frustrated and any advice is appreciated.

Yes everything is installed in /workspace in the example above I did make a project in /home/vagrant but in that small case disk space was not a problem it was a test to see if it was a petalinux install issue and the fact that I can get config to complete when calling the tool directly points to a problem with the either make or the vagrant setup. BTW I have followed those instructions twice constructing both xenial and bionic build VMs.

The point is that the documented flow is broken, it think it maybe a permission problem with the bitbake lockfile.

snipped from sdbuild\build\Pynq-Z2\petalinux_bsp\xilinx-pynqz2-2019.1\build\config.log

[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
NOTE: Starting bitbake server...
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/workspace/Xilinx/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/bb/", line 446, in setup_bitbake
    server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
  File "/workspace/Xilinx/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/bb/server/", line 390, in __init__
PermissionError: [Errno 1] Operation not permitted
WARNING: /workspace/Xilinx/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/bb/ ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>"Retrying server connection... (%s)" % traceback.format_exc())

WARNING: /workspace/Xilinx/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/bb/ ResourceWarning: unclosed file <_io.TextIOWrapper name='/pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/xilinx-pynqz2-2019.1/build/bitbake.lock' mode='a+' encoding='UTF-8'>
  topdir, lock = lockBitbake()

config.log (16.5 KB)

BTW: isn’t the /pynq share the git repo on the host? in this case NTFS?

Cheers and thanks again for the reply and further tips would be appreciated.

Did you install petalinux using sudo? (should just follow petalinux guide to install without any change of permission or sudo). Looks like a permission problem when petalinux is spawning some subprocess.

I did not use sudo as per the instructions in the Xilinx UG.

Make fails after the HW project is created I can then manually run petalinux-config using the HW project with out error which makes me think the install is fine.


As I suggested in previous post, you should work in the 160GB workspace folder, not in /pynq (a small shared folder). So build your image inside /workspace.

Not sure what you mean, clone the repo into workspace? Isn’t /pynq on the host?

Yes clone a new repo in /workspace and work in that folder.

Thanks Rock,

I made a bionic VM without using the documented vagrant flow and used, make PREBUILT=<image> BOARDS=Pynq-Z2 works without error.

I also tried with the vagrant bionic machine after recloning the repo into /workspace it has proceeded past the Error.

This step does not appear to be in the documentation, I expect it only matters for windows hosts as the /pynq mount is NTFS and hence the permission problem. I still don’t get your comments relating to the size of /pynq as it is on the windows host.

Thanks again.