X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fbinman%2Fetype%2Fu_boot_spl.py;h=a6fddbe8f14b50d788c059951afb338f93b5a3a2;hb=04da42770b0cc3bea8841972bfc9568299ece826;hp=9edd2dad0306601dea7dc15d56300262f502f67d;hpb=813d1fb56dc0af9567feb86cd71c49f14662044b;p=oweals%2Fu-boot.git diff --git a/tools/binman/etype/u_boot_spl.py b/tools/binman/etype/u_boot_spl.py index 9edd2dad03..a6fddbe8f1 100644 --- a/tools/binman/etype/u_boot_spl.py +++ b/tools/binman/etype/u_boot_spl.py @@ -5,12 +5,32 @@ # Entry-type module for spl/u-boot-spl.bin # -import elf - -from entry import Entry -from blob import Entry_blob +from binman import elf +from binman.entry import Entry +from binman.etype.blob import Entry_blob class Entry_u_boot_spl(Entry_blob): + """U-Boot SPL binary + + Properties / Entry arguments: + - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin') + + This is the U-Boot SPL (Secondary Program Loader) binary. This is a small + binary which loads before U-Boot proper, typically into on-chip SRAM. It is + responsible for locating, loading and jumping to U-Boot. 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 'spl/u-boot-spl' must also be available for this to work, since + binman uses that to look up symbols to write into the SPL binary. + """ def __init__(self, section, etype, node): Entry_blob.__init__(self, section, etype, node) self.elf_fname = 'spl/u-boot-spl' @@ -19,4 +39,4 @@ class Entry_u_boot_spl(Entry_blob): return 'spl/u-boot-spl.bin' def WriteSymbols(self, section): - elf.LookupAndWriteSymbols(self.elf_fname, self, section) + elf.LookupAndWriteSymbols(self.elf_fname, self, section.GetImage())