<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@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;}
@font-face
{font-family:PMingLiU;
panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:SimSun;
mso-fareast-language:ZH-CN;}
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
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:SimSun;
mso-fareast-language:ZH-CN;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:SimSun;
mso-fareast-language:ZH-CN;}
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:12.0pt;
font-family:SimSun;
mso-fareast-language:ZH-CN;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-fareast-language:ZH-CN;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.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 lang="ZH-TW" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">Hi Felix,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">I’m glad to hear your problem was solved partially.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">I think that your guess might be right, you should check your power pin ON sequences behavior. (High->Sleep xxx ms->Low or opposite)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">It’s depend on your H/W platform.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">systemctl list-dependencies obmc-host-shutdown@0.target<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">obmc-host-shutdown@0.target (Olderly shutdown)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">-> xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">-> obmc-chassis-poweroff@0.target<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"> -> mapper-wait@-xyz-openbmc_project-state-chassis0.service<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"> -> op-power-stop@0.service<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"> -> op-powered-off@0.service<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"> -> op-wait-power-off@0.service<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"> -> obmc-host-stop@0.target<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"> -> mapper-wait@-org-openbmc-control-chassis0.service<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:ZH-TW">Tim<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> zhang_cy1989 [mailto:zhang_cy1989@163.com]
<br>
<b>Sent:</b> Thursday, December 26, 2019 4:38 PM<br>
<b>To:</b> CS20 CHLi30 <CHLI30@nuvoton.com><br>
<b>Cc:</b> Lei YU <mine260309@gmail.com>; openbmc@lists.ozlabs.org<br>
<b>Subject:</b> Re:RE: How to change the soft link in target.requires or target.wants directory<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Dear Tim<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> It's exactly what I wanted.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> You are wonderful.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> I remember you.
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> You taught me a lot.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> Following your seggestions, I can power on the chassis by ipmitool.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> But there is still a bit prolems:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> When I do the action: ipmitool -I lanplus -H 192.168.0.1 -U root -P 0penBmc power on.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> Right after, the chassis is power up.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> Waiting for about 4 seconds,the chassis is power off again.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> I guess this is because the power up pin keeps active for a long time.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> when power up pin keeping active for 4 seconds,the chassis power will lost again.
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">
</span><b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#DD4032">I will debug this problem. If you have more suggestions, welcome to teach me.</span></b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#DD4032"> </span></b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#DD4032"> And,Could you show me the dependencies of "<a href="mailto:obmc-host-shutdown@0.target">obmc-host-shutdown@0.target</a>"?</span></b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#DD4032"> (power off, still on x86 motherboard and use romulus receipes).</span></b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> Looking forward for your reply.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Best Regards<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Felix<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<pre><span lang="EN-US" style="color:black">At 2019-12-26 15:46:13, "CS20 CHLi30" <<a href="mailto:CHLI30@nuvoton.com">CHLI30@nuvoton.com</a>> wrote:<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Hi Felix,<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>If you need to add your .service unit file into .want or .requires folder, you can use systemd to do that in .bb file.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>You can refer obmc-op-control-power_git.bb this file for example:<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Install to .requires folder:<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>RESET_ON_TMPL = "<a href="mailto:op-reset-chassis-running@.service">op-reset-chassis-running@.service</a>"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>RESET_ON_INSTFMT = "<a href="mailto:op-reset-chassis-running@%7b0%7d.service">op-reset-chassis-running@{0}.service</a>"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Install to .want folder:<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">># Force the standby target to run the chassis reset check target<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>RESET_TMPL_CTRL = "<a href="mailto:obmc-chassis-powerreset@.target">obmc-chassis-powerreset@.target</a>"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>SYSD_TGT = "multi-user.target"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>RESET_INSTFMT_CTRL = "<a href="mailto:obmc-chassis-powerreset@%7b0%7d.target">obmc-chassis-powerreset@{0}.target</a>"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Sincerely,<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Tim<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>-----Original Message-----<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>From: openbmc [<a href="mailto:openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org">mailto:openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org</a>] On Behalf Of Lei YU<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Sent: Thursday, December 26, 2019 3:37 PM<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>To: zhang_cy1989 <<a href="mailto:zhang_cy1989@163.com">zhang_cy1989@163.com</a>><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Cc: <a href="mailto:openbmc@lists.ozlabs.org">openbmc@lists.ozlabs.org</a><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>Subject: Re: How to change the soft link in target.requires or target.wants directory<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>On Thu, Dec 26, 2019 at 3:18 PM zhang_cy1989 <<a href="mailto:zhang_cy1989@163.com">zhang_cy1989@163.com</a>> wrote:<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> Dear All<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> The target.requires or target.wants contains some soft link.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> Ex:<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> <a href="mailto:/lib/systemd/system/obmc-host-startmin@0.target.requires">/lib/systemd/system/obmc-host-startmin@0.target.requires</a><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> lrwxrwxrwx 1 root root 31 Nov 29 2019 <a href="mailto:obmc-chassis-poweron@0.target">obmc-chassis-poweron@0.target</a> -> <a href="mailto:../obmc-chassis-poweron@.target">../obmc-chassis-poweron@.target</a><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> lrwxrwxrwx 1 root root 25 Nov 28 09:51 <a href="mailto:op-occ-enable@0.service">op-occ-enable@0.service</a> -> <a href="mailto:../op-occ-enable@.service">../op-occ-enable@.service</a><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> lrwxrwxrwx 1 root root 22 Nov 28 09:57 <a href="mailto:start_host@0.service">start_host@0.service</a> -> <a href="mailto:../start_host@.service">../start_host@.service</a><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> Now, I want to add or delete soft link:op-occ-enable@0.service<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> I can use "rm -rf <a href="mailto:./op-occ-enable@0.service">./op-occ-enable@0.service</a>" to achieve the goal.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>> Are there other tools or formal methods to do this?<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>These links are expected to be managed by systemd.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>You could disable or mask the services by `systemctl [disable|mask] <service>`. If you need them later, just enable or unmask them.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>________________________________<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">>________________________________<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">> 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.<o:p></o:p></span></pre>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<hr align="center" width="100%">
<span style="font-size:12pt;line-height:0.7;font-family: 'Arial'; color:#808080">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>
</body>
</html>