<p>Lev has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25546">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/scripts/ucode_h_to_bin.sh: Accept microcode in INC format<br><br>Intel supply microcode (at least for MinnowBoard) in Intel Assembly<br>*.inc format rather than C header. This change allow to pass in<br>configuration directory with *.inc files rather than list of *.h<br>files.<br><br>Change-Id: I3c716e5ad42e55ab3a3a67de1e9bf10e58855540<br>Signed-off-by: Bartek Pastudzki <Bartek.Pastudzki@3mdeb.com><br>---<br>M src/soc/intel/fsp_baytrail/Kconfig<br>M util/scripts/ucode_h_to_bin.sh<br>2 files changed, 17 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/25546/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/fsp_baytrail/Kconfig b/src/soc/intel/fsp_baytrail/Kconfig</span><br><span>index 549ea55..f4cc16c 100644</span><br><span>--- a/src/soc/intel/fsp_baytrail/Kconfig</span><br><span>+++ b/src/soc/intel/fsp_baytrail/Kconfig</span><br><span>@@ -97,7 +97,7 @@</span><br><span> </span><br><span> config CPU_MICROCODE_HEADER_FILES</span><br><span>   string</span><br><span style="color: hsl(0, 100%, 40%);">-  default "../intel/cpu/baytrail/microcode/M0130673322.h ../intel/cpu/baytrail/microcode/M0130679901.h ../intel/cpu/baytrail/microcode/M0230672228.h"</span><br><span style="color: hsl(120, 100%, 40%);">+ default "../Vlv2MiscBinariesPkg/Microcode"</span><br><span> </span><br><span> ## Baytrail Specific FSP Kconfig</span><br><span> source src/soc/intel/fsp_baytrail/fsp/Kconfig</span><br><span>diff --git a/util/scripts/ucode_h_to_bin.sh b/util/scripts/ucode_h_to_bin.sh</span><br><span>index 2d7f5fa..b834dcd 100755</span><br><span>--- a/util/scripts/ucode_h_to_bin.sh</span><br><span>+++ b/util/scripts/ucode_h_to_bin.sh</span><br><span>@@ -40,8 +40,23 @@</span><br><span> unsigned int microcode[] = {</span><br><span> EOF</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+include_file() {</span><br><span style="color: hsl(120, 100%, 40%);">+    if [ ${1: -4} == ".inc" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+        awk '{gsub( /h.*$/, "", $2 ); print "0x" $2 ","; }' $1 >> ${TMPFILE}.c</span><br><span style="color: hsl(120, 100%, 40%);">+    else</span><br><span style="color: hsl(120, 100%, 40%);">+        echo "#include \"$1\"" >> "${TMPFILE}.c"</span><br><span style="color: hsl(120, 100%, 40%);">+    fi</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> for UCODE in ${@:2}; do</span><br><span style="color: hsl(0, 100%, 40%);">- echo "#include \"$UCODE\"" >> "${TMPFILE}.c"</span><br><span style="color: hsl(120, 100%, 40%);">+    if [ -d "$UCODE" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+        for f in "$UCODE/"*.inc</span><br><span style="color: hsl(120, 100%, 40%);">+        do</span><br><span style="color: hsl(120, 100%, 40%);">+            include_file "$f"</span><br><span style="color: hsl(120, 100%, 40%);">+        done</span><br><span style="color: hsl(120, 100%, 40%);">+    else</span><br><span style="color: hsl(120, 100%, 40%);">+        include_file "$UCODE"</span><br><span style="color: hsl(120, 100%, 40%);">+    fi</span><br><span> done</span><br><span> </span><br><span> cat >> "${TMPFILE}.c" << EOF</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25546">change 25546</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/25546"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I3c716e5ad42e55ab3a3a67de1e9bf10e58855540 </div>
<div style="display:none"> Gerrit-Change-Number: 25546 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Lev </div>