summaryrefslogtreecommitdiff
path: root/tools/binman/image.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-20 21:23:50 +0300
committerSimon Glass <sjg@chromium.org>2019-07-29 18:38:06 +0300
commit10f9d0066b9e9e14327922fa62c2a1b6bea50785 (patch)
treee8f2edff2c01e0a90f203db9fc3a5d336d15fd0c /tools/binman/image.py
parenta004f29464d14f3535ed8db22e5dfed02c8fc9d8 (diff)
downloadu-boot-10f9d0066b9e9e14327922fa62c2a1b6bea50785.tar.xz
binman: Support updating entries in an existing image
While it is useful and efficient to build images in a single pass from a unified description, it is sometimes desirable to update the image later. Add support for replace an existing file with one of the same size. This avoids needing to repack the file. Support for more advanced updates will come in future patches. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r--tools/binman/image.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py
index c990818734..5185b68990 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -10,6 +10,7 @@ from __future__ import print_function
from collections import OrderedDict
import fnmatch
from operator import attrgetter
+import os
import re
import sys
@@ -96,6 +97,8 @@ class Image(section.Entry_section):
image.fdtmap_dtb = dtb
image.fdtmap_data = fdtmap_data
image._data = data
+ image._filename = fname
+ image.image_name, _ = os.path.splitext(fname)
return image
def Raise(self, msg):