linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trying to boot Panda with DT
@ 2011-12-13 13:03 Tomi Valkeinen
  2011-12-13 13:19 ` Rajendra Nayak
  2011-12-13 13:20 ` Cousson, Benoit
  0 siblings, 2 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2011-12-13 13:03 UTC (permalink / raw)
  To: Cousson, Benoit, Rajendra Nayak; +Cc: linux-omap mailing list

[-- Attachment #1: Type: text/plain, Size: 2017 bytes --]

Hi,

I'm trying to boot Pandaboard ES with DT, but failing. I've debugged the
problem enough to see that the bootloader properly loads the DT blob,
and passes it to the kernel, but the kernel sees only garbage at that
address, and the devtree->magic check fails in setup_machine_fdt(). I
presume something overwrites it.

I'm using Pandaboard ES (so omap 4460), Benoit's
"for_3.3/1_omap_dt_i2c_twl_test" branch, u-boot from Linaro
(git://git.linaro.org/boot/u-boot-linaro-stable.git master). My u-boot
boot-script is below.

Should the setup work? What setup do you have? Any ideas what could be
wrong?

 Tomi

u-boot boot script:
-------------------

set netmask 255.255.255.0
set ipaddr 192.168.1.15
set serverip 192.168.1.1

set kaddr 0x82000000
set dtbaddr 0x85000000

set bootcmd 'tftpboot ${kaddr} uImage; tftpboot ${dtbaddr} omap4-panda.dtb; fdt addr ${dtbaddr}; fdt resize; bootm ${kaddr} - ${dtbaddr}'

set bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=192.168.1.1:/tftpboot/rootfs,tcp,nolock,rsize=1024,wsize=1024 ip=192.168.1.15:::::eth0: vram=36M rootdelay=1 no_console_suspend debug earlyprintk console loglevel=8'

usb start

boot


boot log (with added debug prints)
----------------------------------

## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.2.0-rc1-00014-g4d66c8f-d
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3664960 Bytes = 3.5 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 85000000
   Booting using the fdt blob at 0x85000000
   Loading Kernel Image ... OK
OK
   reserving fdt memory region: addr=9d000000 size=3000000
   reserving fdt memory region: addr=85000000 size=1000
   Loading Device Tree to bfef3000, end bfef6fff ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
DT phys bfef3000, virt ffef3000
illegal DT magic
Warning: Neither atags nor dtb found


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Trying to boot Panda with DT
  2011-12-13 13:03 Trying to boot Panda with DT Tomi Valkeinen
@ 2011-12-13 13:19 ` Rajendra Nayak
  2011-12-13 13:24   ` Tomi Valkeinen
  2011-12-13 13:20 ` Cousson, Benoit
  1 sibling, 1 reply; 6+ messages in thread
From: Rajendra Nayak @ 2011-12-13 13:19 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Cousson, Benoit, linux-omap mailing list

On Tuesday 13 December 2011 06:33 PM, Tomi Valkeinen wrote:
> Hi,
>
> I'm trying to boot Pandaboard ES with DT, but failing. I've debugged the
> problem enough to see that the bootloader properly loads the DT blob,
> and passes it to the kernel, but the kernel sees only garbage at that
> address, and the devtree->magic check fails in setup_machine_fdt(). I
> presume something overwrites it.
>
> I'm using Pandaboard ES (so omap 4460), Benoit's
> "for_3.3/1_omap_dt_i2c_twl_test" branch, u-boot from Linaro
> (git://git.linaro.org/boot/u-boot-linaro-stable.git master). My u-boot

I used the u-boot from here and it worked fine for me, not sure if its
any different.
git://git.secretlab.ca/git/u-boot devicetree/linaro-stable

> boot-script is below.
>
> Should the setup work? What setup do you have? Any ideas what could be
> wrong?
>
>   Tomi
>
> u-boot boot script:
> -------------------
>
> set netmask 255.255.255.0
> set ipaddr 192.168.1.15
> set serverip 192.168.1.1
>
> set kaddr 0x82000000
> set dtbaddr 0x85000000
>
> set bootcmd 'tftpboot ${kaddr} uImage; tftpboot ${dtbaddr} omap4-panda.dtb; fdt addr ${dtbaddr}; fdt resize; bootm ${kaddr} - ${dtbaddr}'
>
> set bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=192.168.1.1:/tftpboot/rootfs,tcp,nolock,rsize=1024,wsize=1024 ip=192.168.1.15:::::eth0: vram=36M rootdelay=1 no_console_suspend debug earlyprintk console loglevel=8'
>
> usb start
>
> boot
>
>
> boot log (with added debug prints)
> ----------------------------------
>
> ## Booting kernel from Legacy Image at 82000000 ...
>     Image Name:   Linux-3.2.0-rc1-00014-g4d66c8f-d
>     Image Type:   ARM Linux Kernel Image (uncompressed)
>     Data Size:    3664960 Bytes = 3.5 MiB
>     Load Address: 80008000
>     Entry Point:  80008000
>     Verifying Checksum ... OK
> ## Flattened Device Tree blob at 85000000
>     Booting using the fdt blob at 0x85000000
>     Loading Kernel Image ... OK
> OK
>     reserving fdt memory region: addr=9d000000 size=3000000
>     reserving fdt memory region: addr=85000000 size=1000
>     Loading Device Tree to bfef3000, end bfef6fff ... OK
>
> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> DT phys bfef3000, virt ffef3000
> illegal DT magic
> Warning: Neither atags nor dtb found
>


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

* Re: Trying to boot Panda with DT
  2011-12-13 13:03 Trying to boot Panda with DT Tomi Valkeinen
  2011-12-13 13:19 ` Rajendra Nayak
@ 2011-12-13 13:20 ` Cousson, Benoit
  2011-12-13 13:25   ` Rajendra Nayak
  1 sibling, 1 reply; 6+ messages in thread
From: Cousson, Benoit @ 2011-12-13 13:20 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Rajendra Nayak, linux-omap mailing list

Hi Tomi,

On 12/13/2011 2:03 PM, Tomi Valkeinen wrote:
> Hi,
>
> I'm trying to boot Pandaboard ES with DT, but failing. I've debugged the
> problem enough to see that the bootloader properly loads the DT blob,
> and passes it to the kernel, but the kernel sees only garbage at that
> address, and the devtree->magic check fails in setup_machine_fdt(). I
> presume something overwrites it.
>
> I'm using Pandaboard ES (so omap 4460), Benoit's
> "for_3.3/1_omap_dt_i2c_twl_test" branch, u-boot from Linaro
> (git://git.linaro.org/boot/u-boot-linaro-stable.git master). My u-boot
> boot-script is below.

I've just sent a patch to add the default DT config for OMAP. It will 
add these config into the OMAP2plus Kconfig.

+	select USE_OF
+	select ARM_APPENDED_DTB
+	select ARM_ATAG_DTB_COMPAT
+	select PROC_DEVICETREE

In theory ARM_APPENDED_DTB and ARM_ATAG_DTB_COMPAT should not be needed 
in your case but only for legacy u-boot.
It should not messed up the DT in case of DT aware uboot, but it worst 
checking if this is the case.

> Should the setup work? What setup do you have? Any ideas what could be
> wrong?

I'm still using a legacy u-boot with the appended option and it works 
fine with the previous config.

Rajendra should use the setting you are trying to use.

Regards,
Benoit

>
>   Tomi
>
> u-boot boot script:
> -------------------
>
> set netmask 255.255.255.0
> set ipaddr 192.168.1.15
> set serverip 192.168.1.1
>
> set kaddr 0x82000000
> set dtbaddr 0x85000000
>
> set bootcmd 'tftpboot ${kaddr} uImage; tftpboot ${dtbaddr} omap4-panda.dtb; fdt addr ${dtbaddr}; fdt resize; bootm ${kaddr} - ${dtbaddr}'
>
> set bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=192.168.1.1:/tftpboot/rootfs,tcp,nolock,rsize=1024,wsize=1024 ip=192.168.1.15:::::eth0: vram=36M rootdelay=1 no_console_suspend debug earlyprintk console loglevel=8'
>
> usb start
>
> boot
>
>
> boot log (with added debug prints)
> ----------------------------------
>
> ## Booting kernel from Legacy Image at 82000000 ...
>     Image Name:   Linux-3.2.0-rc1-00014-g4d66c8f-d
>     Image Type:   ARM Linux Kernel Image (uncompressed)
>     Data Size:    3664960 Bytes = 3.5 MiB
>     Load Address: 80008000
>     Entry Point:  80008000
>     Verifying Checksum ... OK
> ## Flattened Device Tree blob at 85000000
>     Booting using the fdt blob at 0x85000000
>     Loading Kernel Image ... OK
> OK
>     reserving fdt memory region: addr=9d000000 size=3000000
>     reserving fdt memory region: addr=85000000 size=1000
>     Loading Device Tree to bfef3000, end bfef6fff ... OK
>
> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> DT phys bfef3000, virt ffef3000
> illegal DT magic
> Warning: Neither atags nor dtb found
>


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

* Re: Trying to boot Panda with DT
  2011-12-13 13:19 ` Rajendra Nayak
@ 2011-12-13 13:24   ` Tomi Valkeinen
  0 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2011-12-13 13:24 UTC (permalink / raw)
  To: Rajendra Nayak; +Cc: Cousson, Benoit, linux-omap mailing list

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

On Tue, 2011-12-13 at 18:49 +0530, Rajendra Nayak wrote:
> On Tuesday 13 December 2011 06:33 PM, Tomi Valkeinen wrote:
> > Hi,
> >
> > I'm trying to boot Pandaboard ES with DT, but failing. I've debugged the
> > problem enough to see that the bootloader properly loads the DT blob,
> > and passes it to the kernel, but the kernel sees only garbage at that
> > address, and the devtree->magic check fails in setup_machine_fdt(). I
> > presume something overwrites it.
> >
> > I'm using Pandaboard ES (so omap 4460), Benoit's
> > "for_3.3/1_omap_dt_i2c_twl_test" branch, u-boot from Linaro
> > (git://git.linaro.org/boot/u-boot-linaro-stable.git master). My u-boot
> 
> I used the u-boot from here and it worked fine for me, not sure if its
> any different.
> git://git.secretlab.ca/git/u-boot devicetree/linaro-stable

That tree looks quite different than the linaro's one. But appending the
DT blob to the uImage seems to work fine for me, so I'll take that to
use.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Trying to boot Panda with DT
  2011-12-13 13:20 ` Cousson, Benoit
@ 2011-12-13 13:25   ` Rajendra Nayak
  2011-12-13 13:27     ` Cousson, Benoit
  0 siblings, 1 reply; 6+ messages in thread
From: Rajendra Nayak @ 2011-12-13 13:25 UTC (permalink / raw)
  To: Cousson, Benoit; +Cc: Tomi Valkeinen, linux-omap mailing list

On Tuesday 13 December 2011 06:50 PM, Cousson, Benoit wrote:
>
> I've just sent a patch to add the default DT config for OMAP. It will
> add these config into the OMAP2plus Kconfig.
>
> +    select USE_OF
> +    select ARM_APPENDED_DTB
> +    select ARM_ATAG_DTB_COMPAT
> +    select PROC_DEVICETREE
>
> In theory ARM_APPENDED_DTB and ARM_ATAG_DTB_COMPAT should not be needed
> in your case but only for legacy u-boot.
> It should not messed up the DT in case of DT aware uboot, but it worst
> checking if this is the case.

I don't think thats a problem as I have those options enabled and am
able to boot with the DT aware uboot.

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

* Re: Trying to boot Panda with DT
  2011-12-13 13:25   ` Rajendra Nayak
@ 2011-12-13 13:27     ` Cousson, Benoit
  0 siblings, 0 replies; 6+ messages in thread
From: Cousson, Benoit @ 2011-12-13 13:27 UTC (permalink / raw)
  To: Rajendra Nayak; +Cc: Tomi Valkeinen, linux-omap mailing list

On 12/13/2011 2:25 PM, Rajendra Nayak wrote:
> On Tuesday 13 December 2011 06:50 PM, Cousson, Benoit wrote:
>>
>> I've just sent a patch to add the default DT config for OMAP. It will
>> add these config into the OMAP2plus Kconfig.
>>
>> + select USE_OF
>> + select ARM_APPENDED_DTB
>> + select ARM_ATAG_DTB_COMPAT
>> + select PROC_DEVICETREE
>>
>> In theory ARM_APPENDED_DTB and ARM_ATAG_DTB_COMPAT should not be needed
>> in your case but only for legacy u-boot.
>> It should not messed up the DT in case of DT aware uboot, but it worst
>> checking if this is the case.
>
> I don't think thats a problem as I have those options enabled and am
> able to boot with the DT aware uboot.

OK cool, I was not sure but that's much better...
Let's assume that this is due to a broken u-boot then :-)

Thanks,
Benoit



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

end of thread, other threads:[~2011-12-13 13:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13 13:03 Trying to boot Panda with DT Tomi Valkeinen
2011-12-13 13:19 ` Rajendra Nayak
2011-12-13 13:24   ` Tomi Valkeinen
2011-12-13 13:20 ` Cousson, Benoit
2011-12-13 13:25   ` Rajendra Nayak
2011-12-13 13:27     ` Cousson, Benoit

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).