public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] libfdt problem when loading device tree
Date: Thu, 13 Dec 2007 23:11:02 +0100	[thread overview]
Message-ID: <008901c83dd5$0cdbd100$02ac10ac@Jocke> (raw)
In-Reply-To: <47618125.5040401@ge.com>

 

> -----Original Message-----
> From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com] 
> Sent: den 13 december 2007 20:00
> To: Kumar Gala
> Cc: joakim.tjernlund at transmode.se; U-BOOT
> Subject: Re: [U-Boot-Users] libfdt problem when loading device tree
> 
> Kumar Gala wrote:
> > On Dec 13, 2007, at 10:24 AM, Joakim Tjernlund wrote:
> > 
> >> I get this when I try to boot my board:
> >> ## Booting image at 00200000 ...
> >>   Image Name:   oskernel02a:p1a:99
> >>   Created:      2007-12-13   9:59:43 UTC
> >>   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
> >>   Data Size:    1238992 Bytes =  1.2 MB
> >>   Load Address: 00000000
> >>   Entry Point:  00000000
> >>   Verifying Checksum ... OK
> >>   Uncompressing Kernel Image ... OK
> >>   Loading Device Tree to 007fe000, end 007ff6f9 ... OK
> >> WARNING: could not create /bd_t FDT_ERR_NOSPACE.
> >> fdt_bd_t: FDT_ERR_NOSPACE
> >> ERROR: /bd_t node create failed - must RESET the board to recover.
> >> Resetting the board.
> >>
> >> I have tried different combinations of -S and -R options to dtc,
> >> but nothing helps:
> >> dtc -S 2000 -R 2000 -f of-tmcu.dts -O asm > of-tmcu.S
> >>
> >> If I remove the chosen node from my dts file, I get the error when
> >> libfdt tries to create a chosen node.
> >>
> >> I am using dtc 1.0.0 and u-boot 1.3.1
> > 
> > How big is the .dtb if you don't specify -S?  The -R should 
> only be  
> > something like 8.
> > 
> > - k
> 
> More trivia for Jocke:

Thanks for telling me this

> 
> Note that there now also is a "-s nnnn" option (IIRC and if 
> you have the 
> latest dtc) which *adds* nnnn bytes to the blob rather than 
> making the 
> blob a fixed size nnnn (IIRC, Kumar created it).  Depending on your 
> circumstances and preferences, this could be a better choice than -S.

I was about to suggest this after my mishap but got distracted. It is
a useful option and I will probably use it in the future. Perhaps
you should error out if the space is too small when using -S? That
would have saved me some time.

> 
> Having the /chosen node already in the blob has severe limitations. 
> Improving that is in my "todo" list: "...a suggestion by 
> Scott Wood to 
> make the /chosen handling finer grained: if the /chosen node exists, 
> currently u-boot-fdt bails out. A better methodology is to 
> not overwrite 
> pre-existing properties on a per-property basis, so if /chosen exists 
> but a necessary /chosen/property doesn't, it gets created."
> 
> IOW, if you create a blob with /chosen, you must have *everything* 
> necessary in it because it won't be fixed up at runtime.

I don't need a chosen node in my dts, I just added it to get futher.
Maybe others do.

> 
> Tip: if you do "fdt chosen" and then "fdt print /chosen", it 
> will tell 
> you exactly what your board fixup code put in the /chosen node.

Will have a look tmw, still very behind on device tree stuff.

> 
> FWIIW, I created a patch to implement Scott's suggestion, but 
> it needs 
> to be resurrected, rebased, and tested.

Good luck and thanks again.

 Jocke

  reply	other threads:[~2007-12-13 22:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 16:24 [U-Boot-Users] libfdt problem when loading device tree Joakim Tjernlund
2007-12-13 16:34 ` Kumar Gala
2007-12-13 16:39   ` Joakim Tjernlund
2007-12-13 18:59   ` Jerry Van Baren
2007-12-13 22:11     ` Joakim Tjernlund [this message]
2007-12-13 16:46 ` Jerry Van Baren
2007-12-13 17:00   ` Joakim Tjernlund
2007-12-13 17:07   ` Joakim Tjernlund
2007-12-13 17:16     ` Joakim Tjernlund
2007-12-13 18:03     ` Jerry Van Baren
2007-12-13 18:17       ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='008901c83dd5$0cdbd100$02ac10ac@Jocke' \
    --to=joakim.tjernlund@transmode.se \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox