summaryrefslogtreecommitdiff
path: root/tools/binman/etype/blob_ext.py
blob: 9eb762b0a23e5d6f69aeead7d96858cab24ed2dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for external blobs, not built by U-Boot
#

import os

from binman.etype.blob import Entry_blob
from dtoc import fdt_util
from u_boot_pylib import tools
from u_boot_pylib import tout

class Entry_blob_ext(Entry_blob):
    """Externally built binary blob

    Note: This should not be used by itself. It is normally used as a parent
    class by other entry types.

    If the file providing this blob is missing, binman can optionally ignore it
    and produce a broken image with a warning.

    See 'blob' for Properties / Entry arguments.
    """
    def __init__(self, section, etype, node):
        Entry_blob.__init__(self, section, etype, node)
        self.external = True

    def SetAllowFakeBlob(self, allow_fake):
        """Set whether the entry allows to create a fake blob

        Args:
            allow_fake_blob: True if allowed, False if not allowed
        """
        self.allow_fake = allow_fake