phosphor-modbus: sanitize port name for control object path
Summary: Update the port monitoring control patch [1] so the Control.Port object path segment is derived from the port name with ‘-‘ replaced by ‘_’. D-Bus object paths cannot contain ‘-‘, so platforms whose port names include one (e.g. ttyRS485-8) would otherwise fail to create the control object.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-modbus/+/92404
Test Plan: phosphor-modbus builds with the updated patch and clang-format is clean.
Reviewed By: amithash
Differential Revision: D113616335
fbshipit-source-id: 8bd870a43972e4fd2e883403269ba96f7dab479c
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
OpenBMC
OpenBMC is an open software framework to build a complete Linux image for a Board Management Controller (BMC).
OpenBMC uses the Yocto Project as the underlying building and distro generation framework.
Contents
This repository includes 3 set of layers:
File structure
The Yocto naming pattern is used in this repository. A “
meta-layer“ is used to name a layer or a category of layers. Andrecipe-abcis used to name a recipe. The project will exist as a meta layer itself! Within the Yocto Project’s distribution call this projectmeta-openbmc.The recipes for OpenBMC common layer are found in
common.The BMC SoC layer and board specific layer are grouped together based on the vendor/manufacturer name. For example, all Facebook boards specific code should be in
meta-facebook. Likewise,meta-aspeedincludes source code for Aspeed SoCs.How to build
Note: In the instruction set below, references to for some of the steps is an example only and need to be replaced with the respective platform when setting up for a different platform.
Set up the build environment based on the Yocto Project’s Quick Start Guide.
Clone the OpenBMC repository and other open source repositories:
Initialize a build directory for the platform to build. In the
openbmcdirectory:Choose between
wedge,wedge100,yosemite, or any of the other platforms listed in the meta-facebook directory. After this step, you will be dropped into a build directory,openbmc/build.Start the build within the build directory: In general to build for the platform:
The build process automatically fetches all necessary packages and builds the complete image. The final build results are in
openbmc/build/tmp/deploy/images/<platform>. The root password will be0penBmc, you may change this in the local configuration.Build Artifacts
Kernel & U-Boot Development
By default, OpenBMC build process fetches and build Linux kernel and U-boot directly from GitHub repository.
In the build directory, run
or
This will create local Linux package under /workspace/sources/linux-aspeed for development
FAQ
1- BMC will take care of the controlling the system / fan based on the sensor/device status (I assume it may even shutdown in case of multiple failures or high temperature). How can we debug such issues? Is there any event/critical logs maintained in the the BMC? Can we have list of files which we can be looked into in case of such issues?
Answer: To debug those issues, you will have to refer to the logs. A: For Rest api related issues, please look at the rest logs under /tmp/ (example: /tmp/rest.log). B: For FSCD related issues, please look at the fscd logs for /var/log/ (example: /var/log/fscd.log). C: For mTerm log (data from the X86 CPU side), please look at /var/log/mTerm.log (it’s usually /var/log/mTerm_wedge.log on most platform). D: Some persistent log also go to /mnt/data/ partition. E: For everything else, look at /var/log/messages.
A- For fan RPM, you can run set_fan_speed.sh to change it (use get_fan_speed.sh to read the value back) from the OpenBMC shell. Some platforms, especially storage/compute ones, use fan-util. Those scripts are under /usr/local/bin on the BMC. Please keep in mind that fscd process will change the fan speed RPM based so your changed values won’t stay for long unless you turn off the watchdog and kill fscd. if you want to change the temperature threshold, you will have to modify the codes and build a new BMC image.
How can I contribute?
If you have an application that can be used by different BMCs, you can contribute your application to the OpenBMC common layer.
If you are a BMC SoC vendor, you can contribute your SoC specific drivers to the BMC SoC layer.
If you are a board vendor, you can contribute your board specific configurations and tools to the Board specific layer. If the board uses a new BMC SoC that is not part of the BMC SoC layer, the SoC specific driver contribution to the BMC SoC layer is also required.
License
OpenBMC is Apache licensed, as found in the LICENSE file.