Re: about power control.回复: Call for Gardening Tasks

Li, Yong yong.b.li at linux.intel.com
Wed Apr 22 15:34:35 AEST 2020


Regarding the power control related, sugest to check on the below:

https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp



It uses litter systems related services/targets, and monitor these gpio 
signals, to trigger different callback actions.


For the pgood_wait, it is in:

https://github.com/openbmc/skeleton/tree/master/op-pwrctl/pgood_wait

https://github.com/openbmc/skeleton/tree/master/op-pwrctl


Thanks,

Yong


在 4/21/2020 10:50 PM, zhouyuanqing8 at outlook.com 写道:
> Hi
>
>     This is a very good idea. As the first time to do openbmc, I look 
> forward to it. Currently, I am being troubled by the problems you 
> describe.
>
>     The following questions, please also help you answer it, thank you 
> very much.
>
>     1.I modified the dts file, how to use the command "bitbake -f 
> linux-aspeed" to Generate fitimage and dub?
>      Now, I modify the dts file in the kernel source directory. When I 
> compile, bitbake will re-fetch the source code, decompress, patch, 
> configure, and compile, causing my changes to be overwritten. I 
> currently use manual call scripts to compile dts files and make images 
> for debugging.Is there a way to make bitbake skip the previous steps 
> and compile directly?
>
>
>      2.The size of image-rwfs is 0, I want to use rwfs debugging, how 
> to configure to generate a normal image-rwfs?
> -rw-r--r--. 2 harleyzhou harleyzhou     9443     4月        7 17:27 
> obmc-phosphor-image-xxh-20200407092558.rootfs.manifest
>      -rw-r--r--. 2 harleyzhou harleyzhou 18214912 4月    7 17:27 
> obmc-phosphor-image-xxh-20200407092558.rootfs.squashfs-xz
>      -rw-rw-r--. 2 harleyzhou harleyzhou 33554432        4月   7 17:27 
> obmc-phosphor-image-xxh-20200407092558.static.mtd
>      -rw-rw-r--. 2 harleyzhou harleyzhou 33566720        4月   7 17:28 
> obmc-phosphor-image-xxh-20200407092558.static.mtd.all.tar
>      -rw-rw-r--. 2 harleyzhou harleyzhou 22384640        4月   7 17:28 
> obmc-phosphor-image-xxh-20200407092558.static.mtd.tar
>      -rw-r--r--. 2 harleyzhou harleyzhou   308218  4月      7 17:27 
> obmc-phosphor-image-xxh-20200407092558.testdata.json
>      -rw-r--r--. 2 harleyzhou harleyzhou           0  4月   7 17:27 
> obmc-phosphor-image-xxh.jffs2
>
>
>     3. I did not find the source code of "pgood_wait" and 
> "power_control.exe" in obmc-op-control-power? where can I get it ?
>
>
>     4.OpenBMC usessystemd 
> <https://www.freedesktop.org/wiki/Software/systemd/>to manage all 
> processes, So i analyzed the process of systemd starting process and 
> saw "default.target-> basic.target-> sysinit.target-> 
> local-fs.target", there is no content behind.please help to provide 
> clues of systemd starting process.
>
>     5.I understand the following execution process of power-on , help 
> check if it is correct.
>        a).rest or busctl send power-on commands to systemd through 
> d-bus messages.
>        b).systemd find the obmc-chassis-poweron at .target
>   c).systemd find the obmc-power-start at .target
> d).systemd find the op-power-start at 0.service
> e).systemd start a thread and execute "busctl call `mapper get-service 
> /org/openbmc/control/power%i` /org/openbmc/control/power%i 
> org.openbmc.control.Power setPowerState I 1"
>
> appendix:
>
> ls obmc-chassis-poweron at 0.target.requires
>
> op-power-start at 0.serviceop-wait-power-on@0.service
>
>
> cat obmc-chassis-poweron at .target
>
> [Unit]
>
> Description=Chassis%i (Power On)
>
> Wants=multi-user.target
>
> After=multi-user.target
>
> Wants=mapper-wait at -xyz-openbmc_project-state-chassis%i.service
>
> After=mapper-wait at -xyz-openbmc_project-state-chassis%i.service
>
> Wants=mapper-subtree-remove at -xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service
>
> After=mapper-subtree-remove at -xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service
>
>
> cat op-power-start at 0.service
>
> [Unit]
>
> Description=Start Power%i
>
> Wants=obmc-power-start@%i.target
>
> Before=obmc-power-start@%i.target
>
> After=obmc-power-start-pre@%i.target
>
> After=obmc-fan-control.target
>
> Wants=mapper-wait at -org-openbmc-control-power%i.service
>
> After=mapper-wait at -org-openbmc-control-power%i.service
>
> [Service]
>
> RemainAfterExit=yes
>
> Type=oneshot
>
> ExecStart=/bin/sh -c "busctl call `mapper get-service 
> /org/openbmc/control/power%i` /org/openbmc/control/power%i 
> org.openbmc.control.Power setPowerState i 1"
>
> SyslogIdentifier=op-power-start
>
> [Install]
>
> WantedBy=obmc-host-start@%i.target
>
>
> cat obmc-power-start at .target
>
> [Unit]
>
> Description=Power%i On
>
> After=obmc-power-start-pre@%i.target
>
> Wants=multi-user.target
>
> Conflicts=obmc-chassis-poweroff@%i.target
>
> RefuseManualStart=yes
>
> RefuseManualStop=yes
>
>
> Thanks
> Harley
> ------------------------------------------------------------------------
> *发件人:* openbmc 
> <openbmc-bounces+zhouyuanqing8=outlook.com at lists.ozlabs.org> 代表 Sui 
> Chen <suichen6 at gmail.com>
> *发送时间:* 2020年4月21日 1:05
> *收件人:* openbmc at lists.ozlabs.org <openbmc at lists.ozlabs.org>
> *主题:* Re: Call for Gardening Tasks
>
> > On Apr 11, 2020, at 8:15 AM, Andrew Geissler <geissonator at gmail.com> wrote:
>
> > Systemd Visualization
>
> > Another complicated area of OpenBMC is our systemd targets and services. Building on the upstream 
> tools to visualize our systemd targets and services would be useful to 
> new people.
>
> +1 to visualization, and I have a few thoughts on this ---
>
> My lacking a mental model of how an OpenBMC system works had been my 
> pain point in the first few months working with OpenBMC (I’m a bit new 
> to this area), so after learning the minimal set of survival skills I 
> did something similar to what you mentioned – visualizing the messages 
> passed between different dbus peers (and conveniently, IPMI traffic, 
> as IPMI-related dbus messages exposing all IPMI payload comprise most 
> of the dbus traffic on that particular system I was working on.)
>
> I think packet analysis tools such as Wireshark and graphics frame 
> analysis tools such as RenderDoc, or system event-based Windows 
> Performance tool like GPUView provide great examples of what people 
> might expect to achieve with a visualization tool: capture, inspect 
> and (sometimes) playback, across multiple layers in the 
> software/hardware stack. Many similar existing tools process sequences 
> of events, and in this case of BMCs, the events could be dbus 
> messages. I found a prototype visualizer made at work greatly helpful 
> in explaining to new team members some basic concepts and the IPMI 
> stack on the BMC.
>
> The IPMI stack is interesting because it’s one noticeable workload on 
> the particular BMC system I had been working on; in my current limited 
> understanding, having lots of I/O capability to connect to hundreds of 
> sensors is one of the many features that set apart a BMC chip and a 
> similarly powerful smartphone chip, and the broad use of dbus is what 
> sets apart OpenBMC and the desktop Linux distro I had been using. I 
> heard optimization is best done workload by workload, perhaps this 
> rationale applies to visualization too?
>
> I realize I was mostly talking about visualizing the run-time state of 
> the system rather than build-time, but we could visualize the run-time 
> aspect of systemd units too since I have seen many times a dbus 
> message eventually triggering a systemd target to acutate the system, 
> so it would be good to consider both dbus and systemd (and maybe other 
> parts of the system?) to have a more holistic view of the BMC’s 
> operations.
>
> Thanks
>
> Sui
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200422/e8f347ce/attachment-0001.htm>


More information about the openbmc mailing list