How to change the soft link in target.requires or target.wants directory
CS20 CHLi30
CHLI30 at nuvoton.com
Thu Dec 26 19:53:13 AEDT 2019
Hi Felix,
I'm glad to hear your problem was solved partially.
I think that your guess might be right, you should check your power pin ON sequences behavior. (High->Sleep xxx ms->Low or opposite)
It's depend on your H/W platform.
systemctl list-dependencies obmc-host-shutdown at 0.target
obmc-host-shutdown at 0.target (Olderly shutdown)
-> xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
-> obmc-chassis-poweroff at 0.target
-> mapper-wait at -xyz-openbmc_project-state-chassis0.service
-> op-power-stop at 0.service
-> op-powered-off at 0.service
-> op-wait-power-off at 0.service
-> obmc-host-stop at 0.target
-> mapper-wait at -org-openbmc-control-chassis0.service
Best regards,
Tim
From: zhang_cy1989 [mailto:zhang_cy1989 at 163.com]
Sent: Thursday, December 26, 2019 4:38 PM
To: CS20 CHLi30 <CHLI30 at nuvoton.com>
Cc: Lei YU <mine260309 at gmail.com>; openbmc at lists.ozlabs.org
Subject: Re:RE: How to change the soft link in target.requires or target.wants directory
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<mailto: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<mailto: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<mailto:op-reset-chassis-running at .service>"
>RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service<mailto:op-reset-chassis-running@%7b0%7d.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<mailto:obmc-chassis-powerreset at .target>"
>SYSD_TGT = "multi-user.target"
>RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target<mailto:obmc-chassis-powerreset@%7b0%7d.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<mailto:zhang_cy1989 at 163.com>>
>Cc: openbmc at lists.ozlabs.org<mailto: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<mailto: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<mailto:/lib/systemd/system/obmc-host-startmin at 0.target.requires>
>> lrwxrwxrwx 1 root root 31 Nov 29 2019 obmc-chassis-poweron at 0.target<mailto:obmc-chassis-poweron at 0.target> -> ../obmc-chassis-poweron at .target<mailto:../obmc-chassis-poweron at .target>
>> lrwxrwxrwx 1 root root 25 Nov 28 09:51 op-occ-enable at 0.service<mailto:op-occ-enable at 0.service> -> ../op-occ-enable at .service<mailto:../op-occ-enable at .service>
>> lrwxrwxrwx 1 root root 22 Nov 28 09:57 start_host at 0.service<mailto:start_host at 0.service> -> ../start_host at .service<mailto:../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<mailto:./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.
________________________________
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/19587c6f/attachment-0001.htm>
More information about the openbmc
mailing list