<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-IN" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Hi Matt, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks for your response.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">I am able to power on the Host by monitoring GPIO using “phosphor-gpio-monitor” service.
<o:p></o:p></span></p>
<p><span style="color:windowtext">But still we need to achieve same result by </span>
<a href="mailto:org.openbmc.buttons.Power@0.service">org.openbmc.buttons.Power@0.service</a> in future.
<o:p></o:p></p>
<p><span style="color:windowtext">Here is the response :</span><o:p></o:p></p>
<p><span style="color:windowtext"></span># systemctl status <a href="mailto:org.openbmc.buttons.Power@0.service">
org.openbmc.buttons.Power@0.service</a><span style="color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">● org.openbmc.buttons.Power@0.service - Phosphor Power Button0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"> Loaded: loaded (/lib/systemd/system/org.openbmc.buttons.Power@.service; indirect; vendor preset: enabled)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"> Active: inactive (dead)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">hwmi~# ps | grep button_power.exe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">1205 root 3100 S grep button_power.exe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">hwmi:~#<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">button_power.exe is not running in BMC. Service status with instance 0 is not showing any error. But button_power.exe is not running. So that I tried with instance 1.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">I think below file is responsible for button power controlling in OBMC.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">c/skeleton/blob/master/pwrbutton/button_power_obj.c
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Here is the receipe file. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Cat ./meta-phosphor/recipes-phosphor/chassis/obmc-button-power.bb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">SUMMARY = "OpenBMC org.openbmc.Button example implementation"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">DESCRIPTION = "A sample implementation for a button controlling a power domain."<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">PR = "r1"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">inherit skeleton-gdbus<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">inherit obmc-phosphor-dbus-service<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">inherit pkgconfig<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">SKELETON_DIR = "pwrbutton"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="color:windowtext">FMT = "org.openbmc.buttons.Power@{0}.service"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">DBUS_SERVICE_${PN} += "${@compose_list(d, 'FMT', 'OBMC_POWER_BUTTON_INSTANCES')}"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">If you need journal log, then I can share it. I need to understand the flow.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Please help to achieve. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">Maheswari A<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="color:windowtext;mso-fareast-language:EN-IN">From:</span></b><span lang="EN-US" style="color:windowtext;mso-fareast-language:EN-IN"> Matt Spinler <mspinler@linux.vnet.ibm.com>
<br>
<b>Sent:</b> Saturday, October 27, 2018 1:45 AM<br>
<b>To:</b> A, Maheswari <maheswari.a@atos.net><br>
<b>Cc:</b> OpenBMC Maillist <openbmc@lists.ozlabs.org><br>
<b>Subject:</b> Re: help: OpenBMC host power on from power button press<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal">On 10/25/2018 11:52 PM, A, Maheswari wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am new to openBMC project. <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">We are in the process of porting power button gpio interrupt handling in openBMC.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">After some a lot of analysis, I found that obmc-button-power related service are necessary to power on the host using power button press event.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have added POWER_BUTTON and machine specific GPIO number and polarity in gpio_defs.json.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">While starting the “org.openbmc.button.Power” service, I am getting the below error.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <b><a href="mailto:org.openbmc.buttons.Power@1.service">org.openbmc.buttons.Power@1.service</a> - Phosphor Power Button1</b><o:p></o:p></p>
<p class="MsoNormal"><b> Loaded: [[0;1;31merror[[0m (Reason: File exists)</b><o:p></o:p></p>
<p class="MsoNormal"><b> Active: inactive (dead)</b><o:p></o:p></p>
<p class="MsoNormal"><b> </b><o:p></o:p></p>
<p class="MsoNormal"><b>Oct 22 14:14:13 hwmi systemd[1]: [[0;1;31m[[0;1;39m[[<a href="mailto:0;1;31morg.openbmc.buttons.Power@1.service">0;1;31morg.openbmc.buttons.Power@1.service</a>: Two services allocated for the same bus name org.open</b><o:p></o:p></p>
<p class="MsoNormal"><b>bmc.butto.Power, refusing operation.[[0m</b><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Please help to figure out and proceed. <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
<p>Hi Maheswari,<o:p></o:p></p>
<p>I'm guessing you already have an <a href="mailto:org.openbmc.buttons.Power@0.service">
org.openbmc.buttons.Power@0.service</a> running.<o:p></o:p></p>
<p>You can check with:<o:p></o:p></p>
<p># systemctl status <a href="mailto:org.openbmc.buttons.Power@0.service">org.openbmc.buttons.Power@0.service</a>
<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN">or just check for the button_power.exe process already running.<br>
<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks <o:p></o:p></p>
<p class="MsoNormal">Maheswari A <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN"><o:p> </o:p></span></p>
</div>
</body>
</html>