From a9fad07d4b862b4b5d52e04950a374371936f7eb Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 26 Oct 2020 17:40:17 -0600 Subject: binman: Avoid reporting image-pos with compression When a section is compressed, all entries within it are grouped together into a compressed block of data. This obscures the start of each individual child entry. Avoid reporting bogus 'image-pos' properties in this case, since it is not possible to access the entry at the location provided. The entire section must be decompressed first. CBFS does not support compressing whole sections, only individual files, so needs no special handling here. Signed-off-by: Simon Glass --- tools/binman/control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index ee5771e7292..26f1cf462ec 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -462,7 +462,7 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt): for image in images.values(): image.ExpandEntries() if update_fdt: - image.AddMissingProperties() + image.AddMissingProperties(True) image.ProcessFdt(dtb) for dtb_item in state.GetAllFdts(): -- cgit v1.2.3 From 601b69aa8a56168ff25988bbf9cd2d457f13861d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 26 Oct 2020 17:40:20 -0600 Subject: binman: Drop the Entry.CheckSize() method This is only used by entry_Section and that class already calls it. Avoid calling it twice. Also drop it from the documentation. Signed-off-by: Simon Glass --- tools/binman/control.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index 26f1cf462ec..9eeac5db995 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -513,7 +513,6 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, for pack_pass in range(passes): try: image.PackEntries() - image.CheckSize() image.CheckEntries() except Exception as e: if write_map: -- cgit v1.2.3 From 0b65769c2e31ae7b3ee6015b1f7602e4e1ac56a6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 26 Oct 2020 17:40:22 -0600 Subject: binman: Drop CheckEntries() This method introduces a separation between packing and checking that is different for sections. In order to handle compression properly, we need to be able to deal with a section's size being smaller than the uncompressed size of its contents. It is easier to make this work if everything happens in the Pack() method. The only real user of CheckEntries() is entry_Section and it can call it directly. Drop the call from 'control' and handle it locally. Signed-off-by: Simon Glass --- tools/binman/control.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index 9eeac5db995..072417f3644 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -513,7 +513,6 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, for pack_pass in range(passes): try: image.PackEntries() - image.CheckEntries() except Exception as e: if write_map: fname = image.WriteMap() -- cgit v1.2.3