[U-Boot-Users] libfdt problem when loading device tree

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Dec 13 18:00:40 CET 2007


On Thu, 2007-12-13 at 11:46 -0500, Jerry Van Baren wrote:
> 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
> 
> -S 2000 may be too small, I found I needed -S 3000.  If you run dtc 
> without the -S option and add in a verbose/info option(?), dtc will tell 
> you how big your blob is without any padding.  Obviously, you need to 
> pad it.
> 
> -R 2000 is big time overkill, I've found -R 8 is plenty.  These are the 
> memory reserve slots.

Noted, set to 8 now. This was just a something I tried as noting would
work

> 
> > If I remove the chosen node from my dts file, I get the error when
> > libfdt tries to create a chosen node.
> 
> I don't believe having a /chosen node in the source is recommended.  The 
> idea is that u-boot's board configuration customization should create 
> the /chosen node with the proper values either from a-priori knowledge 
> or from probing.

I didn't have one, but added one to workaround this problem.

> 
> > I am using dtc 1.0.0 and u-boot 1.3.1
> > 
> >  Jocke
> 
> Sounds like a bug with the move operation from flash to RAM.  What 
> happens if you copy the blob from flash to RAM from the u-boot command line?
> 
> (from memory so I may be wrong)
> 
>  > fdt move <source> <ramblobaddr>
>  > bootm <ramdisk> <ramblobaddr>

The same thing happens.

A few observations:
fdt list only prints a few nodes:
=> fdt addr 0xf8026038
=> fdt list
/ {
        model="TMCUTU";
        compatible="MPC83xx";
        #address-cells=<0x00000001>;
        #size-cells=<0x00000001>;
        chosen {
        };
        board {
        };
        flash at f8000000 {
        };
        cpus {
        };
        memory {
        };
        soc8321 at e0000000 {
        };
        qe at e0100000 {
        };
};

If I produce a dtb file and compare:
 size of-tmcu.o
   text    data     bss     dec     hex filename
   5696       0       0    5696    1640 of-tmcu.o
ls -l of-tmcu.dtb
-rw-r--r-- 1 jocke users 5690 2007-12-13 17:47 of-tmcu.dtb

The assembler version is 6 bytes bigger

 Jocke
> 
> gvb
> 
> 




More information about the U-Boot mailing list