cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cellis5902
Visitor
Visitor
10,060 Views
Registered: ‎06-08-2016

Kernel Boot Failing on Zynq in U-Boot

Jump to solution

Need some help understanding what I am doing wrong.

FSBL and U-Boot run properly on MicroZed 7010 board, but U-Boot fails to load and run kernel.

 

I have Vivado 2015.2 installed in an Ubuntu 14.04.3 session

I have PetaLinux 2015.2 installed as well

I have the MicroZed 7010 board files installed in Vivado correctly.

 

BSP works great:

I can completely build the BSP design and package the outputs and put the resultant files on the SD card, everything boots and runs fine, Ethernet works, life is good.

BUT!! I need to be able to add an IP peripheral to the design so I can start working on a Linux device driver. I am not finding a way to modify the BSP to add IP. My guess is once the BSP is created you can’t go backward and import it into Vivado, make changes, and then re-output the changes to the BSP. So I assume I need to create my own project – should be easy!!

 

CUSTOM PROJECT:

I am able to completely create a board design for the MicroZed using the Vivado Create Project and selecting 7010 and following the tutorial for creating the design.

The hardware design builds correctly & I am able to export the hardware and bitstream.

From the hardware design file, I am creating and configuring a PetaLinux project as described in the PetaLinux guides.

I am able to build the project successfully.

I am able to package the project outputs into a boot.bin and put the resultant boot.bin and image.ub on the sd card root.

The board boots, configures and uboot runs, outputting to the console but the attempt to load and boot the kernel fails with the following messages to the console:

 

U-Boot 2015.04 (Jun 08 2016 - 10:20:54)

 

DRAM:  ECC disabled 1 GiB

MMC:   zynq_sdhci: 0

SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB

*** Warning - bad CRC, using default environment

 

In:    serial

Out:   serial

Err:   serial

Net:   Gem.e000b000

U-BOOT for geproject

 

Gem.e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

Gem.e000b000: No link.

Hit any key to stop autoboot:  0

sdhci_send_command: MMC: 0 busy timeout increasing to: 200 ms.

sdhci_send_command: MMC: 0 busy timeout increasing to: 400 ms.

sdhci_send_command: MMC: 0 busy timeout increasing to: 800 ms.

sdhci_send_command: MMC: 0 busy timeout increasing to: 1600 ms.

sdhci_send_command: MMC: 0 busy timeout increasing to: 3200 ms.

sdhci_send_command: MMC: 0 busy timeout.

sdhci_send_command: MMC: 0 busy timeout.

sdhci_send_command: MMC: 0 busy timeout.

sdhci_send_command: MMC: 0 busy timeout.

sdhci_send_command: MMC: 0 busy timeout.

sdhci_send_command: MMC: 0 busy timeout.

sdhci_send_command: MMC: 0 busy timeout.

U-Boot-PetaLinux> <INTERRUPT>

U-Boot-PetaLinux>

0 Kudos
1 Solution

Accepted Solutions
rgrossman
Adventurer
Adventurer
16,548 Views
Registered: ‎12-03-2015

I had that exact same problem with one of my development boards. It was the clock speed setting of the SD card controller (sdhci0). It was set to 25 MHz which is too slow. I changed it to 50 MHz in Vivado and generated a new HDF and then a new Petalinux  projec. It then worked.

You might be able to just change it in the device tree by adding this to system-top.dts

 

&sdhci0 {
clock-frequency = <25000000>;
};

 

Ron

View solution in original post

7 Replies
cellis5902
Visitor
Visitor
10,051 Views
Registered: ‎06-08-2016


One more thing to note: on the U-Boot command line I can issue the mmc commands, all of which return with the bust timeout failure.

Obviously, the SD card is not configured -- could be something as simple as being missing from the device tree?

 

0 Kudos
jeffdaq
Explorer
Explorer
10,046 Views
Registered: ‎11-22-2015

U-boot  doesnt use the devicetree, at least not for my zc706 dev board, and you don't appear to be getting to the kernel so your devicetree shouldn't matter yet.  If you are loading the boot.bin from SD then the bootrom is not having any problems with SD which would indicate the bit file the fsbl is loading is somehow breaking SD.  Check the pin settings in vivado for the PS to make sure SD is connected properly in your custom design

 

Jeff

0 Kudos
achutha
Xilinx Employee
Xilinx Employee
9,751 Views
Registered: ‎07-01-2010

@cellis5902

 

This seems to be an issue with sd clock. I have attached the device tree verify this with your sd node.

 

Regards,
Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
rgrossman
Adventurer
Adventurer
16,549 Views
Registered: ‎12-03-2015

I had that exact same problem with one of my development boards. It was the clock speed setting of the SD card controller (sdhci0). It was set to 25 MHz which is too slow. I changed it to 50 MHz in Vivado and generated a new HDF and then a new Petalinux  projec. It then worked.

You might be able to just change it in the device tree by adding this to system-top.dts

 

&sdhci0 {
clock-frequency = <25000000>;
};

 

Ron

View solution in original post

cellis5902
Visitor
Visitor
9,731 Views
Registered: ‎06-08-2016

Thanks - yes the SD clock speed was 25 MHz and setting it to 50 solved the problem!!

0 Kudos
ransh
Explorer
Explorer
7,992 Views
Registered: ‎05-28-2014

Hi,

 

Does anyone knows what's the meaning of sdio clock hdf configuration , and linux device tree sdio clock configuration ?

Should they match ?

 

If u-boot does not use device tree, and u-boot can communicate with sdio, so why does linux need this configuration in dts  (while u-boot doesn't)?

 

 

Thanks,

Ran

0 Kudos
abhinav007
Visitor
Visitor
4,205 Views
Registered: ‎09-25-2017

Hi,

I am facing the same issue. My requirement is to run the SDIO controller with 25 Mhz for the entire phase. However, I get the same error log (@cellis5902) while loading the kernel from SD Card to DDR at the u-boot stage. I have explored a few options like changing the add_sdhci max_clk frequency, but it does not work as expected. Do I need to do some modification in any of the u-boot driver?

I am using Vivado 2015.4.2 in combination with Petalinux 2015.2.1 . 50 Mhz SD configuration works perfectly.

 

Regards,

Abhinav

0 Kudos