public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] imx: Kernel not booting with fdt
@ 2013-07-02 15:26 Matthias Weißer
  2013-07-02 20:02 ` Stefano Babic
  2013-07-03  1:16 ` Fabio Estevam
  0 siblings, 2 replies; 8+ messages in thread
From: Matthias Weißer @ 2013-07-02 15:26 UTC (permalink / raw)
  To: u-boot

Hi

I try to boot a current 3.11 kernel on a custom iMX25 board using DT. 
u-boot starts the kernel but it stops working just after the first 
eralyprintk lines are out. The u-boot/kernel output:

bootm 0x81000000 - 0x80800000
## Booting kernel from Legacy Image at 81000000 ...
    Image Name:   Linux-3.10.0
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    3834336 Bytes = 3.7 MiB
    Load Address: 80008000
    Entry Point:  80008000
    Verifying Checksum ... OK
## Flattened Device Tree blob at 80800000
    Booting using the fdt blob at 0x80800000
    Loading Kernel Image ... OK
OK
    Loading Device Tree to 8374f000, end 837545d4 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.0 (mweisser at ubuntu) (gcc version 4.7.3 
(Ubuntu/Linaro 4.7.3-1ubuntu1) ) #4 Tue Jul 2 1
7:13:13 CEST 2013
[    0.000000] CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Generic DT based system, model: Graf-Syteco zmx25
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: ECC disabled, Data cache writeback

As this is my first contact with DT I expect a trivial error on my side. 
Anyone with any hint?

Regards
Matthias

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-02 15:26 [U-Boot] imx: Kernel not booting with fdt Matthias Weißer
@ 2013-07-02 20:02 ` Stefano Babic
  2013-07-03  1:16 ` Fabio Estevam
  1 sibling, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2013-07-02 20:02 UTC (permalink / raw)
  To: u-boot

Hi Matthias,

Am 02/07/2013 17:26, schrieb Matthias Wei?er:
> Hi
> 
> I try to boot a current 3.11 kernel on a custom iMX25 board using DT.
> u-boot starts the kernel but it stops working just after the first
> eralyprintk lines are out. The u-boot/kernel output:
> 
> bootm 0x81000000 - 0x80800000

Never tried with a imx25, but it looks correct and there is enough space
between kernel and DT to avoid some corruption.

> ## Booting kernel from Legacy Image at 81000000 ...
>    Image Name:   Linux-3.10.0
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    3834336 Bytes = 3.7 MiB
>    Load Address: 80008000
>    Entry Point:  80008000
>    Verifying Checksum ... OK
> ## Flattened Device Tree blob at 80800000
>    Booting using the fdt blob at 0x80800000
>    Loading Kernel Image ... OK
> OK
>    Loading Device Tree to 8374f000, end 837545d4 ... OK
> 
> Starting kernel ...
> 
> Uncompressing Linux... done, booting the kernel.
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Initializing cgroup subsys cpuset
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Initializing cgroup subsys cpuacct
> [    0.000000] Linux version 3.10.0 (mweisser at ubuntu) (gcc version 4.7.3
> (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #4 Tue Jul 2 1
> 7:13:13 CEST 2013
> [    0.000000] CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ),
> cr=00053177
> [    0.000000] CPU: VIVT data cache, VIVT instruction cache
> [    0.000000] Machine: Generic DT based system, model: Graf-Syteco zmx25
> [    0.000000] bootconsole [earlycon0] enabled
> [    0.000000] Memory policy: ECC disabled, Data cache writeback
> 
> As this is my first contact with DT I expect a trivial error on my side.
> Anyone with any hint?

I cannot say a lot - it seems more an issue inside the dts file as how
you start the kernel. Maybe you can look in the _log_buf if you get some
more info.

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-02 15:26 [U-Boot] imx: Kernel not booting with fdt Matthias Weißer
  2013-07-02 20:02 ` Stefano Babic
@ 2013-07-03  1:16 ` Fabio Estevam
  2013-07-03  6:20   ` Matthias Weißer
  1 sibling, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2013-07-03  1:16 UTC (permalink / raw)
  To: u-boot

On Tue, Jul 2, 2013 at 12:26 PM, Matthias Wei?er <weisserm@arcor.de> wrote:
> Hi
>
> I try to boot a current 3.11 kernel on a custom iMX25 board using DT. u-boot
> starts the kernel but it stops working just after the first eralyprintk
> lines are out. The u-boot/kernel output:
>
> bootm 0x81000000 - 0x80800000
> ## Booting kernel from Legacy Image at 81000000 ...
>    Image Name:   Linux-3.10.0
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    3834336 Bytes = 3.7 MiB
>    Load Address: 80008000
>    Entry Point:  80008000
>    Verifying Checksum ... OK
> ## Flattened Device Tree blob at 80800000
>    Booting using the fdt blob at 0x80800000
>    Loading Kernel Image ... OK
> OK
>    Loading Device Tree to 8374f000, end 837545d4 ... OK
>
> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Initializing cgroup subsys cpuset
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Initializing cgroup subsys cpuacct
> [    0.000000] Linux version 3.10.0 (mweisser at ubuntu) (gcc version 4.7.3
> (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #4 Tue Jul 2 1
> 7:13:13 CEST 2013
> [    0.000000] CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
> [    0.000000] CPU: VIVT data cache, VIVT instruction cache
> [    0.000000] Machine: Generic DT based system, model: Graf-Syteco zmx25

Not sure why you get a "Generic DT based system" here.

Can you post your dts file?

Have you selected CONFIG_MACH_IMX25_DT=y on your kernel config file?

Also, make sure you have "#define CONFIG_OF_LIBFDT" on your U-boot
board config file.

Regards,

Fabio Estevam



> [    0.000000] bootconsole [earlycon0] enabled
> [    0.000000] Memory policy: ECC disabled, Data cache writeback
>
> As this is my first contact with DT I expect a trivial error on my side.
> Anyone with any hint?
>
> Regards
> Matthias
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-03  1:16 ` Fabio Estevam
@ 2013-07-03  6:20   ` Matthias Weißer
  2013-07-03 11:25     ` Fabio Estevam
  0 siblings, 1 reply; 8+ messages in thread
From: Matthias Weißer @ 2013-07-03  6:20 UTC (permalink / raw)
  To: u-boot

Am 03.07.2013 03:16, schrieb Fabio Estevam:
> On Tue, Jul 2, 2013 at 12:26 PM, Matthias Wei?er <weisserm@arcor.de> wrote:
>> Hi
>>
>> I try to boot a current 3.11 kernel on a custom iMX25 board using DT. u-boot
>> starts the kernel but it stops working just after the first eralyprintk
>> lines are out. The u-boot/kernel output:
>>
>> bootm 0x81000000 - 0x80800000
>> ## Booting kernel from Legacy Image at 81000000 ...
>>    Image Name:   Linux-3.10.0
>>    Image Type:   ARM Linux Kernel Image (uncompressed)
>>    Data Size:    3834336 Bytes = 3.7 MiB
>>    Load Address: 80008000
>>    Entry Point:  80008000
>>    Verifying Checksum ... OK
>> ## Flattened Device Tree blob at 80800000
>>    Booting using the fdt blob at 0x80800000
>>    Loading Kernel Image ... OK
>> OK
>>    Loading Device Tree to 8374f000, end 837545d4 ... OK
>>
>> Starting kernel ...
>>
>> Uncompressing Linux... done, booting the kernel.
>> [    0.000000] Booting Linux on physical CPU 0x0
>> [    0.000000] Initializing cgroup subsys cpuset
>> [    0.000000] Initializing cgroup subsys cpu
>> [    0.000000] Initializing cgroup subsys cpuacct
>> [    0.000000] Linux version 3.10.0 (mweisser at ubuntu) (gcc version 4.7.3
>> (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #4 Tue Jul 2 1
>> 7:13:13 CEST 2013
>> [    0.000000] CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
>> [    0.000000] CPU: VIVT data cache, VIVT instruction cache
>> [    0.000000] Machine: Generic DT based system, model: Graf-Syteco zmx25
>
> Not sure why you get a "Generic DT based system" here.

Isn't that supossed to be the right output for a DT kernel?

> Can you post your dts file?

Sure. It is based on imx25-pdk.dts minus nand plus uart2 which is used 
as debug uart on the system in question.

/dts-v1/;
#include "imx25.dtsi"

/ {
	model = "Graf-Syteco zmx25";
	compatible = "fsl,zmx25", "fsl,zmx25";

	memory {
		reg = <0x80000000 0x4000000>;
	};
};

&uart1 {
	status = "okay";
};

&uart2 {
     status = "okay";
};

&fec {
	phy-mode = "rmii";
	status = "okay";
};


> Have you selected CONFIG_MACH_IMX25_DT=y on your kernel config file?

$ cat .config | grep CONFIG_MACH_IMX25_DT
CONFIG_MACH_IMX25_DT=y

Confirmed.

> Also, make sure you have "#define CONFIG_OF_LIBFDT" on your U-boot
> board config file.

$ cat include/configs/zmx25.h | grep CONFIG_OF_LIBFDT
#define CONFIG_OF_LIBFDT

Confirmed.

As the kernel is not crashing but hanging in an endless loop I will try 
if I can get some additional information via the JTAG debugger.

Regards
Matthias

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-03  6:20   ` Matthias Weißer
@ 2013-07-03 11:25     ` Fabio Estevam
  2013-07-03 14:20       ` Matthias Weißer
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2013-07-03 11:25 UTC (permalink / raw)
  To: u-boot

Hi Matthias,

On Wed, Jul 3, 2013 at 3:20 AM, Matthias Wei?er <weisserm@arcor.de> wrote:

> Isn't that supossed to be the right output for a DT kernel?

We usually get something like (for a mx6qsabrelite board - I do not
have my mx25pdk handy):

Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Freescale
i.MX6 Quad SABRE Lite Board

The "Generic DT based system" is not usual.


> Sure. It is based on imx25-pdk.dts minus nand plus uart2 which is used as
> debug uart on the system in question.
>
> /dts-v1/;
> #include "imx25.dtsi"
>
> / {
>         model = "Graf-Syteco zmx25";
>         compatible = "fsl,zmx25", "fsl,zmx25";

Ah, this should be:

compatible = "graf,imx25-zmx25", "fsl,imx25"; (There is no valid match
against fsl,zmx25)

Then your dts file should be called 'imx25-zmx25.dts'

Hope this helps.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-03 11:25     ` Fabio Estevam
@ 2013-07-03 14:20       ` Matthias Weißer
  2013-07-03 14:33         ` Fabio Estevam
  0 siblings, 1 reply; 8+ messages in thread
From: Matthias Weißer @ 2013-07-03 14:20 UTC (permalink / raw)
  To: u-boot

Am 03.07.2013 13:25, schrieb Fabio Estevam:
> The "Generic DT based system" is not usual.
>
>
>> Sure. It is based on imx25-pdk.dts minus nand plus uart2 which is used as
>> debug uart on the system in question.
>>
>> /dts-v1/;
>> #include "imx25.dtsi"
>>
>> / {
>>         model = "Graf-Syteco zmx25";
>>         compatible = "fsl,zmx25", "fsl,zmx25";
>
> Ah, this should be:
>
> compatible = "graf,imx25-zmx25", "fsl,imx25"; (There is no valid match
> against fsl,zmx25)
>
> Then your dts file should be called 'imx25-zmx25.dts'
>
> Hope this helps.

Yes. Thanks a lot. But why is that? Can you give me an explanation for 
that or point me to the correct documentation?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-03 14:20       ` Matthias Weißer
@ 2013-07-03 14:33         ` Fabio Estevam
  2013-07-03 14:56           ` Matthias Weißer
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2013-07-03 14:33 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 3, 2013 at 11:20 AM, Matthias Wei?er <weisserm@arcor.de> wrote:

> Yes. Thanks a lot. But why is that? Can you give me an explanation for that
> or point me to the correct documentation?

Does it boot now?

I think you got "Generic DT based system" because your original entry
"fsl,zmx25" is not valid.

There is no FSL processor called zmx25. If you put "fsl,imx25" then it
will match.

You can refer to:
Documentation/devicetree/bindings/arm/fsl.txt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] imx: Kernel not booting with fdt
  2013-07-03 14:33         ` Fabio Estevam
@ 2013-07-03 14:56           ` Matthias Weißer
  0 siblings, 0 replies; 8+ messages in thread
From: Matthias Weißer @ 2013-07-03 14:56 UTC (permalink / raw)
  To: u-boot

Am 03.07.2013 16:33, schrieb Fabio Estevam:
> On Wed, Jul 3, 2013 at 11:20 AM, Matthias Wei?er <weisserm@arcor.de> wrote:
>
>> Yes. Thanks a lot. But why is that? Can you give me an explanation for that
>> or point me to the correct documentation?
>
> Does it boot now?

Yes, it does. And the output changed to

[    0.000000] Machine: Freescale i.MX25 (Device Tree Support), model: 
Graf-Syteco zmx25
....

> I think you got "Generic DT based system" because your original entry
> "fsl,zmx25" is not valid.

Now I see. I changed imx25 to zmx25 for both the "board" and the 
processor which is clearly wrong. Thanks a lot.

Regards
Matthias

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-03 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 15:26 [U-Boot] imx: Kernel not booting with fdt Matthias Weißer
2013-07-02 20:02 ` Stefano Babic
2013-07-03  1:16 ` Fabio Estevam
2013-07-03  6:20   ` Matthias Weißer
2013-07-03 11:25     ` Fabio Estevam
2013-07-03 14:20       ` Matthias Weißer
2013-07-03 14:33         ` Fabio Estevam
2013-07-03 14:56           ` Matthias Weißer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox