]> git.sur5r.net Git - u-boot/blobdiff - tools/binman/etype/u_boot_ucode.py
binman: Correct operation of ObtainContents()
[u-boot] / tools / binman / etype / u_boot_ucode.py
index 3a0cff7c3a3713d5d861ffa28aeecd274c31ae6c..8cae7deed3cb9ca439852b7c811e889448cff918 100644 (file)
@@ -64,9 +64,14 @@ class Entry_u_boot_ucode(Entry_blob):
             self.data = ''
             return True
 
-        # Get the microcode from the device tree entry
+        # Get the microcode from the device tree entry. If it is not available
+        # yet, return False so we will be called later. If the section simply
+        # doesn't exist, then we may as well return True, since we are going to
+        # get an error anyway.
         fdt_entry = self.section.FindEntryType('u-boot-dtb-with-ucode')
-        if not fdt_entry or not fdt_entry.ucode_data:
+        if not fdt_entry:
+            return True
+        if not fdt_entry.ucode_data:
             return False
 
         if not fdt_entry.collate: