linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16
@ 2015-06-06 11:20 christophe leroy
  2015-06-06 15:32 ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: christophe leroy @ 2015-06-06 11:20 UTC (permalink / raw)
  To: linuxppc-dev, Rob Herring; +Cc: linux-kernel, Scott Wood

I've got a MPC8323 RDB evaluation platform from freescale
kernel 4.0 doesn't boot
kernel 3.16 doesn't boot
kernel 3.15 boots ok

I disected the issue down to your commit "of/fdt: Convert FDT functions 
to use libfdt" (e6a6928c3ea1d0195ed75a091e345696b916c09b)

Do you have an idea of what the issue could be ?

Christophe

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


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

* Re: [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16
  2015-06-06 11:20 [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16 christophe leroy
@ 2015-06-06 15:32 ` Rob Herring
  2015-06-06 17:56   ` christophe leroy
  2015-06-10 15:12   ` leroy christophe
  0 siblings, 2 replies; 6+ messages in thread
From: Rob Herring @ 2015-06-06 15:32 UTC (permalink / raw)
  To: christophe leroy; +Cc: linuxppc-dev, linux-kernel, Scott Wood

On Sat, Jun 6, 2015 at 6:20 AM, christophe leroy
<christophe.leroy@c-s.fr> wrote:
> I've got a MPC8323 RDB evaluation platform from freescale
> kernel 4.0 doesn't boot
> kernel 3.16 doesn't boot
> kernel 3.15 boots ok
>
> I disected the issue down to your commit "of/fdt: Convert FDT functions to
> use libfdt" (e6a6928c3ea1d0195ed75a091e345696b916c09b)
>
> Do you have an idea of what the issue could be ?

Is your dtb older version of the dtb format (before 0x10)? libfdt
doesn't work on the older versions.

If not, do you have logs with debug enabled in drivers/of/fdt.c?

Rob

>
> Christophe
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> https://www.avast.com/antivirus
>

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

* Re: [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16
  2015-06-06 15:32 ` Rob Herring
@ 2015-06-06 17:56   ` christophe leroy
  2015-06-10 15:12   ` leroy christophe
  1 sibling, 0 replies; 6+ messages in thread
From: christophe leroy @ 2015-06-06 17:56 UTC (permalink / raw)
  To: Rob Herring; +Cc: linuxppc-dev, linux-kernel, Scott Wood



Le 06/06/2015 17:32, Rob Herring a écrit :
> On Sat, Jun 6, 2015 at 6:20 AM, christophe leroy
> <christophe.leroy@c-s.fr> wrote:
>> I've got a MPC8323 RDB evaluation platform from freescale
>> kernel 4.0 doesn't boot
>> kernel 3.16 doesn't boot
>> kernel 3.15 boots ok
>>
>> I disected the issue down to your commit "of/fdt: Convert FDT functions to
>> use libfdt" (e6a6928c3ea1d0195ed75a091e345696b916c09b)
>>
>> Do you have an idea of what the issue could be ?
> Is your dtb older version of the dtb format (before 0x10)? libfdt
> doesn't work on the older versions.
The dtb is built together with the kernel with following DTS in the 
mainline:
arch/powerpc/boot/dts/mpc832x_rdb.dts
>
> If not, do you have logs with debug enabled in drivers/of/fdt.c?
It stops before any log appears on the console. I will see on monday if 
I can activate early debug console

Christophe
>
> Rob
>
>> Christophe
>>
>> ---
>> L'absence de virus dans ce courrier électronique a été vérifiée par le
>> logiciel antivirus Avast.
>> https://www.avast.com/antivirus
>>


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus


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

* Re: [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16
  2015-06-06 15:32 ` Rob Herring
  2015-06-06 17:56   ` christophe leroy
@ 2015-06-10 15:12   ` leroy christophe
  2015-06-10 18:17     ` Rob Herring
  1 sibling, 1 reply; 6+ messages in thread
From: leroy christophe @ 2015-06-10 15:12 UTC (permalink / raw)
  To: Rob Herring; +Cc: linuxppc-dev, linux-kernel, Scott Wood

Le 06/06/2015 17:32, Rob Herring a écrit :
> On Sat, Jun 6, 2015 at 6:20 AM, christophe leroy
> <christophe.leroy@c-s.fr> wrote:
>> I've got a MPC8323 RDB evaluation platform from freescale
>> kernel 4.0 doesn't boot
>> kernel 3.16 doesn't boot
>> kernel 3.15 boots ok
>>
>> I disected the issue down to your commit "of/fdt: Convert FDT functions to
>> use libfdt" (e6a6928c3ea1d0195ed75a091e345696b916c09b)
>>
>> Do you have an idea of what the issue could be ?
> Is your dtb older version of the dtb format (before 0x10)? libfdt
> doesn't work on the older versions.
Yes, dtb has version 0x11, which seems to be the issue (see below)
>
> If not, do you have logs with debug enabled in drivers/of/fdt.c?
I get "unflatten: error -11 processing FDT"

Indeed, Uboot (version 1.1.6 - installed on that evaluation board) adds 
a node called "chosen" at the end of the BLOB.
But Uboot doesn't update the FDT len in the BLOB header, therefore the 
following test fails in fdt_offset_ptr()

     if (fdt_version(fdt) >= 0x11)
         if (((offset + len) < offset)
             || ((offset + len) > fdt_size_dt_struct(fdt)))
             return NULL;


If I comment this test out, Linux 3.16 to 4.0 work properly on my 
evaluation board.

Can we find a proper workaround for this issue ?

Christophe



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

* Re: [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16
  2015-06-10 15:12   ` leroy christophe
@ 2015-06-10 18:17     ` Rob Herring
  2015-06-12  7:14       ` leroy christophe
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2015-06-10 18:17 UTC (permalink / raw)
  To: leroy christophe; +Cc: linuxppc-dev, linux-kernel, Scott Wood

On Wed, Jun 10, 2015 at 10:12 AM, leroy christophe
<christophe.leroy@c-s.fr> wrote:
> Le 06/06/2015 17:32, Rob Herring a écrit :
>>
>> On Sat, Jun 6, 2015 at 6:20 AM, christophe leroy
>> <christophe.leroy@c-s.fr> wrote:
>>>
>>> I've got a MPC8323 RDB evaluation platform from freescale
>>> kernel 4.0 doesn't boot
>>> kernel 3.16 doesn't boot
>>> kernel 3.15 boots ok
>>>
>>> I disected the issue down to your commit "of/fdt: Convert FDT functions
>>> to
>>> use libfdt" (e6a6928c3ea1d0195ed75a091e345696b916c09b)
>>>
>>> Do you have an idea of what the issue could be ?
>>
>> Is your dtb older version of the dtb format (before 0x10)? libfdt
>> doesn't work on the older versions.
>
> Yes, dtb has version 0x11, which seems to be the issue (see below)

In that your bootloader doesn't understand 0x11.

>> If not, do you have logs with debug enabled in drivers/of/fdt.c?
>
> I get "unflatten: error -11 processing FDT"

Can I get the full debug prints.

> Indeed, Uboot (version 1.1.6 - installed on that evaluation board) adds a
> node called "chosen" at the end of the BLOB.
> But Uboot doesn't update the FDT len in the BLOB header, therefore the
> following test fails in fdt_offset_ptr()
>
>     if (fdt_version(fdt) >= 0x11)
>         if (((offset + len) < offset)
>             || ((offset + len) > fdt_size_dt_struct(fdt)))
>             return NULL;
>
>
> If I comment this test out, Linux 3.16 to 4.0 work properly on my evaluation
> board.
>
> Can we find a proper workaround for this issue ?

The options are:

- update the ancient bootloader
- make dtc build 0x10 version dtb for this platform (-V option will do this)
- make the kernel fix the field (I'm not sure how we get the correct
length. dt_string offset minus dt_struct offset?)
- make the kernel force the version to 0x10 (I don't think there are
any other changes from 0x10 to 0x11.)

I'd probably lean toward the 2nd option. This is what the bootloader
is compatible with and won't break if we rev the format again. I
believe there is already some plumbing to pass per platform options to
dtc. The question is what other platforms have this problem.

Rob

> Christophe
>
>

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

* Re: [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16
  2015-06-10 18:17     ` Rob Herring
@ 2015-06-12  7:14       ` leroy christophe
  0 siblings, 0 replies; 6+ messages in thread
From: leroy christophe @ 2015-06-12  7:14 UTC (permalink / raw)
  To: Rob Herring; +Cc: linuxppc-dev, linux-kernel, Scott Wood



Le 10/06/2015 20:17, Rob Herring a écrit :
> On Wed, Jun 10, 2015 at 10:12 AM, leroy christophe
> <christophe.leroy@c-s.fr> wrote:
>> Le 06/06/2015 17:32, Rob Herring a écrit :
>>> On Sat, Jun 6, 2015 at 6:20 AM, christophe leroy
>>> <christophe.leroy@c-s.fr> wrote:
>>>> I've got a MPC8323 RDB evaluation platform from freescale
>>>> kernel 4.0 doesn't boot
>>>> kernel 3.16 doesn't boot
>>>> kernel 3.15 boots ok
>>>>
>>>> I disected the issue down to your commit "of/fdt: Convert FDT functions
>>>> to
>>>> use libfdt" (e6a6928c3ea1d0195ed75a091e345696b916c09b)
>>>>
>>>> Do you have an idea of what the issue could be ?
>>> Is your dtb older version of the dtb format (before 0x10)? libfdt
>>> doesn't work on the older versions.
>> Yes, dtb has version 0x11, which seems to be the issue (see below)
> In that your bootloader doesn't understand 0x11.
>
>>> If not, do you have logs with debug enabled in drivers/of/fdt.c?
>> I get "unflatten: error -11 processing FDT"
> Can I get the full debug prints.
Here it is:

  -> unflatten_device_tree()
Unflattening device tree:
magic: d00dfeed
size: 000020b5
version: 00000011
unflatten: error -11 processing FDT
unflatten: error -11 processing FDT
   size is 44dc, allocating...
   unflattening c3ff0b20...
fixed up name for  ->
fixed up name for aliases -> aliases
fixed up name for cpus -> cpus
fixed up name for PowerPC,8323@0 -> PowerPC,8323
fixed up name for memory -> memory
fixed up name for soc8323@e0000000 -> soc8323
fixed up name for wdt@200 -> wdt
fixed up name for power@b00 -> power
fixed up name for i2c@3000 -> i2c
fixed up name for serial@4500 -> serial
fixed up name for serial@4600 -> serial
fixed up name for dma@82a8 -> dma
fixed up name for dma-channel@0 -> dma-channel
fixed up name for dma-channel@80 -> dma-channel
fixed up name for dma-channel@100 -> dma-channel
fixed up name for dma-channel@180 -> dma-channel
fixed up name for crypto@30000 -> crypto
fixed up name for pic@700 -> pic
fixed up name for par_io@1400 -> par_io
fixed up name for gpio-controller@1448 -> gpio-controller
fixed up name for ucc_pin@02 -> ucc_pin
fixed up name for ucc_pin@03 -> ucc_pin
fixed up name for qe@e0100000 -> qe
fixed up name for muram@10000 -> muram
fixed up name for data-only@0 -> data-only
fixed up name for spi@4c0 -> spi
fixed up name for mmc-slot@0 -> mmc-slot
fixed up name for spi@500 -> spi
fixed up name for ucc@3000 -> ucc
fixed up name for ucc@2200 -> ucc
fixed up name for mdio@3120 -> mdio
fixed up name for ethernet-phy@00 -> ethernet-phy
fixed up name for ethernet-phy@04 -> ethernet-phy
fixed up name for interrupt-controller@80 -> interrupt-controller
fixed up name for pci@e0008500 -> pci
unflatten: error -11 processing FDT
unflatten: error -11 processing FDT
  <- unflatten_device_tree()

Christophe


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

end of thread, other threads:[~2015-06-12  7:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-06 11:20 [BUG] mpc8323_rdb platform doesn't boot since kernel 3.16 christophe leroy
2015-06-06 15:32 ` Rob Herring
2015-06-06 17:56   ` christophe leroy
2015-06-10 15:12   ` leroy christophe
2015-06-10 18:17     ` Rob Herring
2015-06-12  7:14       ` leroy christophe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).