PYNQ sd card for custom board fails to boot

I wrote the myBoard-2.4.img, obtained with the standard make BOARDIR=Myboardpath, on an SD card with Win32DiskImager and put it in my board SD slot but nothing happened… nothing, no booting text from the uart.
I fear my board has the both PS uart enabled but debug port connected to PS uart0 while the pynq make SD process inherit PYNQ-Z1 or Z2 Kconfig that had it on PS uart1, can anyone confirm? How can I fix it? is the Kconfig file editable?
Best regards

I guess you can change in the petalinux configurations?

After tweaking it, you just need to rebuild the boot partition (you just need to copy the boot.bin and uImage onto your boot partition) and quickly try it out.

My approach:
cd pynqGitHubFolder/sdbuild/build/myBoard/petalinux_project
petalinux-config
-*- Subsystem AUTO Hardware Settings → Serial Settings → Primary stdin/stdout (ps7_uart_0) → exit → exit → save
petalinux-build
petalinux-package --boot --format BIN --fsbl ./images/linux/zynq_fsbl.elf --fpga ./images/linux/myBoard_bd_wrapper.bit --u-boot ./images/linux/u-boot.elf --force
Then I copied the new BOOT.BIN and image.ub to the SD card in the partition where the old files were, and tried to boot again.
Now I got something on the serial debug out, but not very much :sob::
U-Boot 2018.01 (May 31 2019 - 08:00:20 +0000) Xilinx Zynq ZC702

Board: Xilinx Zynq
Silicon: v3.1
I2C: ready
DRAM: ECC disabled 512 MiB
MMC: mmc_init: -110, time 5
mmc@e0101000 - probe failed: -110
mmc@e0100000: 0 (SD)mmc_init: -110, time 6

What is wrong? There shall be something else missing in the configuration… Looks it can not even load and run the FSBL!
Cheers

PS the SD card and my board work fine, no booting problem for standard petalinux or other linux images

It was necessary to modify the configuration settings bit more:
petalinux-config
-*- Subsystem AUTO Hardware Settings → Advanced bootable images storage Settings → u-boot env partition settings → image storage media →
(x) primary flash to (x) primary sd → return → exit → exit → exit → save

unclear why it was set to flash by default, but this was enough to get the system booting!

1 Like

Hi gpcus,
I am trying to build the PYNQ image for my xilinx zedboard(ZYNQ-7000). Can you assist me as to how to generate the image file for custom board.
I have installed petalinux , sdx, vivado (all of version 2018.3) . After this how should i proceed?

Sure.
For the Zedboard it’s even simpler because is not a ,strictly speaking, “custom” board…
Possibly, for a standard zedboard you could find an image already made.
But building it yourself is certainly more fun and educational!
First, I hope you installed all the tools on a Linux VM with at least 50GB disk (remember to get sudo rights with no password!) .
Second you need to clone the GitHub pynq repository somewhere on the VM.
Third you need to run setup_host.sh on the VM to set the environment and few other things.
Fourth you need to export the hdf for your hardware project from Vivado (including bitfile)
When you are done you create a the following folders tree in your PynqGitHubRoot folder:
PYNQ/myboards/ZedBoard/petalinux_bsp/hardware_project
and put the hdf into hardware project, the bit file in ZedBoard and create a text file ZedBoard.spec in the same folder with the following lines:
ARCH_ZedBoard := arm
BSP_ZedBoard :=
BITSTREAM_ZedBoard := your_bitfile.bit
STAGE4_PACKAGES_ZedBoard:= pynq
Finally, you cd to PYNQ/sdbuild and run:
make BOARDDIR=PYNQ/myboards
where you replace PYNQ with the absolute path to it.
Keep an eye on the output and in few hours, if there are no errors, you will get your ZedBoard-2.4.img in PYNQ/sdbuild/output ready for being written on an SD card.
There maybe some tweaking of petalinux configuration there after but try to get the SD to start with.
Best regards and good luck!
Any problem I suggest you open a new thread; I’ll keep an eye on it, but, more important, the true authorities on the subject, Cathal, Rock and Peter, can help you, too. And quickly, because I am Europe -based and therefore can reply only after some time lapse.

Thanks a lot for your detailed explanation. Tomorrow i will try this and get back to you and others if i have any issues. Thanks again.

1 Like

I dont have the bit file. Can i leave that part empty?

yes, I don’t think it is necessary

I currently do not have the hdf file. i just want to make my zedboard python compatible. As far as i can understand that means i just have to make a linux image for the arm core . Is the hdf file required?
I have deep learning codes which i wish to implement on it once it becomes python compatible.

Yes, the hdf is needed. It includes the Zynq SOC ARM subsystem configuration, without it you can’t generate an image for a board including the SOC with the pynq procedure. In my understanding you wish to use the zynq SOC on the zedboard as a microprocessor, without exploiting the Programmable Logic part, and interact with it with Python… that’s fine, you can do that. Just use the default zedboard hdf

I have added petalinux 2018.3 to the path . but apparently when i run make BOARDDIR=/home/adsc/Downloads/Downloads1/PYNQ/myboards, the following error is shown- which petalinux-config | fgrep 2018.3
Makefile:309: recipe for target ‘checkenv’ failed
make: *** [checkenv] Error 1

But if i type which petalinux-config on the teminal it is pointing to the following path adsc@adsc-i5-fpga:~$ which petalinux-config
/home/adsc/Downloads/Downloads1/petalinux/tools/common/petalinux/bin/petalinux-config

What can be the issue?

You do not have the “2018.3” string in the petalinux path… just comment out the “which petalinux-config” line in the makefile