binman: Use the cbfs memlen field only for uncompressed length
authorSimon Glass <sjg@chromium.org>
Mon, 8 Jul 2019 20:25:40 +0000 (14:25 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 24 Jul 2019 19:54:08 +0000 (12:54 -0700)
commit52107ee4df878d26923a498b62beedbbaa5c1f7e
tree701867f4effb3bd929c7d11952042d67a23343ef
parent1223db038a5282b400eab3e4bd2a44fa8658ff4e
binman: Use the cbfs memlen field only for uncompressed length

The purpose of this badly named field is a bit ambiguous. Adjust the code
to use it only to store the uncompressed length of a file, leaving it set
to None if there is no compression used. This makes it easy to see if the
value in this field is relevant / useful.

Also set data_len for compressed fields, since it should be the length of
the compressed data, not the uncompressed data.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/cbfs_util.py