binman: Set the pathname correctly for ELF files
authorSimon Glass <sjg@chromium.org>
Tue, 6 Nov 2018 22:21:33 +0000 (15:21 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Nov 2018 02:14:22 +0000 (19:14 -0700)
At present, stripped files don't have the right pathname which means that
blob compression cannot be used. Fix this.

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

index 134b6cc..f83860d 100644 (file)
@@ -30,9 +30,8 @@ class Entry_u_boot_elf(Entry_blob):
             out_fname = tools.GetOutputFilename('%s.stripped' % uniq)
             tools.WriteFile(out_fname, tools.ReadFile(self._pathname))
             tools.Run('strip', out_fname)
-            self.SetContents(tools.ReadFile(out_fname))
-        else:
-            self.SetContents(tools.ReadFile(self._pathname))
+            self._pathname = out_fname
+        Entry_blob.ReadBlobContents(self)
         return True
 
     def GetDefaultFilename(self):