Thank you for the help, I will test it.


发件人: Konstantin Klubnichkin <kitsok@yandex-team.ru>
发送时间: 2020年4月22日 15:25
收件人: zhouyuanqing8@outlook.com <zhouyuanqing8@outlook.com>; Sui Chen <suichen6@gmail.com>; openbmc@lists.ozlabs.org <openbmc@lists.ozlabs.org>
抄送: uperic@163.com <uperic@163.com>; shinerocky@yahoo.com <shinerocky@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@outlook.com" <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.servicop-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.servic

[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 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