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 petalinux-user-image.bb recipe is produced.
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/main.py", 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/process.py", line 390, in __init__
self.sock.bind(os.path.basename(sockname))
PermissionError: [Errno 1] Operation not permitted
)
WARNING: /workspace/Xilinx/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
logger.info("Retrying server connection... (%s)" % traceback.format_exc())
WARNING: /workspace/Xilinx/petalinux/2019.1/components/yocto/source/arm/layers/core/bitbake/lib/bb/main.py:435: 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()
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.
I made a bionic VM without using the documented vagrant flow and used setup_host.sh, 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.