# PYNQ sd card for custom board fails to boot

**URL:** <https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147>\
**Category:** Support\
**Created:** [May 30, 2019, 3:26pm UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147 "2019-05-30T15:26:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 30, 2019, 3:26pm UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/1 "2019-05-30T15:26:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [May 31, 2019, 12:19am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/2 "2019-05-31T00:19:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 8:56am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/3 "2019-05-31T08:56:53Z")

</div>

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 😭:  
**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

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 10:43am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/4 "2019-05-31T10:43:35Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![ambarish](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@ambarish](https://discuss.pynq.io/u/ambarish)\
**Post date:** [June 4, 2019, 3:19pm UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/5 "2019-06-04T15:19:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 5, 2019, 7:29am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/6 "2019-06-05T07:29:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ambarish](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@ambarish](https://discuss.pynq.io/u/ambarish)\
**Post date:** [June 5, 2019, 3:14pm UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/7 "2019-06-05T15:14:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ambarish](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@ambarish](https://discuss.pynq.io/u/ambarish)\
**Post date:** [June 6, 2019, 6:42am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/8 "2019-06-06T06:42:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 6, 2019, 7:21am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/9 "2019-06-06T07:21:56Z")

</div>

yes, I don’t think it is necessary

---

<div class="post-metadata">

**Author:** ![ambarish](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@ambarish](https://discuss.pynq.io/u/ambarish)\
**Post date:** [June 6, 2019, 8:19am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/10 "2019-06-06T08:19:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 6, 2019, 9:39am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/11 "2019-06-06T09:39:46Z")

</div>

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](https://github.com/Xilinx/hdf-examples/tree/master/zedboard-zynq7)…

---

<div class="post-metadata">

**Author:** ![ambarish](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@ambarish](https://discuss.pynq.io/u/ambarish)\
**Post date:** [June 7, 2019, 6:31am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/12 "2019-06-07T06:31:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 7, 2019, 8:33am UTC](https://discuss.pynq.io/t/pynq-sd-card-for-custom-board-fails-to-boot/147/13 "2019-06-07T08:33:58Z")

</div>

> [@ambarish](#):
>
> 2018.3

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