[U-Boot] Problems porting new u-boot

Jerry Van Baren gerald.vanbaren at ge.com
Thu Aug 6 15:29:29 CEST 2009


Hi Alemao,

Alemao wrote:
> Hi all,
> 
> Im having problems porting u-boot-2009.03 to a MPC8541 board.
> 
> In u-boot-1.2.0, if I use TEXT_BASE = 0xfff00000, u-boot.bin is
> created with 1MB size.

The .bin file is a binary image from the first location 0xfff00000 
*contiguously filled* to the last location (the start vector at 
0xfffffffc).  U-Boot isn't that big, most of it is empty space, but your 
creation of a 0xFF-filled .bin file fills in the empty spaces.

> But in u-boot-2009.03 it's created with only 516kB.

Your text base was probably 0xfff80000.

> In cpu/mpc85xx/start.S says:
> 
> "The processor starts at 0xfffffffc and the code is first executed in
> the last 4K page(0xfffff000-0xffffffff) in flash/rom."
> 
> So I think there's nothing in 0xfffffffc, using u-boot.bin from
> u-boot-2009.03, cause it only has 516kB.
> 
> Do I have to set TEXT_BASE with the exact u-boot.bin size?
> 
> Or am I missing something?

* Don't use a .bin file (use the linker elf output directly)?
* Does it matter?

Do you need to set your text base to 0xfff00000?  You are better off 
setting your text base so that your u-boot and reset vector are close 
together.  You did not say what processor you are using, but it sounds 
like a MPC74xx or MPC86xx or MPC85xx?  I played with a MPC8548 and 
reconfigured it so that my u-boot was the last two sectors of flash and 
the env variables were saved in the sector *preceding* the u-boot image. 
  That worked very nicely.

The typical u-boot places the env sector after the u-boot image, which 
works in most cases but doesn't work well where the top page/bytes of 
the memory are the reset vector.  In those cases, it is better to have 
U-Boot and the reset vector/page at the top of memory and the env sector 
below U-Boot, otherwise you end up with the env taking a whole sector 
out of the middle plus waste another whole sector just to hold your 
reset vector/page.

> Cheers,
> 
> --
> Alemao

Best regards,
gvb


More information about the U-Boot mailing list