tools: binman: Handle optional microcode case in SPL image
authorBin Meng <bmeng.cn@gmail.com>
Wed, 18 Jan 2017 11:33:00 +0000 (03:33 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 7 Feb 2017 05:27:20 +0000 (13:27 +0800)
On platforms which do not require microcode in SPL, handle such
case like U-Boot proper.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/binman/etype/u_boot_ucode.py

index 8fe27acb2453a25d15bb1525ff864720c0e480fb..8e51e99a1190700daf7facd9ed595ca081ea5f93 100644 (file)
@@ -62,6 +62,12 @@ class Entry_u_boot_ucode(Entry_blob):
             self.data = ''
             return True
 
+        # Handle microcode in SPL image as well
+        ucode_dest_entry = self.image.FindEntryType('u-boot-spl-with-ucode-ptr')
+        if ucode_dest_entry and not ucode_dest_entry.target_pos:
+            self.data = ''
+            return True
+
         # Get the microcode from the device tree entry
         fdt_entry = self.image.FindEntryType('u-boot-dtb-with-ucode')
         if not fdt_entry or not fdt_entry.ucode_data: