# Error while booting from PYNQ image for Trenz board

**URL:** <https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074>\
**Category:** Support\
**Created:** [September 26, 2021, 4:54pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074 "2021-09-26T16:54:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![thejonty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/thejonty/32/1739_2.png) [@thejonty](https://discuss.pynq.io/u/thejonty)\
**Post date:** [September 26, 2021, 4:54pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/1 "2021-09-26T16:54:31Z")

</div>

Hi,

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](https://discuss.pynq.io/t/pynq-image-for-different-board/1106/3).

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](https://discuss.pynq.io/t/vagrant-bionic-build-fails/1828/6):

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!

-TheJonty

---

<div class="post-metadata">

**Author:** ![wouter.devriese](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@wouter.devriese](https://discuss.pynq.io/u/wouter.devriese)\
**Post date:** [September 27, 2021, 7:24am UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/2 "2021-09-27T07:24:53Z")

</div>

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

![image001.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/36eba9dc2df66f8eb4a749565b202ab59b57a1b8.png)

![image002.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/9b9342550352321d855c64837be5a5a37e03412d.png)

![image003.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/3c5a2fc701b451278c0330d529401cff9dbc3599.png)

![image004.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/f/f84eb63cbbc48c9f3cc31e9291bfd15282049585.png)

![image005.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/6/616624de1a4ba50530998fad798a3c26028c02b3.png)

![image006.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/990c3e218474bb6d40f63d1b05c7bd0eed06a9cd.png)

![image007.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/d/dc770b985a47ecc503b674055cf28ea531e0af61.png)

---

<div class="post-metadata">

**Author:** ![thejonty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/thejonty/32/1739_2.png) [@thejonty](https://discuss.pynq.io/u/thejonty)\
**Post date:** [September 27, 2021, 1:52pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/3 "2021-09-27T13:52:28Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![wouter.devriese](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@wouter.devriese](https://discuss.pynq.io/u/wouter.devriese)\
**Post date:** [September 27, 2021, 3:03pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/4 "2021-09-27T15:03:22Z")

</div>

Hej

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](https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842223/U-boot)

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.)

Sincerely

![image001.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/36eba9dc2df66f8eb4a749565b202ab59b57a1b8.png)

![image002.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/9b9342550352321d855c64837be5a5a37e03412d.png)

![image003.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/3c5a2fc701b451278c0330d529401cff9dbc3599.png)

![image004.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/f/f84eb63cbbc48c9f3cc31e9291bfd15282049585.png)

![image005.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/6/616624de1a4ba50530998fad798a3c26028c02b3.png)

![image006.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/990c3e218474bb6d40f63d1b05c7bd0eed06a9cd.png)

![image007.png](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/d/dc770b985a47ecc503b674055cf28ea531e0af61.png)

---

<div class="post-metadata">

**Author:** ![thejonty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/thejonty/32/1739_2.png) [@thejonty](https://discuss.pynq.io/u/thejonty)\
**Post date:** [September 27, 2021, 3:15pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/5 "2021-09-27T15:15:26Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![wouter.devriese](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@wouter.devriese](https://discuss.pynq.io/u/wouter.devriese)\
**Post date:** [September 27, 2021, 3:40pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/6 "2021-09-27T15:40:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thejonty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/thejonty/32/1739_2.png) [@thejonty](https://discuss.pynq.io/u/thejonty)\
**Post date:** [September 27, 2021, 7:04pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/7 "2021-09-27T19:04:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wouter.devriese](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@wouter.devriese](https://discuss.pynq.io/u/wouter.devriese)\
**Post date:** [September 28, 2021, 8:31am UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/8 "2021-09-28T08:31:39Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![thejonty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/thejonty/32/1739_2.png) [@thejonty](https://discuss.pynq.io/u/thejonty)\
**Post date:** [September 28, 2021, 1:56pm UTC](https://discuss.pynq.io/t/error-while-booting-from-pynq-image-for-trenz-board/3074/9 "2021-09-28T13:56:35Z")

</div>

Okay, thank you so much.
