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: 
Adventurer
Adventurer
7,726 Views
Registered: ‎01-10-2014

Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution

Hello everyone!

Here's the question:

I'm trying to boot Linux on my own custom Reference Design. I'm using this tutorial from Analog Devices:

http://wiki.analog.com/resources/tools-software/linux-drivers/platforms/zynq

 

I've generated  

- fsbl with SDK 2013.4

- u-boot from Xilinx sources, found them in Xilinx Wiki.

- uImage from Analog Devices Linux git.

 

Sourcery I'm using is Sourcery CodeBench Lite 2011.09-50. I don't know if that matters.

 

I've also added i2c device to default Zedboard device tree. My .dts file is attached.

 

While booting, Linux hangs at 

 

smp_twd: clock not found -2
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836480000000ns
Console: colour dummy device 80x30
Calibrating local timer...

 

and nothing happens. What can be wrong?

Thank you in advance!

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
11,124 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution

Well, anyway, problem solved.

For people facing the same trouble as me or any other trouble with device tree:

Just do not try to use device tree generator. I tried it several times and there was not a single one when it worked. It is much easier do download Xilinx devicetree Git and try to modify the most suitable .dts. I suppose I just don't know enough to develop device trees myself.

It is important to remember that it is NOT a problem if you specify a device that is not used - in this case there will be no driver for it in your fsbl so nothing will be done.

It IS a problem if you do NOT specify a device you use.

As for me, I just  wanted to add PS-I2C to Analog Devices ADV7511 reference design for Zedboard. So I just found a device-tree node for PS-I2C and added it to the "good" .dts from Xilinx.

I'm still not sure if it works but at least I have Linux booted on my board.

0 Kudos
9 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,724 Views
Registered: ‎08-02-2011

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution
Make sure you enabled the TTC when you configured the PS7 block in hardware.
www.xilinx.com
0 Kudos
Adventurer
Adventurer
7,713 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution
Yes, TTC0 is enabled.
0 Kudos
Adventurer
Adventurer
7,706 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution
But my TTC0 is connected to EMIO. Is that o'k?
0 Kudos
Xilinx Employee
Xilinx Employee
7,704 Views
Registered: ‎08-02-2011

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution
Oh okay good. Where did you get the dts from? Are you using the device tree generator tool?

You might try the master-next branch for the device tree generator. I ran into some similar problems a while ago with the device tree clocking.
www.xilinx.com
0 Kudos
Adventurer
Adventurer
7,698 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution
No, it's not device tree generator. I didn't manage to generate device tree on Windows really so I just modified a device tree from another reference design.
O'k I'll try to use device tree generator. Shall I use instructions from Xilinx Wiki?
0 Kudos
Adventurer
Adventurer
7,684 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution

So I have generated .dts file according to Xilinx Wiki.

 

The device tree generator didn't work giving this error:

http://forums.xilinx.com/t5/Embedded-Development-Tools/Error-build-device-tree-board-support-package/td-p/476366

So I followed the advice of a forumer and downloaded the old version of device tree generator.

 

I have also re-downloaded all the Xilinx gits and regenerated the boot files "just in case".

 

After using the old version .dts file was generated successfully. But I got kernel panic while booting Linux with .dtb made from this .dts:

 

 

-----------

Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0565d84 (5496 kB)
.init : 0xc0566000 - 0xc0592e00 ( 180 kB)
.data : 0xc0594000 - 0xc05c9340 ( 213 kB)
.bss : 0xc05c934c - 0xc05e7f94 ( 124 kB)
Preemptible hierarchical RCU implementation.
Dump stacks of tasks blocking RCU-preempt GP.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
Zynq clock init
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000

Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-g6a905b4 #1
task: c059e668 ti: c0594000 task.ti: c0594000

------------and so on

 

 

I have already heard that using .dts-es from device tree generator "as is" is not supposed. So I have to somehow fix it after generation. What is the methology of that fixing?

 

Thank you in advance.

0 Kudos
Adventurer
Adventurer
7,681 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution
I've spent several hours trying to figure out what is the problem and trying to compare the newly generated .dts with the old ("good") one. But nothing changed except I'm getting several warnings telling that ps7-scugic@f8f01000 has bad cell count (what does that mean?)

So here is the sad part of my console output:

Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0565d84 (5496 kB)
.init : 0xc0566000 - 0xc0592e00 ( 180 kB)
.data : 0xc0594000 - 0xc05c9340 ( 213 kB)
.bss : 0xc05c934c - 0xc05e7f94 ( 124 kB)
Preemptible hierarchical RCU implementation.
Dump stacks of tasks blocking RCU-preempt GP.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
prom_parse: Bad cell count for /cpus/amba@0/ps7-scugic@f8f01000
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic.c:1005 gic_of_init+0x44/0xf4()
unable to map gic dist registers
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-g6a905b4 #1
[<c001363c>] (unwind_backtrace) from [<c0010b80>] (show_stack+0x10/0x14)
[<c0010b80>] (show_stack) from [<c03b9260>] (dump_stack+0x7c/0xcc)
[<c03b9260>] (dump_stack) from [<c001e860>] (warn_slowpath_common+0x60/0x80)
[<c001e860>] (warn_slowpath_common) from [<c001e900>] (warn_slowpath_fmt+0x2c/0x3c)
[<c001e900>] (warn_slowpath_fmt) from [<c0577524>] (gic_of_init+0x44/0xf4)
[<c0577524>] (gic_of_init) from [<c057d660>] (of_irq_init+0x140/0x26c)
[<c057d660>] (of_irq_init) from [<c056694c>] (start_kernel+0x1d0/0x360)
[<c056694c>] (start_kernel) from [<00008074>] (0x8074)
---[ end trace 3406ff24bd97382e ]---
prom_parse: Bad cell count for /cpus/amba@0/ps7-scugic@f8f01000
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at drivers/irqchip/irq-gic.c:1008 gic_of_init+0x68/0xf4()
unable to map gic cpu registers
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.14.0-g6a905b4 #1
[<c001363c>] (unwind_backtrace) from [<c0010b80>] (show_stack+0x10/0x14)
[<c0010b80>] (show_stack) from [<c03b9260>] (dump_stack+0x7c/0xcc)
[<c03b9260>] (dump_stack) from [<c001e860>] (warn_slowpath_common+0x60/0x80)
[<c001e860>] (warn_slowpath_common) from [<c001e900>] (warn_slowpath_fmt+0x2c/0x3c)
[<c001e900>] (warn_slowpath_fmt) from [<c0577548>] (gic_of_init+0x68/0xf4)
[<c0577548>] (gic_of_init) from [<c057d660>] (of_irq_init+0x140/0x26c)
[<c057d660>] (of_irq_init) from [<c056694c>] (start_kernel+0x1d0/0x360)
[<c056694c>] (start_kernel) from [<00008074>] (0x8074)
---[ end trace 3406ff24bd97382f ]---
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = c0004000
[00000004] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.14.0-g6a905b4 #1
task: c059e668 ti: c0594000 task.ti: c0594000
PC is at gic_init_bases+0x88/0x260
LR is at gic_of_init+0xa8/0xf4
pc : [<c0577308>] lr : [<c0577588>] psr: 600001d3
sp : c0595f50 ip : c0595f40 fp : 00000000
r10: c059c3c0 r9 : dffffd40 r8 : 00000000
r7 : dfbe2964 r6 : 00000000 r5 : 00000010 r4 : ffffffff
r3 : c059c864 r2 : ffffffff r1 : ffffffff r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
Control: 18c5387d Table: 0000404a DAC: 00000015
Process swapper/0 (pid: 0, stack limit = 0xc0594240)
Stack: (0xc0595f50 to 0xc0596000)
5f40: 00000000 ffffffff 00000000 dfbe2964
5f60: c058b280 00000000 00000000 c0577588 00000000 dfbe2964 c05774e0 00000000
5f80: dcc03240 c058ffe0 c0595f98 00000000 c05893b8 c057d660 c0595f98 c0595f98
5fa0: c0595fa0 c0595fa0 c059c3c0 00000001 c0594000 c05c9380 ffffffff c056694c
5fc0: ffffffff ffffffff c05664bc 00000000 00000000 c05893b8 18c5387d c059c40c
5fe0: c05893b4 c059f6d0 0000406a 413fc090 00000000 00008074 00000000 00000000
[<c0577308>] (gic_init_bases) from [<c0577588>] (gic_of_init+0xa8/0xf4)
[<c0577588>] (gic_of_init) from [<c057d660>] (of_irq_init+0x140/0x26c)
[<c057d660>] (of_irq_init) from [<c056694c>] (start_kernel+0x1d0/0x360)
[<c056694c>] (start_kernel) from [<00008074>] (0x8074)
Code: e1540002 e3a05010 13c4401f 12844010 (e596c004)
---[ end trace 3406ff24bd973830 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
0 Kudos
Adventurer
Adventurer
11,125 Views
Registered: ‎01-10-2014

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution

Well, anyway, problem solved.

For people facing the same trouble as me or any other trouble with device tree:

Just do not try to use device tree generator. I tried it several times and there was not a single one when it worked. It is much easier do download Xilinx devicetree Git and try to modify the most suitable .dts. I suppose I just don't know enough to develop device trees myself.

It is important to remember that it is NOT a problem if you specify a device that is not used - in this case there will be no driver for it in your fsbl so nothing will be done.

It IS a problem if you do NOT specify a device you use.

As for me, I just  wanted to add PS-I2C to Analog Devices ADV7511 reference design for Zedboard. So I just found a device-tree node for PS-I2C and added it to the "good" .dts from Xilinx.

I'm still not sure if it works but at least I have Linux booted on my board.

0 Kudos
Visitor jchidalgo
Visitor
4,736 Views
Registered: ‎08-03-2015

Re: Linux boot stucks at "Calibrating local timer.." on Zedboard

Jump to solution

 

Hi,

 

I have the same problem, when linux is booting, it hangs at 

 

NR_IRQS:16 nr_irqs:16 16                                                        
smp_twd: clock not found -2                                                     
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 214748364800s
Console: colour dummy device 80x30                                              
Calibrating local timer...

 

I have done the following steps:

 

      - Checked TTC0 enable

      - Added PS-I2C to dts file

               

                     i2c0:i2c@e0004000 {
                                  compatible = "xlnx,PS7-i2c-1.00.a";
                                  reg = <0xE0004000 0x1000>;
                                  interrupts = <0 25 0>;
                                  interrupt-parent = <1>;
                                  bus-id = <0>;
                                  input-clk = <50000000>;
                                  i2c-clk = <100000>;
                                  #address-cells = <1>;
                                  #size-cells = <0>;
                   };

 

 

I don't know that can be wrong.

 

Thank you in advance!

0 Kudos