diff mbox

[U-Boot,10/14] tools: binman: Handle optional microcode case in SPL image

Message ID 1484739184-24211-11-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 9d1adf04845a1509a27f182acf2b1c7fdb60439c
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng Jan. 18, 2017, 11:33 a.m. UTC
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>
---

 tools/binman/etype/u_boot_ucode.py | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Simon Glass Jan. 26, 2017, 2:23 p.m. UTC | #1
On 18 January 2017 at 04:33, Bin Meng <bmeng.cn@gmail.com> wrote:
> 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>
> ---
>
>  tools/binman/etype/u_boot_ucode.py | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng Feb. 7, 2017, 5:44 a.m. UTC | #2
On Thu, Jan 26, 2017 at 10:23 PM, Simon Glass <sjg@chromium.org> wrote:
> On 18 January 2017 at 04:33, Bin Meng <bmeng.cn@gmail.com> wrote:
>> 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>
>> ---
>>
>>  tools/binman/etype/u_boot_ucode.py | 6 ++++++
>>  1 file changed, 6 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/tools/binman/etype/u_boot_ucode.py b/tools/binman/etype/u_boot_ucode.py
index 8fe27ac..8e51e99 100644
--- a/tools/binman/etype/u_boot_ucode.py
+++ b/tools/binman/etype/u_boot_ucode.py
@@ -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: