How to change the soft link in target.requires or target.wants directory

zhang_cy1989 zhang_cy1989 at 163.com
Thu Dec 26 19:38:21 AEDT 2019


Dear Tim
   It's exactly what I wanted.
   You are wonderful.
 
   I remember you.

   You taught me a lot.


   Following your seggestions, I can power on the chassis by ipmitool.
   But there is still a bit prolems:
             When I do the action: ipmitool -I lanplus -H 192.168.0.1 -U root -P 0penBmc power on.
             Right after, the chassis  is power up.
             Waiting for about 4 seconds,the chassis is power off again.
           

  I guess this is because the power up pin keeps active for a long time.
  when power up pin keeping active for 4 seconds,the chassis power will lost again.

            

  I will debug this problem. If you have more suggestions, welcome to teach me.
 

  And,Could you show me the dependencies of "obmc-host-shutdown at 0.target"?
  (power off, still on x86 motherboard and use romulus receipes).


 Looking forward for your reply.


Best Regards
Felix

 



At 2019-12-26 15:46:13, "CS20 CHLi30" <CHLI30 at nuvoton.com> wrote:
>Hi Felix,
>
>If you need to add your .service unit file into .want or .requires folder, you can use systemd to do that in .bb file.
>
>You can refer obmc-op-control-power_git.bb this file for example:
>
>Install to .requires folder:
>RESET_ON_TMPL = "op-reset-chassis-running at .service"
>RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service"
>RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}"
>
>Install to .want folder:
># Force the standby target to run the chassis reset check target
>RESET_TMPL_CTRL = "obmc-chassis-powerreset at .target"
>SYSD_TGT = "multi-user.target"
>RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target"
>RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
>SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"
>
>Sincerely,
>Tim
>-----Original Message-----
>From: openbmc [mailto:openbmc-bounces+chli30=nuvoton.com at lists.ozlabs.org] On Behalf Of Lei YU
>Sent: Thursday, December 26, 2019 3:37 PM
>To: zhang_cy1989 <zhang_cy1989 at 163.com>
>Cc: openbmc at lists.ozlabs.org
>Subject: Re: How to change the soft link in target.requires or target.wants directory
>
>On Thu, Dec 26, 2019 at 3:18 PM zhang_cy1989 <zhang_cy1989 at 163.com> wrote:
>>
>> Dear All
>>    The target.requires or target.wants contains some soft link.
>>    Ex:
>>         /lib/systemd/system/obmc-host-startmin at 0.target.requires
>>                    lrwxrwxrwx    1 root     root            31 Nov 29  2019 obmc-chassis-poweron at 0.target -> ../obmc-chassis-poweron at .target
>>                    lrwxrwxrwx    1 root     root            25 Nov 28 09:51 op-occ-enable at 0.service -> ../op-occ-enable at .service
>>                    lrwxrwxrwx    1 root     root            22 Nov 28 09:57 start_host at 0.service -> ../start_host at .service
>>
>>     Now, I want to add or delete soft link:op-occ-enable at 0.service
>>     I can use "rm -rf ./op-occ-enable at 0.service" to achieve the goal.
>>     But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.
>>
>>     Are there other tools or formal methods to do this?
>
>These links are expected to be managed by systemd.
>You could disable or mask the services by `systemctl [disable|mask] <service>`. If you need them later, just enable or unmask them.
>________________________________
>________________________________
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191226/bd2217ee/attachment-0001.htm>


More information about the openbmc mailing list