Add support for U-Boot's TPL and TPL device tree. Also fix a few comments in the other device-tree entries. Signed-off-by: Simon Glass <sjg@chromium.org>lime2-spi
parent
24d0d3c30d
commit
b8ef5b6bc8
@ -0,0 +1,43 @@ |
||||
# SPDX-License-Identifier: GPL-2.0+ |
||||
# Copyright (c) 2016 Google, Inc |
||||
# Written by Simon Glass <sjg@chromium.org> |
||||
# |
||||
# Entry-type module for tpl/u-boot-tpl.bin |
||||
# |
||||
|
||||
import elf |
||||
|
||||
from entry import Entry |
||||
from blob import Entry_blob |
||||
|
||||
class Entry_u_boot_tpl(Entry_blob): |
||||
"""U-Boot TPL binary |
||||
|
||||
Properties / Entry arguments: |
||||
- filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin') |
||||
|
||||
This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small |
||||
binary which loads before SPL, typically into on-chip SRAM. It is |
||||
responsible for locating, loading and jumping to SPL, the next-stage |
||||
loader. Note that SPL is not relocatable so must be loaded to the correct |
||||
address in SRAM, or written to run from the correct address if direct |
||||
flash execution is possible (e.g. on x86 devices). |
||||
|
||||
SPL can access binman symbols at runtime. See: |
||||
|
||||
'Access to binman entry offsets at run time (symbols)' |
||||
|
||||
in the binman README for more information. |
||||
|
||||
The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since |
||||
binman uses that to look up symbols to write into the TPL binary. |
||||
""" |
||||
def __init__(self, section, etype, node): |
||||
Entry_blob.__init__(self, section, etype, node) |
||||
self.elf_fname = 'tpl/u-boot-tpl' |
||||
|
||||
def GetDefaultFilename(self): |
||||
return 'tpl/u-boot-tpl.bin' |
||||
|
||||
def WriteSymbols(self, section): |
||||
elf.LookupAndWriteSymbols(self.elf_fname, self, section) |
@ -0,0 +1,25 @@ |
||||
# SPDX-License-Identifier: GPL-2.0+ |
||||
# Copyright (c) 2018 Google, Inc |
||||
# Written by Simon Glass <sjg@chromium.org> |
||||
# |
||||
# Entry-type module for U-Boot device tree in TPL (Tertiary Program Loader) |
||||
# |
||||
|
||||
from entry import Entry |
||||
from blob import Entry_blob |
||||
|
||||
class Entry_u_boot_tpl_dtb(Entry_blob): |
||||
"""U-Boot TPL device tree |
||||
|
||||
Properties / Entry arguments: |
||||
- filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb') |
||||
|
||||
This is the TPL device tree, containing configuration information for |
||||
TPL. TPL needs this to know what devices are present and which drivers |
||||
to activate. |
||||
""" |
||||
def __init__(self, section, etype, node): |
||||
Entry_blob.__init__(self, section, etype, node) |
||||
|
||||
def GetDefaultFilename(self): |
||||
return 'tpl/u-boot-tpl.dtb' |
@ -0,0 +1,11 @@ |
||||
// SPDX-License-Identifier: GPL-2.0+ |
||||
/dts-v1/; |
||||
|
||||
/ { |
||||
binman { |
||||
u-boot-tpl { |
||||
}; |
||||
u-boot-tpl-dtb { |
||||
}; |
||||
}; |
||||
}; |
Loading…
Reference in new issue