Error while booting from PYNQ image for Trenz board


I am trying to generate and boot from a PYNQ image for a Trenz board (TE0820-03-3BE21FA). I am using 2019.1 version of Xilinx tools and Petalinux. I am also using PYNQ v2.5 since 2019 tools need PYNQ v2.5.

I am able to generate an image without any issue, thanks to the information in this link.

But when I burn the image and try to boot from the SD card, I am running into issues; I get an error msg “** Invalid partition 1 **”.

1023 MiB
EL Level: EL2
Chip ID: zu3eg
MMC: mmc@ff160000: 0, mmc@ff170000: 1
Loading Environment from SPI Flash… SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
*** Warning - bad CRC, using default environment

In: serial@ff000000
Out: serial@ff000000
Err: serial@ff000000
Board: Xilinx ZynqMP
Bootmode: SD_MODE1
Reset reason: EXTERNAL
U-BOOT for trenz_0820_03

Hit any key to stop autoboot: 0
** Invalid partition 1 **
Device: mmc@ff160000
Manufacturer ID: 9d
OEM: 101
Name: IS008
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
** Invalid partition 1 **

I used the commands mentioned here:

setenv sdbootdev 1
setenv bootargs ‘root=/dev/mmcblk1p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id=“generic-uio” clk_ignore_unused’
boot Petalinux; run uenvboot ; mmcinfo && fatload mmc 1 {netstart} {kernel_img} && bootm

But still cannot boot; I am not able to run “fatload” command but not sure whether that’s an issue.

Boot process gets stuck at this step below:

[ 5.371683] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 5.380300] cfg80211: failed to load regulatory.db
[ 5.385176] Waiting for root device …

I am stuck at this point and any help with this issue would be appreciated. Thanks!


Hi TheJonty

That’s been a while, if I recall correctly it means that the boot system can’t find the appropriate SD partition to read from.

Things to check:

  1. in your HW design, did you enable more than 1 SD card connection? This could influence the order of the sd cards partitions it searches

2.You’re past the bootloader. If you stop the bootloader from trying to boot from the SD card you get a prompt. In there you can try to find if your SD card is recognized, try to mount it and see if it recognizes your files. This way you can get to know the correct bootargs (Especially root=/dev/mmcblk1p2).

Hope this gets you any further








Hi Wouter,

Thank you for your comments. I have a few more questions since I am new to ZYNQ and I am basing my design on a reference design.

  1. I have SD 0 (slot type eMMC) and SD 1 (slot type SD 2.0) enabled on ZYNQMP. I am not sure which one to disable.

  2. How to stop the bootloader from trying to boot from SD card?

Thank you!


Its been a while since I used it, basically first try to stop the bootloader. It’s a linux console, so I assume CTRL+C will do the job. You should see a prompt as in: “zynq >”

There you should spend some time trying to find out which partition is your sd card (check command here

The reference design tells you what is connected to the ZYNQ already: eMMC is onboard flash memory, the other one is your SD card. If you don’t use the flash memory you can disable it, yet not necessary. This influences the partitions your linux bootloader will see though, so I’d suggest to leave it as it is right now and first scan via U-Boot your SD card.

Also, it could be that your SD card is corrupt (the second partition, with your linux distro), therefore trying to boot from u-boot helps: first try to find out which partition to load, then see if it loads, otherwise there could be something wrong with the SD card (did you verify your SD card? If not, perhaps try using balena etcher or something with buildin verification, just to be sure.)









I used Balena etcher to burn the image and it did verify the sd card after writing the image.

Here is the info regarding mmc:

ZynqMP> mmc list
mmc@ff160000: 0 (eMMC)
mmc@ff170000: 1 (SD)
ZynqMP> mmc part

Partition Map for MMC device 1 – Partition Type: DOS

Part Start Sector Num Sectors UUID Type
1 2048 204800 ce1fce36-01 0c Boot
2 206848 12480304 ce1fce36-02 83

So, I guess I need to set root=/dev/mmcblk1p1 (since boot is set to part # 1)?

Thanks for the helpful hints!

Hmm not really, (I think…) you’re trying to boot the OS, which is most often the second partition.
You’re sure you’ve an OS on the second partition (such as ubuntu, debian, …)?

In U-boot you can also mount partitions, do this to check if you can read what’s on the partition, see if you get the folder structure of your OS

I actually do not know whether I have an OS but the directory structure seems like a linux OS.

ZynqMP> ls mmc 1:2

4096 . 4096 .. 16384 lost+found 4096 boot 4096 var 4096 etc 4096 usr 4096 dev 5 lib64 4096 tmp 4096 lib 4096 bin 4096 home 4096 proc 4096 root 4096 run 4096 sbin 4096 sys 150 kernel.tgz 4096 mnt 4096 srv 4096 opt 4096 media ZynqMP> ls mmc 1:2 boot 4096 . 4096 .. ZynqMP> ls mmc 1:2 root 4096 . 4096 .. 148 .profile 3106 .bashrc 4096 .cache 4096 .jupyter 4096 .local 4096 .npm 4096 .config 4096 .fluxbox ZynqMP> ls mmc 1:2 home 4096 . 4096 .. 4096 xilinx

that indeed looks like a linux distro.
Are there headers on your trenz board to enable SD card booting? This could also be an issue, otherwise I’d suggest posting the question on the xilinx forums. This is more a xilinx/petalinux issue than is it a pynq issue…

Okay, thank you so much.