UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor mvivek.a
Visitor
9,152 Views
Registered: ‎09-09-2014

Zynq - Linux boot hangs while loading Ramdisk

Hello,

 

I am porting Linux on to custom Zynq board. I have built u-boot and linux kernel, created device tree and wrote in QSPI flash.

Linux boots from QSPI when the board is powered on and I could see the initial linux boot messages on serial console.

But the kernel hangs while Loading Ramdisk.

 

I have attached the boot messages below and also attached "boot.bif" for more information.

 

the_ROM_image:
{
 [bootloader]D:\Vivek\Xilinx\zynq\SDK\Final_Boot\zync_fsbl_0.elf
 D:\Vivek\Xilinx\zynq\SDK\Final_Boot\u-boot.elf
 [offset = 0x100000]D:\Vivek\Xilinx\zynq\SDK\Final_Boot\uImage.bin
 [offset = 0x600000]D:\Vivek\Xilinx\zynq\SDK\Final_Boot\devicetree.dtb
 [offset = 0x620000]D:\Vivek\Xilinx\zynq\SDK\Final_Boot\uramdisk.image.gz
}

 

 

I am stuck at this stage and need some information to proceed ahead. Please let me know if i miss anything in my porting process or any addressing is wrong.

 

Find below the Boot message on serial console. Also I have attached "boot.bif" file for further information.

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

U-Boot 2014.01 (Sep 11 2014 - 12:48:47)

I2C:   ready
Memory: ECC disabled
DRAM:  1 GiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
Hit any key to stop autoboot:  0
Copying Linux from QSPI flash to RAM...
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
SF: 5242880 bytes @ 0x100000 Read: OK
SF: 131072 bytes @ 0x600000 Read: OK
Copying ramdisk...
SF: 6160384 bytes @ 0x620000 Read: OK
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.14.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3353432 Bytes = 3.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
   Image Name:
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5309954 Bytes = 5.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
   Booting using the fdt blob at 0x2a00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1faef000, end 1ffff602 ...

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

0 Kudos
8 Replies
Visitor mvivek.a
Visitor
9,116 Views
Registered: ‎09-09-2014

Re: Zynq - Linux boot hangs while loading Ramdisk

Hi Guys,

Is there any answer to my question? I am just wondering whether I'll get any response from Xilinx support at all?
Previously I was facing another problem and raised it in this forum. So far I have never received any reply. I somehow figured it myself.

The question may be very basic or silly to answer for experts to answer. But for a newbie like me it is not.

Hope I can get some valid response soon...
0 Kudos
Xilinx Employee
Xilinx Employee
9,108 Views
Registered: ‎03-13-2012

Re: Zynq - Linux boot hangs while loading Ramdisk

Well, there is nothing obviously wrong in what you posted. So, just the generic pointers: Connect a debugger and find out where it's hanging, check Linux' debug UART settings (see http://forums.xilinx.com/t5/Embedded-Linux/create-devicetree-with-sdk-2014-2/m-p/516607/highlight/true#M10467 ).

0 Kudos
Visitor mvivek.a
Visitor
9,098 Views
Registered: ‎09-09-2014

Re: Zynq - Linux boot hangs while loading Ramdisk

Hi Sorenb,

Thanks for your reply!!!
In my board, Boot happens from QSPI. So I can't check with gdb on XMD i guess.

 

I changed the config file to use CONFIG_DEBUG_ZYNQ_UART0 istead of UART1, Is it possible? I haven't enabled UART1 in my board as it is used for some other purpose.


So is this the reason, I am unable to see the boot messages after Kernel is booting after the line "Loading Ramdisk to 1faef000, end 1ffff602 ..."?

 

 

Thanks,
Vivek

 

0 Kudos
Visitor mvivek.a
Visitor
9,092 Views
Registered: ‎09-09-2014

Re: Zynq - Linux boot hangs while loading Ramdisk

Hi Sorenb,

I changed CONFIG_DEBUG_ZYNQ_UART0=y, but the boot message display stops at the same place.
I can't use UART1, since we are facing some h/w issue with UART1.
Can you suggest me how to solve this issue while using UART0?

Thsnks,
Vivek
0 Kudos
Scholar trenz-al
Scholar
9,082 Views
Registered: ‎11-09-2013

Re: Zynq - Linux boot hangs while loading Ramdisk

it does really not matter if you use uart0 or uart1

 

the only funny thing is that xilinx SDK flash programmer sends bogus data to uart1 during flash programming that uses main communication over JTAG.

 

so just use whatever uart you have, and if you have none you can use DCC console over jtag also

0 Kudos
Xilinx Employee
Xilinx Employee
9,069 Views
Registered: ‎03-13-2012

Re: Zynq - Linux boot hangs while loading Ramdisk

Set it to whatever UART you're using. It just is a problem if you set it to a UART that is not connected.

Regarding the debugger, why wouldn't it work? You get to U-Boot, so you should be able to connect to the board via JTAG at that point (if using secure boot, some restrictions may apply, but I hope you aren't doing that during bring up).

0 Kudos
Newbie chatnuck
Newbie
7,547 Views
Registered: ‎04-30-2015

Re: Zynq - Linux boot hangs while loading Ramdisk

I had the same problem and it was because the DTS source (system.dts) in the devicetree bsp had the wrong amount of ram specified.  It was set to 1GiB and we has 512MiB.  Manully fixing this in the DTS file, then building the DTB cleared the problem.

0 Kudos
Participant antonio.dibacco
Participant
6,162 Views
Registered: ‎10-05-2014

Re: Zynq - Linux boot hangs while loading Ramdisk

I had a similar problem. I would suggest, just for debugging, to disable d-cache and i-cache in Linux, in this way there will be no burst accesses to DDR (except for DMA transfers). In my case the DDR was working really fine with u-boot and its embedded memory test  but it was causing a Linux hang without any hint. The kernel was stuck while loading the rootfs (copying the ext2 ram image into /dev/ram) due to burst accesses to DDR.

 

To disable I-CACHE and D-CACHE change the kernel configuration adding:

 

CONFIG_RELOCATABLE=y
CONFIG_CPU_ICACHE_DISABLE=y
CONFIG_CPU_DCACHE_DISABLE=y

 

and then comment out the L2 cache controller in zynq-7000.dtsi.

 

/*
 L2: cache-controller@f8f02000 {
 compatible = "arm,pl310-cache";
 reg = <0xF8F02000 0x1000>;
 arm,data-latency = <3 2 2>;
 arm,tag-latency = <2 2 2>;
 cache-unified;
 cache-level = <2>;
 };
*/

 

0 Kudos