Hello, I am using the PYNQ-Z2, with an SD card that was flashed with the most recent available image (v3.0.1). I haven’t changed anything about the FPGA yet, I have just been trying to get Wireguard installed so I can access the board remotely once I have some other infrastructure set up.
It installs with the standard “sudo apt install wireguard”. Installing via apt seems to work fine, until I try and actually use it and it uses the line “ip link add wg0 type wireguard” and then it tells me "Error: Unknown device type.
Unable to access interface: Protocol not supported
".
I thought that maybe compiling from source would give better results, but in the process of trying to compile with make, I both had the wrong compiler and was missing some dependencies by default.
The exact make logs are found here. You can see the warning about compiler type, and the missing file errors. I may be misunderstanding, but it’s seeming to me like the best course of action would be to compile a new image that includes the necessary dependencies like mentioned in this post from a few years ago, but honestly I am not sure how to do that. It is pretty critical that I get some method of remote connection up and running, and I cannot modify the existing network architecture.
Any help would be appreciated, or if your advice is to accept the limitations, that’s also an option in my head.
The following comments come from my personal experience.
PYNQ-Z2 source code needs to cross-compile using ARM gcc so you cannot use Ubuntu default gcc to build the code.
According to your log:
The kernel was built by: arm-xilinx-linux-gnueabi-gcc (GCC) 11.2.0
You are using: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Hence, try to download arm-xilinx-linux-gnueabi-gcc (GCC) 11.2.0 and rebuild source code.
I’ve been trying to find where to find that compiler but I’ve been having trouble. I found a list here that lists some compilers that are close, but not quite as described in the make logs. Do you know where I could find the arm-xilinx-linux-gnueabi-gcc compiler?
When it’s deployed, there will be no direct ssh access. It will be on a different network, and I cannot change the network architecture. The requirement for my usecase is that the board have an accessible API (hosted via python) without changing the network.
My thought was to use wireguard, as it is easy to set up and (I thought) it was already integrated into the Linux kernel. I would set up a server external to the host network (visible via IPv4) and then create the necessary certificates to allow people access. So long as wireguard is installed, I don’t have to change much else about the setup.
Earlier today I found some docs on the petalinux toolkit that AMD provides, which is assumedly the intended method to modify and patch the board software. I ran into the compiler problem again. Maybe the petalinux tools expect gcc 11.2.0, as the error mentioned in my original post? It seems as though all I would need to do is configure the kernel to enable built-in wireguard, then build and package the image to use.