diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-07 09:46:46 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-08-20 18:07:32 -0600 |
commit | 7960a0a289506890474db0703344a87ac2f295db (patch) | |
tree | b6670586ae72982851b6bdd3dc8a7611b203f9a1 /tools/binman/control.py | |
parent | 3212be5e24c5861c4209785fd5f654f43fe9d409 (diff) |
binman: Put fake files in a subdirectory
At present fake files from a previous build appear to be real files for
a subsequent build, since they sit in the output directory.
This can cause problems, since binman may need to parse the file, e.g.
with the Intel description.bin files.
Fix this by putting them in a 'binman-fake' subdirectory. Keep a track
of the fake filename so we only create it once. Subsequent builds will
still see that the file is missing and mark it as fake.
Update a few tests to check the behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r-- | tools/binman/control.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py index ce57dc7efc..8eea864d45 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -16,8 +16,9 @@ from patman import tools from binman import bintool from binman import cbfs_util -from binman import elf from patman import command +from binman import elf +from binman import entry from patman import tout # These are imported if needed since they import libfdt @@ -717,6 +718,13 @@ def Binman(args): bintool.Bintool.set_missing_list( args.force_missing_bintools.split(',') if args.force_missing_bintools else None) + + # Create the directory here instead of Entry.check_fake_fname() + # since that is called from a threaded context so different threads + # may race to create the directory + if args.fake_ext_blobs: + entry.Entry.create_fake_dir() + for image in images.values(): invalid |= ProcessImage(image, args.update_fdt, args.map, allow_missing=args.allow_missing, |