Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,16 @@
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53"
inherit cmake pkgconfig systemd
SRC_URI = "git://github.com/openbmc/host-error-monitor;branch=master;protocol=https"
DEPENDS = "boost sdbusplus libgpiod libpeci"
PV = "0.1+git${SRCPV}"
SRCREV = "72d391886119d11c48d61d8b1bda2c28e2a7e5cd"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.HostErrorMonitor.service"
EXTRA_OECMAKE = "-DYOCTO=1"
@@ -0,0 +1,9 @@
[Unit]
Description=Rotate the event logs
[Service]
Type=simple
ExecStart=/usr/bin/rotate-event-logs.sh
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,10 @@
#!/bin/sh
while true; do
sleep 60
/usr/sbin/logrotate /etc/logrotate.d/*.rsyslog
ec=$?
if [ $ec -ne 0 ] ; then
echo "logrotate failed ($ec)"
fi
done
@@ -0,0 +1,2 @@
[Service]
ExecReload=/bin/kill -HUP $MAINPID
@@ -0,0 +1,79 @@
# if you experience problems, check
# http://www.rsyslog.com/troubleshoot for assistance
# rsyslog v3: load input modules
# If you do not load inputs, nothing happens!
# You may need to set the module load path if modules are not found.
#
# Ported from debian's sysklogd.conf
# Journal-style logging
# Limit to no more than 4000 entries in one minute and enable the
# journal workaround to avoid duplicate entries
module(load="imjournal" StateFile="/var/log/state"
RateLimit.Interval="60"
RateLimit.Burst="4000")
# Template for IPMI SEL messages
# "<timestamp> <ID>,<Type>,<EventData>,[<Generator ID>,<Path>,<Direction>]"
template(name="IPMISELTemplate" type="list") {
property(name="timereported" dateFormat="rfc3339")
constant(value=" ")
property(name="$!IPMI_SEL_RECORD_ID")
constant(value=",")
property(name="$!IPMI_SEL_RECORD_TYPE")
constant(value=",")
property(name="$!IPMI_SEL_DATA")
constant(value=",")
property(name="$!IPMI_SEL_GENERATOR_ID")
constant(value=",")
property(name="$!IPMI_SEL_SENSOR_PATH")
constant(value=",")
property(name="$!IPMI_SEL_EVENT_DIR")
constant(value="\n")
}
# Template for Redfish messages
# "<timestamp> <MessageId>,<MessageArgs>"
template(name="RedfishTemplate" type="list") {
property(name="timereported" dateFormat="rfc3339")
constant(value=" ")
property(name="$!REDFISH_MESSAGE_ID")
constant(value=",")
property(name="$!REDFISH_MESSAGE_ARGS")
constant(value="\n")
}
# Template for Application Crashes
# "<timestamp> <MessageId>,<MessageArgs>"
template(name="CrashTemplate" type="list") {
property(name="timereported" dateFormat="rfc3339")
constant(value=" ")
constant(value="OpenBMC.0.1.ServiceFailure")
constant(value=",")
property(name="$!UNIT")
constant(value="\n")
}
# If the journal entry has the IPMI SEL MESSAGE_ID, save as IPMI SEL
# The MESSAGE_ID string is generated using journalctl and must match the
# MESSAGE_ID used in IPMI to correctly find the SEL entries.
if ($!MESSAGE_ID == "b370836ccf2f4850ac5bee185b77893a") then {
action(type="omfile" file="/var/log/ipmi_sel" template="IPMISELTemplate")
}
# If the journal entry has a Redfish MessageId, save as a Redfish event
if ($!REDFISH_MESSAGE_ID != "") then {
action(type="omfile" file="/var/log/redfish" template="RedfishTemplate")
}
# If the journal entry has a Exit Code, save as a Redfish event
if ($!EXIT_STATUS != "" and $!EXIT_STATUS != "0") then {
action(type="omfile" file="/var/log/redfish" template="CrashTemplate")
}
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
@@ -0,0 +1,22 @@
# /etc/logrotate.d/rsyslog - Ported from Debian
# Keep up to four 64k files for ipmi_sel (256k total)
/var/log/ipmi_sel
{
rotate 3
size 64k
missingok
postrotate
systemctl reload rsyslog 2> /dev/null || true
endscript
}
# Keep up to four 64k files for redfish (256k total)
/var/log/redfish
{
rotate 3
size 64k
missingok
postrotate
systemctl reload rsyslog 2> /dev/null || true
endscript
}
@@ -0,0 +1,24 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://rsyslog.conf \
file://rsyslog.logrotate \
file://rotate-event-logs.service \
file://rotate-event-logs.sh \
file://rsyslog-override.conf \
"
FILES:${PN} += "${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf"
PACKAGECONFIG:append = " imjournal"
do_install:append() {
install -m 0644 ${WORKDIR}/rotate-event-logs.service ${D}${systemd_system_unitdir}
install -d ${D}${systemd_system_unitdir}/rsyslog.service.d
install -m 0644 ${WORKDIR}/rsyslog-override.conf \
${D}${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/rotate-event-logs.sh ${D}/${bindir}/rotate-event-logs.sh
rm ${D}${sysconfdir}/rsyslog.d/imjournal.conf
}
SYSTEMD_SERVICE:${PN} += " rotate-event-logs.service"
@@ -0,0 +1,32 @@
SUMMARY = "Intel OEM IPMI commands"
DESCRIPTION = "Intel OEM IPMI commands"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a4edad4aed50f39a66d098d74b265b"
SRC_URI = "git://github.com/openbmc/intel-ipmi-oem;branch=master;protocol=https"
SRCREV = "84c203d2b74680e9dd60d1c48a2f6ca8f58462bf"
S = "${WORKDIR}/git"
PV = "0.1+git${SRCPV}"
DEPENDS = "boost phosphor-ipmi-host phosphor-logging systemd phosphor-dbus-interfaces libgpiod libtinyxml2"
inherit cmake obmc-phosphor-ipmiprovider-symlink pkgconfig
EXTRA_OECMAKE="-DENABLE_TEST=0 -DYOCTO=1"
LIBRARY_NAMES = "libzinteloemcmds.so"
HOSTIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
NETIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV}"
do_install:append(){
install -d ${D}${includedir}/intel-ipmi-oem
install -m 0644 -D ${S}/include/*.hpp ${D}${includedir}/intel-ipmi-oem
}
@@ -0,0 +1,46 @@
SUMMARY = "OpenBMC for Intel - Applications"
PR = "r1"
inherit packagegroup
PROVIDES = "${PACKAGES}"
PACKAGES = " \
${PN}-chassis \
${PN}-fans \
${PN}-flash \
${PN}-system \
"
PROVIDES += "virtual/obmc-chassis-mgmt"
PROVIDES += "virtual/obmc-fan-mgmt"
PROVIDES += "virtual/obmc-flash-mgmt"
PROVIDES += "virtual/obmc-system-mgmt"
RPROVIDES:${PN}-chassis += "virtual-obmc-chassis-mgmt"
RPROVIDES:${PN}-fans += "virtual-obmc-fan-mgmt"
RPROVIDES:${PN}-flash += "virtual-obmc-flash-mgmt"
RPROVIDES:${PN}-system += "virtual-obmc-system-mgmt"
SUMMARY:${PN}-chassis = "Intel Chassis"
RDEPENDS:${PN}-chassis = " \
x86-power-control \
obmc-host-failure-reboots \
"
SUMMARY:${PN}-fans = "Intel Fans"
RDEPENDS:${PN}-fans = " \
phosphor-pid-control \
"
SUMMARY:${PN}-flash = "Intel Flash"
RDEPENDS:${PN}-flash = " \
"
SUMMARY:${PN}-system = "Intel System"
RDEPENDS:${PN}-system = " \
bmcweb \
entity-manager \
intel-ipmi-oem \
dbus-sensors \
webui-vue \
"
@@ -0,0 +1,23 @@
SUMMARY = "PFR Manager Service"
DESCRIPTION = "Daemon to handle all PFR functionalities"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53"
inherit cmake systemd
SRC_URI = "git://github.com/openbmc/pfr-manager;branch=master;protocol=https"
PV = "0.1+git${SRCPV}"
SRCREV = "1218aa64d109facdd2633f1205e5e4f1be6d8891"
S = "${WORKDIR}/git"
SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.PFR.Manager.service"
DEPENDS += " \
sdbusplus \
phosphor-logging \
boost \
i2c-tools \
libgpiod \
"
@@ -0,0 +1,12 @@
[Unit]
Description=Phosphor-Pid-Control Margin-based Fan Control Daemon
[Service]
Restart=always
ExecStart={bindir}/swampd
RestartSec=5
StartLimitInterval=0
Type=simple
[Install]
WantedBy=basic.target
@@ -0,0 +1,5 @@
FILESEXTRAPATHS:prepend:intel := "${THISDIR}/${PN}:"
inherit obmc-phosphor-systemd
SYSTEMD_SERVICE:${PN}:intel = "phosphor-pid-control.service"
EXTRA_OECONF:intel = "--enable-configure-dbus=yes"
@@ -0,0 +1,4 @@
EXTRA_OEMESON += "-Dredfish-cpu-log=enabled \
-Dredfish-bmc-journal=enabled \
-Drest=disabled"
@@ -0,0 +1,5 @@
do_install:append:intel(){
install -d ${D}${includedir}/phosphor-ipmi-host
install -m 0644 -D ${S}/sensorhandler.hpp ${D}${includedir}/phosphor-ipmi-host
install -m 0644 -D ${S}/selutility.hpp ${D}${includedir}/phosphor-ipmi-host
}
@@ -0,0 +1,16 @@
{
"channels": [
{
"type": "me",
"slave-path": "/dev/ipmb-5",
"bmc-addr": 32,
"remote-addr": 44
},
{
"type": "ipmb",
"slave-path": "/dev/ipmb-13",
"bmc-addr": 32,
"remote-addr": 56
}
]
}
@@ -0,0 +1,8 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:append = " file://ipmb-channels.json"
do_install:append(){
install -m 0644 -D ${WORKDIR}/ipmb-channels.json \
${D}${datadir}/ipmbbridge
}
@@ -0,0 +1,19 @@
SUMMARY = "Phosphor LED Group Management for Intel"
PR = "r1"
inherit obmc-phosphor-utils
inherit native
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
PROVIDES += "virtual/phosphor-led-manager-config-native"
SRC_URI += "file://led.yaml"
S = "${WORKDIR}"
do_install() {
SRC=${S}
DEST=${D}${datadir}/phosphor-led-manager
install -D ${SRC}/led.yaml ${DEST}/led.yaml
}
@@ -0,0 +1,36 @@
bmc_booted:
power_on:
status_ok:
status_green:
Action: 'On'
status_amber:
Action: 'Off'
status_degraded:
status_green:
Action: 'Blink'
DutyOn: 50
Period: 1000
status_amber:
Action: 'Off'
status_non_critical:
status_green:
Action: 'Off'
status_amber:
Action: 'Blink'
DutyOn: 50
Period: 1000
status_critical:
status_green:
Action: 'Off'
status_amber:
Action: 'On'
enclosure_identify:
identify:
Action: 'On'
@@ -0,0 +1 @@
PACKAGECONFIG:append:intel = " log-threshold"
@@ -0,0 +1,8 @@
{
"customKeyEnable": true,
"keyType" : "VT100+",
"customConsoleDisplaySize": {
"width": 100,
"height": 32
}
}
@@ -0,0 +1,8 @@
FILESEXTRAPATHS:prepend:intel := "${THISDIR}/${PN}:"
SRC_URI:append:intel = " file://config.json"
do_compile:prepend:intel() {
cp -r ${WORKDIR}/config.json ${S}/
}
@@ -0,0 +1,4 @@
# Use PLT_RST to detect warm resets
EXTRA_OEMESON:intel += "-Duse-plt-rst=enabled"
EXTRA_OEMESON:intel += "-Dignore-soft-resets-during-post=enabled"
EXTRA_OEMESON:intel += "-Duse-acboot=enabled"