run make in sdbuild with a prebuilt image bionic.arm.2.4.img by make BOARDS=ZedBoard-ADI PREBUILT=/home/lightwish/zedboardPYNQ_AD9361/PYNQ
Then the error appears “recipe for target ‘qemu_check_arm’ failed”
I have no idea how to solve it. Did I miss some packages? I would appreciate it if you could help me.
Could you try running which qemu-arm-static to make sure it exists and you have access to it? Would also double check if you have sudo access, just doing a sudo ls before running make should do the trick if for any reason your binaries aren’t accessible to your user.
Also the PREBUILT parameter should be pointing to your image file (/path/to/file/bionic.arm.2.4), rather than a directory.
I just ran which qemu-arm-static and got /usr/bin/qemu-arm-static, which means it exists. And I ran sudo ls at /usr/bin folder and sdbuild folder, and corrected the PREBUILT parameter before running make. But I still got the error.
Can you also check what version it is? With qemu-arm-static -version like the makefile checks. Here’s a relevant post with a qemu version mistmatch, where the resolution might be helpful.
You might be able to follow the advice here and remove the SDx check on line 310 of the makefile. If possible I would recommend switching to a newer pynq version as the support for that will be far more recent and stable.
Thank you so much for your help! It starts to run make now!
I would like to use the latest version but I am actually following someone else’s project so that I choose the version being tested. Anyway, it’s indeed a good learning experience.
Running make takes time. I will update the result when running make finishes.
I’m using PetaLinux 2018.3 at branch 2019_r1, which corresponds to Vivado 2018.3. The versions of PetaLinux and vivado should match. I followed the steps in this project to create my BSP.
Since I’m using Zedboard + fmcomms3, I built my hardware project in adi/hdl/projects/fmcomms2/zed.
When you said you can’t run make anymore, were you getting some error message?
If you run lsblk in your terminal you should see those volumes mounted. You could unmount them using something like (replace paths as they appear in lsblk output)
Then you can run make clean and do a fresh image build…
The instructions you linked mention editing the makefile around line 127, have you edited that? There is linux kernel info in those meta layers so probably a good idea to double check.
I umounted these two volumes and ran make clean, then I could run make again. But still got an error depmod: ERROR: could not open directory /lib/modules/4.14.0-xilinx-v2018.3: No such file or directory. How can I get this 4.14.0-xilinx-v2018.3?
And I did edit the line 127 in makefile as mentioned in this project. I found that my linux kernel version is 4.15, while meta-adi requires 4.14 as listed in this file. May this be the problem?
By the way, here is the log information of make process. May provide some help.
What happens if you run find ./build/ -name "4.14.0-xilinx-v2018.3" from your sdbuild directory? I was able to get a folder like /package/lib/modules/5.4.0-xilinx-v2020.2 from one of my recent sdbuilds by doing a similar search. Maybe there is something you can change in your petalinux project?
After I ran find ./build/ -name "4.14.0-xilinx-v2018.3" from /sdbuild, a folder /sdbuild/package showed up. But there didn’t exist /sdbuild/package/lib/modules directory. Here are the contents in /sdbuild/package
I’ve encountered the exact same problem. It turns out that I only have 4.14.0-xilinx- in sdbuild/build/bionic.ZedBoard-ADI/lib/modules/. The folder is just named 4.14.0-xilinx-, lacking a suffix v2018.3.
I also found out that the suffix is related to CONFIG_LOCALVERSION in this link.
I feel that the solution is just somewhere around. I wonder if anybody gets an update on this. If I work around this, I will update in this post.
I SOLVED this issue today by changing “LINUX_VERSION := 4.14-xilinx-v2018.3” in Makefile line 7 to “LINUX_VERSION := 4.14-xilinx-”.
The last part of the log of the successful make is
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help): Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (206848-14680063, default 206848): Last sector, +sectors or +size{K,M,G,T,P} (206848-14680063, default 14680063):
Created a new partition 2 of type 'Linux' and of size 5.2 GiB.
Command (m for help): Disk /home/godfly/PYNQ/sdbuild/output/ZedBoard-ADI-2.4.img: 7 GiB, 7516192768 bytes, 14680064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa51ca6d9
Device Boot Start End Sectors Size Id Type
/home/godfly/PYNQ/sdbuild/output/ZedBoard-ADI-2.4.img1 * 2048 206847 204800 100M c W95 FAT
/home/godfly/PYNQ/sdbuild/output/ZedBoard-ADI-2.4.img2 206848 11052367 10845520 5.2G 83 Linux
Command (m for help): The partition table has been altered.
Syncing disks.
+ total_size=5526184
+ truncate -s 5526184K /home/godfly/PYNQ/sdbuild/output/ZedBoard-ADI-2.4.img
It seems that there is a more canonical way to do this, that is, run petalinux-config -c kernel and then go to General setup → Local version, and then change -xilinx- to -xilinx-v2018.3.