diff options
Diffstat (limited to 'meta-intel')
9 files changed, 149 insertions, 4 deletions
diff --git a/meta-intel/conf/layer.conf b/meta-intel/conf/layer.conf index b43594da5..c753477a8 100644 --- a/meta-intel/conf/layer.conf +++ b/meta-intel/conf/layer.conf @@ -6,6 +6,7 @@ BBFILES += "${LAYERDIR}/meta-common/recipes-*/*/*.bb \ ${LAYERDIR}/meta-common/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "intel" -BBFILE_PATTERN_intel = "" +BBFILE_PATTERN_intel = "^${LAYERDIR}/" LAYERVERSION_intel = "1" LAYERSERIES_COMPAT_intel = "warrior zeus" +LAYERDEPENDS_intel = "phosphor-layer" diff --git a/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.service b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.service new file mode 100644 index 000000000..fdeefd417 --- /dev/null +++ b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.service @@ -0,0 +1,9 @@ +[Unit] +Description=Rotates the event logs + +[Service] +Type=oneshot +ExecStart=/usr/sbin/logrotate /etc/logrotate.d/logrotate.rsyslog + +[Install] +WantedBy=multi-user.target diff --git a/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.timer b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.timer new file mode 100644 index 000000000..ae1185e4f --- /dev/null +++ b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rotate-event-logs.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run rotate-event-logs.service every minute + +[Timer] +OnActiveSec=60 +OnUnitActiveSec=60 + +[Install] +WantedBy=timers.target diff --git a/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog-override.conf b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog-override.conf new file mode 100644 index 000000000..14bcc0781 --- /dev/null +++ b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog-override.conf @@ -0,0 +1,2 @@ +[Service] +ExecReload=/bin/kill -HUP $MAINPID diff --git a/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf new file mode 100644 index 000000000..46a287eef --- /dev/null +++ b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf @@ -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 2000 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="2000") + +# 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 diff --git a/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate new file mode 100644 index 000000000..a6ba28d86 --- /dev/null +++ b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate @@ -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 +} diff --git a/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend new file mode 100644 index 000000000..7e282804e --- /dev/null +++ b/meta-intel/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend @@ -0,0 +1,23 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://rsyslog.conf \ + file://rsyslog.logrotate \ + file://rotate-event-logs.service \ + file://rotate-event-logs.timer \ + 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 -m 0644 ${WORKDIR}/rotate-event-logs.timer ${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 + rm ${D}${sysconfdir}/rsyslog.d/imjournal.conf +} + +SYSTEMD_SERVICE_${PN} += " rotate-event-logs.service rotate-event-logs.timer" diff --git a/meta-intel/meta-common/recipes-intel/chassis/x86-power-control_git.bb b/meta-intel/meta-common/recipes-intel/chassis/x86-power-control_git.bb index 668d0a1ca..81ad1d0b8 100755 --- a/meta-intel/meta-common/recipes-intel/chassis/x86-power-control_git.bb +++ b/meta-intel/meta-common/recipes-intel/chassis/x86-power-control_git.bb @@ -2,7 +2,7 @@ SUMMARY = "Chassis Power Control service for Intel based platforms" DESCRIPTION = "Chassis Power Control service for Intel based platforms" SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh" -SRCREV = "174ec66e41c0182ae3299637c2846a57dc4684f5" +SRCREV = "3f6ecb212494d1a9362256d7aae03e11f3efb6f7" PV = "1.0+git${SRCPV}" diff --git a/meta-intel/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb b/meta-intel/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb index 2f5008be8..ae4c31e99 100755 --- a/meta-intel/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb +++ b/meta-intel/meta-common/recipes-intel/ipmi/intel-ipmi-oem_git.bb @@ -5,12 +5,12 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a4edad4aed50f39a66d098d74b265b" SRC_URI = "git://github.com/openbmc/intel-ipmi-oem" -SRCREV = "7cc9e478c1d3f5d4571266db0636ac90ea688f22" +SRCREV = "09a8314bb754dccd4af2ef8d2d9e6e43f6da74ec" S = "${WORKDIR}/git" PV = "0.1+git${SRCPV}" -DEPENDS = "boost phosphor-ipmi-host phosphor-logging systemd intel-dbus-interfaces" +DEPENDS = "boost phosphor-ipmi-host phosphor-logging systemd intel-dbus-interfaces libgpiod" inherit cmake obmc-phosphor-ipmiprovider-symlink |