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

zhouyuanqing8 at outlook.com zhouyuanqing8 at outlook.com
Wed Apr 22 22:38:52 AEST 2020


Thank you for the help, I will test it.

________________________________
发件人: Konstantin Klubnichkin <kitsok at yandex-team.ru>
发送时间: 2020年4月22日 15:25
收件人: zhouyuanqing8 at outlook.com <zhouyuanqing8 at outlook.com>; Sui Chen <suichen6 at gmail.com>; openbmc at lists.ozlabs.org <openbmc at lists.ozlabs.org>
抄送: uperic at 163.com <uperic at 163.com>; shinerocky at yahoo.com <shinerocky at yahoo.com>
主题: Re: about power control.回复: Call for Gardening Tasks

Hello!

I'll try to answer your question about rwfs image.
I had the same issue plus I wanted to be able to create some data in rwfs segment.
Thus I've created obmc-phosphor-image.bbappend where I do the following:
======================================================================
RWFS_SIZE ?= "4194304"
OVERLAY_MKFS_OPTS = " --pad=${RWFS_SIZE}"

# Override JFFS image creation
do_generate_rwfs_static() {
rwdir=$(pwd)
rwdir=${rwdir}/jffs2
image=rwfs.jffs2

rm -rf $rwdir $image > /dev/null 2>&1
mkdir -p ${rwdir}/cow
rwdir=${rwdir}/cow

bbplain "DEBUG: Creating RWFS image "

mv ${IMAGE_ROOTFS}/rwfs/* ${rwdir}/
rm -rf ${IMAGE_ROOTFS}/rwfs

# Create necessary files, directories, etc in ${rwdir}
${JFFS2_RWFS_CMD} ${OVERLAY_MKFS_OPTS} ${OVERLAY_MKFS_OPTS} --squash-uids
}
======================================================================

At the end I have the normal JFFS2 image instead of empty.

Hope this can help.

21.04.2020, 18:24, "zhouyuanqing8 at outlook.com" <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 uses systemd<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<mailto: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<mailto:obmc-chassis-poweron at 0.target.requires>

op-power-start at 0.servic<mailto:op-power-start at 0.servic>e  op-wait-power-on at 0.service<mailto:op-wait-power-on at 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<mailto:Wants=mapper-wait at -xyz-openbmc_project-state-chassis%i.service>

After=mapper-wait at -xyz-openbmc_project-state-chassis%i.service<mailto: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.servic<mailto:op-power-start at 0.servic>e

[Unit]

Description=Start Power%i

Wants=obmc-power-start@%i.target<mailto:Wants=obmc-power-start@%i.target>

Before=obmc-power-start@%i.target<mailto:Before=obmc-power-start@%i.target>

After=obmc-power-start-pre@%i.target<mailto:After=obmc-power-start-pre@%i.target>

After=obmc-fan-control.target

Wants=mapper-wait at -org-openbmc-control-power%i.service<mailto:Wants=mapper-wait at -org-openbmc-control-power%i.service>

After=mapper-wait at -org-openbmc-control-power%i.service<mailto: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<mailto:WantedBy=obmc-host-start@%i.target>



cat obmc-power-start at .target

[Unit]

Description=Power%i On

After=obmc-power-start-pre@%i.target<mailto:After=obmc-power-start-pre@%i.target>

Wants=multi-user.target

Conflicts=obmc-chassis-poweroff@%i.target<mailto:Conflicts=obmc-chassis-poweroff@%i.target>

RefuseManualStart=yes

RefuseManualStop=yes


Thanks
Harley
________________________________
发件人: openbmc <openbmc-bounces+zhouyuanqing8=outlook.com at lists.ozlabs.org<mailto:openbmc-bounces+zhouyuanqing8=outlook.com at lists.ozlabs.org>> 代表 Sui Chen <suichen6 at gmail.com<mailto:suichen6 at gmail.com>>
发送时间: 2020年4月21日 1:05
收件人: openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org> <openbmc at lists.ozlabs.org<mailto: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 C 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



--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200422/4a30878c/attachment-0001.htm>


More information about the openbmc mailing list