xref: /openbmc/u-boot/tools/binman/etype/u_boot.py (revision fc82e768)
183d290c5STom Rini# SPDX-License-Identifier: GPL-2.0+
24f44304bSSimon Glass# Copyright (c) 2016 Google, Inc
34f44304bSSimon Glass# Written by Simon Glass <sjg@chromium.org>
44f44304bSSimon Glass#
54f44304bSSimon Glass# Entry-type module for U-Boot binary
64f44304bSSimon Glass#
74f44304bSSimon Glass
84f44304bSSimon Glassfrom entry import Entry
94f44304bSSimon Glassfrom blob import Entry_blob
104f44304bSSimon Glass
114f44304bSSimon Glassclass Entry_u_boot(Entry_blob):
12*3fb397bbSSimon Glass    """U-Boot flat binary
13*3fb397bbSSimon Glass
14*3fb397bbSSimon Glass    Properties / Entry arguments:
15*3fb397bbSSimon Glass        - filename: Filename of u-boot.bin (default 'u-boot.bin')
16*3fb397bbSSimon Glass
17*3fb397bbSSimon Glass    This is the U-Boot binary, containing relocation information to allow it
18*3fb397bbSSimon Glass    to relocate itself at runtime. The binary typically includes a device tree
19*3fb397bbSSimon Glass    blob at the end of it. Use u_boot_nodtb if you want to package the device
20*3fb397bbSSimon Glass    tree separately.
21*3fb397bbSSimon Glass
22*3fb397bbSSimon Glass    U-Boot can access binman symbols at runtime. See:
23*3fb397bbSSimon Glass
24*3fb397bbSSimon Glass        'Access to binman entry offsets at run time (fdt)'
25*3fb397bbSSimon Glass
26*3fb397bbSSimon Glass    in the binman README for more information.
27*3fb397bbSSimon Glass    """
2825ac0e61SSimon Glass    def __init__(self, section, etype, node):
2925ac0e61SSimon Glass        Entry_blob.__init__(self, section, etype, node)
304f44304bSSimon Glass
314f44304bSSimon Glass    def GetDefaultFilename(self):
324f44304bSSimon Glass        return 'u-boot.bin'
33