[U-Boot] fastboot boot base address behaviour

Marek Vasut marex at denx.de
Wed Apr 22 17:56:23 CEST 2015


On Wednesday, April 22, 2015 at 03:04:47 PM, Maxime Ripard wrote:
> Hi,

Hi!

> I've been trying to use fastboot (and especially the boot command) on
> sunxi recently, and got it to work pretty fine (apart from PSCI, but
> that's another story).
> 
> The only thing that worries me a bit is that by default, both the
> fastboot tool and mkbootimg will generate an image with the kernel
> address set to 0x10008000.

Looks like MX6 DRAM base address, so this should definitelly not be
fixed to this address here. The +0x8000 offset is the kernel load
offset.

> While it might work on some targets, it obviously doesn't on the
> Allwinner SoCs that most of the time have the RAM mapped to 0x4000000,
> which result in the kernel being relocated to some address that is not
> in RAM, failing badly.

Yep.

> I would expect U-Boot to relocate the kernel to some reasonable
> address, and not try to do something dumb by actually trusting
> completely the boot image.

I'd expect the image to be correct in the first place though ;-)

> I guess one way to solve this would be to really treat 0x10008000 as
> the default, and relocate the kernel to whatever value make sense on
> the current platform (even though that needs to be defined).
> 
> That way, "fastboot boot zImage" would actually work out of the box,
> without requiring to set the optional "-b" option to set the kernel
> base address to some decent value.

Then I'd say such "default" address should be something like 0xffffffff .

> The others implementation I could find seem to just ignore this field
> in the image header, and always load it to the same address, which
> might not really be what we're after here.
> 
> What do you think?
> 
> Maxime

Best regards,
Marek Vasut


More information about the U-Boot mailing list