<div dir="ltr">Hi<div><br></div><div>How do you do the rescan? That was the part I was curious about :-D</div><div><br></div><div>Is it this (<a href="https://github.com/Nuvoton-Israel/openbmc/blob/runbmc/meta-phosphor/nuvoton-layer/recipes-phosphor/ipmi/phosphor-ipmi-flash/bios-update.sh#L38">https://github.com/Nuvoton-Israel/openbmc/blob/runbmc/meta-phosphor/nuvoton-layer/recipes-phosphor/ipmi/phosphor-ipmi-flash/bios-update.sh#L38</a>)?</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>cd /sys/bus/platform/devices/c0000000.fiu/driver</div><div> echo -n "c0000000.fiu" > unbind</div><div> echo -n "c0000000.fiu" > bind</div></blockquote><div><br></div><div>If so, what's the magic "c0000000.fiu"?</div><div><br></div><div>Thanks</div><div>Oskar</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 17, 2019 at 7:33 PM CS20 CTCchien <<a href="mailto:CTCCHIEN@nuvoton.com">CTCCHIEN@nuvoton.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="ZH-TW">
<div class="gmail-m_5312416673954572738WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)">We have a gpio which could control the MUX<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)">When I want to do BIOS upgrade, I will shut down the host and operate the gpio, and rescan, then BIOS flash will be accessible from BMC now.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)">B.R.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)">Medad<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> Oskar Senft <<a href="mailto:osk@google.com" target="_blank">osk@google.com</a>>
<br>
<b>Sent:</b> Wednesday, December 18, 2019 4:57 AM<br>
<b>To:</b> CS20 CTCchien <<a href="mailto:CTCCHIEN@nuvoton.com" target="_blank">CTCCHIEN@nuvoton.com</a>><br>
<b>Cc:</b> Vijay Khemka <<a href="mailto:vijaykhemka@fb.com" target="_blank">vijaykhemka@fb.com</a>>; OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>><br>
<b>Subject:</b> Re: Bios upgrade<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">How did you configure the BIOS flash device? I assume via the device tree? I haven't tested this in a while, but I seem to remember that if the BIOS SPI flash is not accessible Linux doesn't "detect" the device and doesn't
create the MTD, i.e. it's not accessible from the BMC. This can be the case if the mux between BMC, PCH and BIOS SPI flash) is configured to connect the SPI flash to the BMC at the time the BMC boots. Or is there a way to make BMC's Linux "rescan" for SPI
flash chips at runtime?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Thanks<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Oskar.<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On Tue, Dec 17, 2019 at 12:38 AM CS20 CTCchien <<a href="mailto:CTCCHIEN@nuvoton.com" target="_blank">CTCCHIEN@nuvoton.com</a>> wrote:<u></u><u></u></span></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Hi Vijay,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">You could build a host daemon and a ipmi library on BMC from phosphor-ipmi-flash</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Here is the link I implement BIOS upgrade on my system</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;color:rgb(0,32,96)"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_openbmc_tree_runbmc_meta-2Dphosphor_nuvoton-2Dlayer_recipes-2Dphosphor_ipmi&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=HqT4ScbSY2YNT4sFBmDErzNgMDeKfQmTiR08x2qtobg&m=7mxCYr2Rn71qEomdvLXWG3GkbwRmfjiYt-8PEs6Vr4M&s=VQpRXaKHfEykzUskGOobziNpXXSFdsD5KBmZLYGys-U&e=" target="_blank"><span style="color:rgb(0,32,96)">https://github.com/Nuvoton-Israel/openbmc/tree/runbmc/meta-phosphor/nuvoton-layer/recipes-phosphor/ipmi</span></a>.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">You need to prepare a BIOS image and a signature file for this BIOS</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">After you execute the command on host, ipmid in BMC will launch a script to upgrade BIOS.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">For example,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">sudo ./burn_my_bmc --command update --interface ipmipci --image BIOS.img --sig BIOS.img.sig --type static</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">B.R.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:rgb(31,73,125)">Medad</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt">From:</span></b><span lang="EN-US" style="font-size:11pt"> Vijay Khemka <<a href="mailto:vijaykhemka@fb.com" target="_blank">vijaykhemka@fb.com</a>>
<br>
<b>Sent:</b> Tuesday, December 17, 2019 8:16 AM<br>
<b>To:</b> OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>><br>
<b>Subject:</b> Bios upgrade</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Hi,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">I am looking for bios upgrade from BMC. I looked at phosphor-ipmi-flash but
</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">couldn</span><span style="font-size:11pt">’<span lang="EN-US">t figure out how to use this for bios upgrade. I checked few old mails
</span></span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">where oskar was asking about using user space application instead of kernel.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Can anyone please give steps to use any existing kernel driver or user space
</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Application for upgrading host firmware.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Regards</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">-Vijay</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-US">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Arial,sans-serif;color:gray">The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are
not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation
is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by
Nuvoton. </span><span lang="EN-US"><u></u><u></u></span></p>
</div>
</blockquote>
</div>
</div>
<hr align="center" width="100%">
<span style="font-size:12pt;line-height:0.7;font-family:Arial;color:rgb(128,128,128)">The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the
addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly
appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
</span>
</div>
</blockquote></div>