[U-Boot] [PATCH 1/2] ARMv8: add optional Linux kernel image header

Tom Rini trini at konsulko.com
Wed Jan 3 17:56:43 UTC 2018


On Wed, Jan 03, 2018 at 10:42:56AM -0700, Stephen Warren wrote:
> On 01/03/2018 06:45 AM, Tom Rini wrote:
> >On Tue, Jan 02, 2018 at 04:54:21PM -0700, Stephen Warren wrote:
> >
> >>From: Stephen Warren <swarren at nvidia.com>
> >>
> >>Allow placing a Linux kernel image header at the start of the U-Boot
> >>binary. This is useful since the image header reports the amount of memory
> >>(BSS and similar) that U-Boot needs to use, but that isn't part of the
> >>binary size. This can be used by the code that loads U-Boot into memory to
> >>determine where to load U-Boot, based on other users of memory.
> >>
> >>Signed-off-by: Stephen Warren <swarren at nvidia.com>
> >>---
> >>This series relies (at the very least for diff context) on the previous
> >>series I sent Dec 19: ARM: tegra: don't use CONFIG_SPL_TEXT_BASE when no
> >>SPL ... ARM: tegra: use CONFIG_SYS_INIT_SP_BSS_OFFSET.
> >
> >Neat.  Are the Linux folks encouraging other projects to re-use this
> >header?
> 
> Not that I'm aware of, but mainly because I haven't talked to upstream
> kernel people about this at all. I implemented this because in recent
> versions of Linux4Tegra, for all 64-bit SoCs, our main CPU EL2/EL1 boot path
> is either:
> 
> cboot -> Linux kernel
> cboot -> U-Boot -> Linux kernel
> 
> cboot is an NVIDIA binary bootloader. cboot wants to know about BSS/...
> usage of the binary it loads, which can be determined from the Linux kernel
> image header, but we don't want cboot to take different paths when booting
> Linux or U-Boot (or indeed anything at all), so the simplest thing was to
> make U-Boot look as identical to a Linux kernel as possible.
> 
> >Is there somewhere we can point to as reference for the format
> >for the Kconfig help as well, not just the text?  Thanks!
> 
> The Linux kernel file Documentation/arm64/booting.txt does describe the
> format. Should I respin and add that filename to the Kconfig text?

Yes, and I feel like it can't hurt to let the arm64 maintainers know too
as frankly it's a good idea and more projects should make use of it, so
maybe it should be a bit more formally documented (in one of those fancy
new rst files?) or something.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180103/68583c20/attachment.sig>


More information about the U-Boot mailing list