diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-08 14:25:51 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-24 12:54:08 -0700 |
commit | 3a9c252583785c3aabce834e8f9a54fa94685ee8 (patch) | |
tree | cf22b8d2d4cbc0b6ee10b05de600aab0583137e4 /tools/binman/cbfs_util.py | |
parent | f667e45b1c0a7f21d433ee8f3ec18858d87dd2e5 (diff) |
binman: Support reading from CBFS entries
CBFS is a bit like a section but with a custom format. Provide the list of
entries and the compression type to binman so that it can extract the data
from the CBFS, just like any other part of the image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/cbfs_util.py')
-rw-r--r-- | tools/binman/cbfs_util.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/binman/cbfs_util.py b/tools/binman/cbfs_util.py index 4691be4aee2..45e16da0aaa 100644 --- a/tools/binman/cbfs_util.py +++ b/tools/binman/cbfs_util.py @@ -142,6 +142,20 @@ def find_compress(find_name): return compress return None +def compress_name(compress): + """Look up the name of a compression algorithm + + Args: + compress: Compression algorithm number to find (COMPRESS_...) + + Returns: + Compression algorithm name (string) + + Raises: + KeyError if the algorithm number is invalid + """ + return COMPRESS_NAMES[compress] + def align_int(val, align): """Align a value up to the given alignment |