Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"buses": [1, 12]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI:append:kudo = " \
|
||||
file://blacklist.json \
|
||||
"
|
||||
|
||||
do_install:append:kudo () {
|
||||
install -m 0644 -D ${WORKDIR}/blacklist.json ${D}${datadir}/${PN}/blacklist.json
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2020 Ampere Computing LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Ampere Computing LLC mtjade: UART MUX/DEMUX for CPU0 UART0,1,4 and CPU1 UART1
|
||||
# Usage: ampere_uartmux_ctrl.sh <CPU UART port number> <UARTx_MODE>
|
||||
# <UARTx_MODE> of 1 sets CPU To BSP
|
||||
# <UARTx_MODE> of 2 sets SCP1 to SI2
|
||||
|
||||
# Provide source directive to shellcheck.
|
||||
# shellcheck source=meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh
|
||||
source /usr/libexec/kudo-fw/kudo-lib.sh
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Ampere UART MUX CTRL UART port $1 to mode" > /dev/ttyS0
|
||||
|
||||
case "$1" in
|
||||
ttyS1)
|
||||
set_gpio_ctrl S0_UART0_BMC_SEL 1
|
||||
;;
|
||||
ttyS3)
|
||||
set_gpio_ctrl S0_UART1_BMC_SEL 1
|
||||
set_gpio_ctrl S1_UART1_BMC_SEL 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid tty passed to $0. Exiting!" > /dev/ttyS0
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Phosphor Console Muxer listening on device /dev/%I
|
||||
BindsTo=dev-%i.device
|
||||
After=dev-%i.device
|
||||
StartLimitBurst=3
|
||||
StartLimitIntervalSec=300
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/libexec/obmc-console/kudo_uart_mux_ctrl.sh %i
|
||||
ExecStart=/usr/sbin/obmc-console-server --config /etc/obmc-console/server.%i.conf %i
|
||||
SyslogIdentifier=obmc-console-server
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
TimeoutStartSec=60
|
||||
TimeoutStopSec=60
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,3 @@
|
||||
baud = 115200
|
||||
logfile = /var/log/obmc-console-cpu.log
|
||||
logsize = 1M
|
||||
@@ -0,0 +1,4 @@
|
||||
baud = 115200
|
||||
console-id = ttyS3
|
||||
logfile = /var/log/obmc-console-scp.log
|
||||
logsize = 1M
|
||||
@@ -0,0 +1,27 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
RDEPENDS:${PN}:append:kudo = " bash"
|
||||
|
||||
OBMC_CONSOLE_TTYS = "ttyS1 ttyS3"
|
||||
|
||||
SRC_URI:append:kudo = " file://${BPN}@.service \
|
||||
file://kudo_uart_mux_ctrl.sh \
|
||||
file://server.ttyS1.conf \
|
||||
file://server.ttyS3.conf \
|
||||
"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}:append:kudo = " \
|
||||
${BPN}@.service \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
# Overwrite base package's obmc-console@.service with our own
|
||||
install -m 0644 ${WORKDIR}/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service
|
||||
install -d ${D}${libexecdir}/${PN}
|
||||
install -m 0755 ${WORKDIR}/kudo_uart_mux_ctrl.sh ${D}${libexecdir}/${PN}/kudo_uart_mux_ctrl.sh
|
||||
}
|
||||
|
||||
pkg_postinst:${PN}:append () {
|
||||
systemctl --root=$D enable obmc-console@ttyS1.service
|
||||
systemctl --root=$D enable obmc-console@ttyS3.service
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
SUMMARY = "Initialize PWM sensors"
|
||||
DESCRIPTION = "Initialize PWM sensors"
|
||||
LICENSE = "CLOSED"
|
||||
PR = "r1"
|
||||
|
||||
inherit systemd
|
||||
|
||||
DEPENDS = "systemd"
|
||||
RDEPENDS:${PN} = "bash"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
SRC_URI += " \
|
||||
file://pwm_init.service \
|
||||
file://bin/pwm_init.sh \
|
||||
"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}"
|
||||
SYSTEMD_AUTO_ENABLE = "enable"
|
||||
SYSTEMD_SERVICE:${PN} += "pwm_init.service"
|
||||
|
||||
FILES:${PN} += "${bindir}/* ${systemd_system_unitdir}/*"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${libexecdir}/${PN}
|
||||
install -m 0755 ${S}/bin/* ${D}${libexecdir}/${PN}/
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${S}/*.service ${D}${systemd_system_unitdir}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Set all fans to pwm mode.
|
||||
|
||||
# Provide source directive to shellcheck.
|
||||
# shellcheck source=meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh
|
||||
source /usr/libexec/kudo-fw/kudo-lib.sh
|
||||
|
||||
# Set all pwm_enable to 1
|
||||
find /sys/class/hwmon/hwmon*/ -name 'pwm*_enable' -exec bash -c 'echo "$1" && echo 1 > "$1" && cat "$1"' -- {} \;
|
||||
|
||||
for i in {0..5}
|
||||
do
|
||||
fan_pwm_rate_of_change=0x$(printf '%02x' $((8 + i)) | \
|
||||
awk '{print $1}')
|
||||
# Set Fan PWM Rate-of-Change Bits(bits 4:2) to 000b
|
||||
# Register 08h to 0Dh
|
||||
oriRegVal=$(i2cget -y -f "${I2C_FANCTRL[0]}" 0x"${I2C_FANCTRL[1]}" \
|
||||
"${fan_pwm_rate_of_change}")
|
||||
updateVal=$((oriRegVal & 0xe3))
|
||||
updateVal=0x$(printf "%x" ${updateVal})
|
||||
i2cset -y -f "${I2C_FANCTRL[0]}" 0x"${I2C_FANCTRL[1]}" \
|
||||
"${fan_pwm_rate_of_change}" "${updateVal}"
|
||||
done
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Init PWM sensors
|
||||
Before=xyz.openbmc_project.fansensor.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/libexec/pwm-init/pwm_init.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=xyz.openbmc_project.fansensor.service
|
||||
@@ -0,0 +1,12 @@
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-ipmi-blobs"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-ipmi-blobs-binarystore"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-ipmi-ethstats"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-ipmi-flash"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-ipmi-net"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-ipmi-host"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-host-postd"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-logging"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-sel-logger"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " entity-manager"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " dbus-sensors"
|
||||
OBMC_IMAGE_EXTRA_INSTALL:append:kudo = " phosphor-virtual-sensor"
|
||||
@@ -0,0 +1,4 @@
|
||||
EXTRA_OEMESON:append:kudo = " \
|
||||
-Dredfish-dump-log=enabled \
|
||||
-Dredfish-bmc-journal=enabled \
|
||||
"
|
||||
@@ -0,0 +1,5 @@
|
||||
[{
|
||||
"blobBaseId": "/skm/hss/",
|
||||
"sysFilePath": "/sys/bus/i2c/devices/i2c-4/i2c-33/33-0055/eeprom",
|
||||
"offsetBytes": 0
|
||||
}]
|
||||
@@ -0,0 +1,8 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
SRC_URI:append:kudo = " file://config.json"
|
||||
FILES:${PN}:append:kudo = " ${datadir}/binaryblob/config.json"
|
||||
|
||||
do_install:append:kudo() {
|
||||
install -d ${D}${datadir}/binaryblob/
|
||||
install ${WORKDIR}/config.json ${D}${datadir}/binaryblob/config.json
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
|
||||
# Remove unused entity-map JSON
|
||||
do_install:append:kudo() {
|
||||
rm ${D}${datadir}/ipmi-providers/entity-map.json
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
{"id": 0, "revision": 1, "addn_dev_support": 133,
|
||||
"manuf_id": 17084, "prod_id": 1, "aux": 0}
|
||||
@@ -0,0 +1,3 @@
|
||||
PACKAGECONFIG:append:kudo = " nuvoton-p2a-mbox net-bridge"
|
||||
|
||||
IPMI_FLASH_BMC_ADDRESS:kudo = "0xF0848000"
|
||||
@@ -0,0 +1 @@
|
||||
CHASSIS_TARGETS = ""
|
||||
@@ -0,0 +1,2 @@
|
||||
# Enable threshold, pulse, and watchdog monitoring; enable clear SEL method
|
||||
PACKAGECONFIG:append:kudo = " log-threshold log-pulse log-watchdog clears-sel"
|
||||
+302
@@ -0,0 +1,302 @@
|
||||
[
|
||||
{
|
||||
"Desc":{
|
||||
"Name":"CPU0_NBM_T",
|
||||
"SensorType":"temperature",
|
||||
"MinValue":0,
|
||||
"MaxValue":160
|
||||
},
|
||||
"Threshold":
|
||||
{
|
||||
"CriticalHigh":110,
|
||||
"WarningHigh":108
|
||||
},
|
||||
"Associations":[
|
||||
[
|
||||
"chassis",
|
||||
"all_sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
],
|
||||
[
|
||||
"inventory",
|
||||
"sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
]
|
||||
],
|
||||
"Params":{
|
||||
"DbusParam":[
|
||||
{
|
||||
"ParamName":"CPU0_NBM2G_TMP_V",
|
||||
"Desc":{
|
||||
"Name":"CPU0_NBM2G_TMP_V",
|
||||
"SensorType":"voltage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_NBM4G_TMP_V",
|
||||
"Desc":{
|
||||
"Name":"CPU0_NBM4G_TMP_V",
|
||||
"SensorType":"voltage"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Expression":"(CPU0_NBM4G_TMP_V == CPU0_NBM4G_TMP_V) ? (CPU0_NBM4G_TMP_V - 1.911) / 0.007 : (CPU0_NBM2G_TMP_V == CPU0_NBM2G_TMP_V) ? (CPU0_NBM2G_TMP_V - 2.73) * 100 : NULL"
|
||||
},
|
||||
{
|
||||
"Desc":{
|
||||
"Name":"CPU0_DIMMG_T",
|
||||
"SensorType":"temperature",
|
||||
"MinValue":0,
|
||||
"MaxValue":255
|
||||
},
|
||||
"Threshold":
|
||||
{
|
||||
"CriticalHigh":90,
|
||||
"WarningHigh":85
|
||||
},
|
||||
"Associations":[
|
||||
[
|
||||
"chassis",
|
||||
"all_sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
],
|
||||
[
|
||||
"inventory",
|
||||
"sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
]
|
||||
],
|
||||
"Params":{
|
||||
"DbusParam":[
|
||||
{
|
||||
"ParamName":"CPU0_CH0",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH0DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH1",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH1DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH2",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH2DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH3",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH3DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH4",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH4DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH5",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH5DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH6",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH6DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_CH7",
|
||||
"Desc":{
|
||||
"Name":"CPU0_CH7DIMM_T",
|
||||
"SensorType":"temperature"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Expression":"var x := max((CPU0_CH0 == CPU0_CH0) ? CPU0_CH0 : 0,(CPU0_CH1 == CPU0_CH1) ? CPU0_CH1 : 0,(CPU0_CH2 == CPU0_CH2) ? CPU0_CH2 : 0,(CPU0_CH3 == CPU0_CH3) ? CPU0_CH3 : 0,(CPU0_CH4 == CPU0_CH4) ? CPU0_CH4 : 0,(CPU0_CH5 == CPU0_CH5) ? CPU0_CH5 : 0,(CPU0_CH6 == CPU0_CH6) ? CPU0_CH6 : 0,(CPU0_CH7 == CPU0_CH7) ? CPU0_CH7 : 0); x == 0 ? NULL : x"
|
||||
},
|
||||
{
|
||||
"Desc":{
|
||||
"Name":"CPU0_DIMM_DDR_V",
|
||||
"SensorType":"voltage",
|
||||
"MinValue":0,
|
||||
"MaxValue":5
|
||||
},
|
||||
"Threshold":
|
||||
{
|
||||
"CriticalHigh":2.999
|
||||
},
|
||||
"Associations":[
|
||||
[
|
||||
"chassis",
|
||||
"all_sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
],
|
||||
[
|
||||
"inventory",
|
||||
"sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
]
|
||||
],
|
||||
"Params":{
|
||||
"DbusParam":[
|
||||
{
|
||||
"ParamName":"CPU0_DIMM_VR1_V",
|
||||
"Desc":{
|
||||
"Name":"CPU0_DIMM_VR1_V",
|
||||
"SensorType":"voltage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_DIMM_VR2_V",
|
||||
"Desc":{
|
||||
"Name":"CPU0_DIMM_VR2_V",
|
||||
"SensorType":"voltage"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Expression":"(CPU0_DIMM_VR1_V + CPU0_DIMM_VR2_V) >= 0 ? (CPU0_DIMM_VR1_V + CPU0_DIMM_VR2_V) : NULL"
|
||||
},
|
||||
{
|
||||
"Desc":{
|
||||
"Name":"CPU0_MEM_PW",
|
||||
"SensorType":"power",
|
||||
"MinValue":0,
|
||||
"MaxValue":200
|
||||
},
|
||||
"Threshold":
|
||||
{
|
||||
"CriticalHigh":100
|
||||
},
|
||||
"Associations":[
|
||||
[
|
||||
"chassis",
|
||||
"all_sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
],
|
||||
[
|
||||
"inventory",
|
||||
"sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
]
|
||||
],
|
||||
"Params":{
|
||||
"DbusParam":[
|
||||
{
|
||||
"ParamName":"CPU0_DIMM_VR1_PW",
|
||||
"Desc":{
|
||||
"Name":"CPU0_DIMM_VR1_PW",
|
||||
"SensorType":"power"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_DIMM_VR2_PW",
|
||||
"Desc":{
|
||||
"Name":"CPU0_DIMM_VR2_PW",
|
||||
"SensorType":"power"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Expression":"(CPU0_DIMM_VR1_PW + CPU0_DIMM_VR2_PW) >= 0 ? (CPU0_DIMM_VR1_PW + CPU0_DIMM_VR2_PW) : NULL"
|
||||
},
|
||||
{
|
||||
"Desc":{
|
||||
"Name":"CPU0_CPU_PW",
|
||||
"SensorType":"power",
|
||||
"MinValue":0,
|
||||
"MaxValue":550
|
||||
},
|
||||
"Threshold":
|
||||
{
|
||||
"CriticalHigh":500
|
||||
},
|
||||
"Associations":[
|
||||
[
|
||||
"chassis",
|
||||
"all_sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
],
|
||||
[
|
||||
"inventory",
|
||||
"sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
]
|
||||
],
|
||||
"Params":{
|
||||
"DbusParam":[
|
||||
{
|
||||
"ParamName":"CPU0_Core_VRD_PW",
|
||||
"Desc":{
|
||||
"Name":"CPU0_Core_VRD_PW",
|
||||
"SensorType":"power"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ParamName":"CPU0_SOC_PW",
|
||||
"Desc":{
|
||||
"Name":"CPU0_SOC_PW",
|
||||
"SensorType":"power"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Expression":"(CPU0_Core_VRD_PW + CPU0_SOC_PW) >= 0 ? (CPU0_Core_VRD_PW + CPU0_SOC_PW) : NULL"
|
||||
},
|
||||
{
|
||||
"Desc":
|
||||
{
|
||||
"Name": "zone0_temp",
|
||||
"SensorType": "temperature",
|
||||
"MinValue": 0,
|
||||
"MaxValue": 300
|
||||
},
|
||||
"Threshold" :
|
||||
{
|
||||
"CriticalHigh": 200,
|
||||
"WarningHigh": 198
|
||||
},
|
||||
"Associations":[
|
||||
[
|
||||
"chassis",
|
||||
"all_sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
],
|
||||
[
|
||||
"inventory",
|
||||
"sensors",
|
||||
"/xyz/openbmc_project/inventory/system/board/Kudo_Motherboard"
|
||||
]
|
||||
],
|
||||
"Params":
|
||||
{
|
||||
"DbusParam":
|
||||
[
|
||||
{
|
||||
"ParamName": "margin0",
|
||||
"Desc":
|
||||
{
|
||||
"Name": "thermal_zone0",
|
||||
"SensorType": "temperature"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Expression": "(200 - margin0)"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
|
||||
inherit systemd
|
||||
RDEPENDS:${PN} += "bash"
|
||||
|
||||
SRC_URI:append:kudo = " \
|
||||
file://virtual_sensor_config.json \
|
||||
"
|
||||
do_install:append:kudo() {
|
||||
install -d ${D}${datadir}
|
||||
install -m 0644 ${WORKDIR}/virtual_sensor_config.json ${D}${datadir}/phosphor-virtual-sensor/virtual_sensor_config.json
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/xyz/openbmc_project/control/chassis0/chassiscapabilities:
|
||||
- Interface: xyz.openbmc_project.Control.ChassisCapabilities
|
||||
Properties:
|
||||
CapabilitiesFlags:
|
||||
Default: 32
|
||||
ChassisIntrusionEnabled:
|
||||
Default: 'true'
|
||||
ChassisFrontPanelLockoutEnabled:
|
||||
Default: 'true'
|
||||
ChassisNMIEnabled:
|
||||
Default: 'true'
|
||||
ChassisPowerInterlockEnabled:
|
||||
Default: 'true'
|
||||
FRUDeviceAddress:
|
||||
Default: 32
|
||||
SDRDeviceAddress:
|
||||
Default: 32
|
||||
SELDeviceAddress:
|
||||
Default: 32
|
||||
SMDeviceAddress:
|
||||
Default: 32
|
||||
BridgeDeviceAddress:
|
||||
Default: 32
|
||||
@@ -0,0 +1,2 @@
|
||||
FILESEXTRAPATHS:append:kudo := ":${THISDIR}/${PN}"
|
||||
SRC_URI:append:kudo = " file://chassis_capabilities.override.yml"
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"gpio_configs": {
|
||||
|
||||
"power_config": {
|
||||
"power_good_in": "PGOOD",
|
||||
"power_up_outs": [
|
||||
],
|
||||
"reset_outs": [
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"gpio_definitions": [
|
||||
{
|
||||
"name": "PGOOD",
|
||||
"num": 200,
|
||||
"direction": "in"
|
||||
},
|
||||
{
|
||||
"name": "POWER_BUTTON",
|
||||
"num": 192,
|
||||
"direction": "both"
|
||||
},
|
||||
{
|
||||
"name": "RESET_BUTTON",
|
||||
"num": 13,
|
||||
"direction": "both"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FILESEXTRAPATHS:append:kudo := ":${THISDIR}/${PN}"
|
||||
SRC_URI:append:kudo = " file://gpio_defs.json"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
PACKAGECONFIG:append:kudo = " smbios-ipmi-blob"
|
||||
|
||||
PACKAGECONFIG:remove:kudo = " cpuinfo"
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Phosphor Chassis%i State Manager
|
||||
Before=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
|
||||
After=org.openbmc.control.Power@%i.service
|
||||
After=host-powerctrl.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/bin/sleep 5
|
||||
ExecStart=/usr/bin/phosphor-chassis-state-manager --chassis %i
|
||||
Restart=always
|
||||
Type=dbus
|
||||
BusName=xyz.openbmc_project.State.Chassis%i
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Phosphor Host%i State Manager
|
||||
Wants=mapper-wait@-xyz-openbmc_project-control-host%i-auto_reboot.service
|
||||
After=mapper-wait@-xyz-openbmc_project-control-host%i-auto_reboot.service
|
||||
Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
|
||||
After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
|
||||
After=phosphor-ipmi-host.service
|
||||
Before=obmc-host-reset@%i.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/phosphor-host-state-manager --host %i
|
||||
Restart=always
|
||||
Type=dbus
|
||||
BusName=xyz.openbmc_project.State.Host%i
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,52 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
|
||||
DEPENDS:append:kudo = " gpioplus"
|
||||
|
||||
STATE_MGR_PACKAGES:remove:kudo = " ${PN}-host-check"
|
||||
RRECOMMENDS:${PN}-host:remove:kudo = " ${PN}-host-check"
|
||||
EXTRA_OEMESON:append:kudo = " -Dhost-gpios=enabled"
|
||||
|
||||
FILES:${PN}:append:kudo = " ${systemd_system_unitdir}/*"
|
||||
FILES:${PN}-host:append:kudo = " ${bindir}/phosphor-host-condition-gpio"
|
||||
SYSTEMD_SERVICE:${PN}-host:append:kudo = " phosphor-host-condition-gpio@.service"
|
||||
|
||||
pkg_postinst:${PN}-obmc-targets:prepend:kudo() {
|
||||
mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
|
||||
LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@0.service"
|
||||
TARGET="../phosphor-host-condition-gpio@.service"
|
||||
ln -s $TARGET $LINK
|
||||
}
|
||||
|
||||
pkg_postinst:${PN}-obmc-targets:append:kudo() {
|
||||
rm "$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
|
||||
|
||||
rm "$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
|
||||
rm "$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
|
||||
|
||||
rm "$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
|
||||
rm "$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
|
||||
|
||||
rm "$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
|
||||
rm "$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
|
||||
|
||||
rm "$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
|
||||
}
|
||||
|
||||
pkg_prerm:${PN}-obmc-targets:prepend:kudo() {
|
||||
LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@0.service"
|
||||
rm $LINK
|
||||
}
|
||||
|
||||
SRC_URI:append:kudo = " \
|
||||
file://xyz.openbmc_project.State.Chassis@.service \
|
||||
file://xyz.openbmc_project.State.Host@.service \
|
||||
"
|
||||
|
||||
do_install:append:kudo() {
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/xyz.openbmc_project.State.Chassis@.service ${D}${systemd_system_unitdir}/xyz.openbmc_project.State.Chassis@.service
|
||||
install -m 0644 ${WORKDIR}/xyz.openbmc_project.State.Host@.service ${D}${systemd_system_unitdir}/xyz.openbmc_project.State.Host@.service
|
||||
rm -f ${D}${systemd_system_unitdir}/phosphor-reset-host-check@.service
|
||||
rm -f ${D}${systemd_system_unitdir}/phosphor-reset-host-running@.service
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Watchdog power state power hotswap
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/usr/sbin/kudo.sh rst hotswap
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Watchdog power state power cycle shutdown
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/usr/libexec/ampere-hostctrl/ampere_power_util.sh mb off
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Watchdog power state reset system
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/usr/libexec/ampere-hostctrl/ampere_power_util.sh mb host_reset
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Phosphor Watchdog
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/env phosphor-watchdog --continue --service=xyz.openbmc_project.Watchdog \
|
||||
--path=/xyz/openbmc_project/watchdog/host0 \
|
||||
--action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
|
||||
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=phosphor-watchdog-host-poweroff.service \
|
||||
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \
|
||||
|
||||
# This should use state manager instead of the service files currently defined
|
||||
|
||||
SyslogIdentifier=phosphor-watchdog
|
||||
BusName=xyz.openbmc_project.Watchdog
|
||||
Type=dbus
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
@@ -0,0 +1,9 @@
|
||||
FILESEXTRAPATHS:prepend:kudo := "${THISDIR}/${PN}:"
|
||||
|
||||
# Remove the override to keep service running after DC cycle
|
||||
SYSTEMD_OVERRIDE:${PN}:remove:kudo = "poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf"
|
||||
SYSTEMD_SERVICE:${PN}:kudo = " phosphor-watchdog.service \
|
||||
phosphor-watchdog-host-poweroff.service \
|
||||
phosphor-watchdog-host-cycle.service\
|
||||
phosphor-watchdog-host-reset.service\
|
||||
"
|
||||
Reference in New Issue
Block a user