Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=mga12.intel.com (client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=yong.b.li@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 496Tdy5vyGzDqtQ for ; Wed, 22 Apr 2020 15:34:40 +1000 (AEST) IronPort-SDR: bp2bvF1Zdo5Q4r51/JMryhpZ4xSKWLFk4JEj/GjW6QLdEgKJTKqHXY0CHH8h6//BMfEEmvyvaU hsKTMm7PVkCw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 22:34:38 -0700 IronPort-SDR: eDGDMkTobxYGHfCQu5in2KiTEz1TS/axllHg32htW2nqq8ACtEl/kgNxkadFuiXYtViAMADCGV KDcxL201J3CA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208,217";a="456373236" Received: from yongli3-mobl1.ccr.corp.intel.com (HELO [10.238.5.105]) ([10.238.5.105]) by fmsmga005.fm.intel.com with ESMTP; 21 Apr 2020 22:34:35 -0700 Subject: =?UTF-8?B?UmU6IGFib3V0IHBvd2VyIGNvbnRyb2wu5Zue5aSNOiBDYWxsIGZvciBH?= =?UTF-8?Q?ardening_Tasks?= To: "zhouyuanqing8@outlook.com" , Sui Chen , "openbmc@lists.ozlabs.org" Cc: "uperic@163.com" , "shinerocky@yahoo.com" References: <5e9dd66f.1c69fb81.45fc6.0118@mx.google.com> From: "Li, Yong" Message-ID: <12c67029-2a01-13c6-de2e-9721d85c4ec7@linux.intel.com> Date: Wed, 22 Apr 2020 13:34:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------E565549C4BF89AD3993BC1AF" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 05:34:48 -0000 This is a multi-part message in MIME format. --------------E565549C4BF89AD3993BC1AF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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@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 > 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@.target >   c).systemd find the obmc-power-start@.target > d).systemd find the op-power-start@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@0.target.requires > > op-power-start@0.serviceop-wait-power-on@0.service > > > cat obmc-chassis-poweron@.target > > [Unit] > > Description=Chassis%i (Power On) > > Wants=multi-user.target > > After=multi-user.target > > Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service > > After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service > > Wants=mapper-subtree-remove@-xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service > > After=mapper-subtree-remove@-xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service > > > cat op-power-start@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@-org-openbmc-control-power%i.service > > After=mapper-wait@-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@.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 > 代表 Sui > Chen > *发送时间:* 2020年4月21日 1:05 > *收件人:* openbmc@lists.ozlabs.org > *主题:* Re: Call for Gardening Tasks > > > On Apr 11, 2020, at 8:15 AM, Andrew Geissler 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 > --------------E565549C4BF89AD3993BC1AF Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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@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 uses 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@.target
        c).systemd find the obmc-power-start@.target
        d).systemd find the op-power-start@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@0.target.requires

op-power-start@0.service  op-wait-power-on@0.service


cat obmc-chassis-poweron@.target 

[Unit]

Description=Chassis%i (Power On)

Wants=multi-user.target

After=multi-user.target

Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service

After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service

Wants=mapper-subtree-remove@-xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service

After=mapper-subtree-remove@-xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service


cat op-power-start@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@-org-openbmc-control-power%i.service

After=mapper-wait@-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@.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@lists.ozlabs.org> 代表 Sui Chen <suichen6@gmail.com>
发送时间: 2020年4月21日 1:05
收件人: openbmc@lists.ozlabs.org <openbmc@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

--------------E565549C4BF89AD3993BC1AF--