summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-core')
-rw-r--r--meta-phosphor/recipes-core/base-files/base-files/df-mmc/fstab9
-rw-r--r--meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf20
-rw-r--r--meta-phosphor/recipes-core/base-files/base-files_%.bbappend7
-rw-r--r--meta-phosphor/recipes-core/os-release/os-release.bbappend19
-rw-r--r--meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend1
-rw-r--r--meta-phosphor/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend8
-rw-r--r--meta-phosphor/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend5
-rw-r--r--meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb20
-rw-r--r--meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf6
-rw-r--r--meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf31
-rw-r--r--meta-phosphor/recipes-core/systemd/systemd_%.bbappend2
11 files changed, 81 insertions, 47 deletions
diff --git a/meta-phosphor/recipes-core/base-files/base-files/df-mmc/fstab b/meta-phosphor/recipes-core/base-files/base-files/df-mmc/fstab
new file mode 100644
index 000000000..4a0766876
--- /dev/null
+++ b/meta-phosphor/recipes-core/base-files/base-files/df-mmc/fstab
@@ -0,0 +1,9 @@
+# openbmc fstab
+
+/dev/root / auto defaults 1 1
+proc /proc proc defaults 0 0
+devpts /dev/pts devpts mode=0620,gid=5 0 0
+tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
+tmpfs /var/volatile tmpfs defaults 0 0
+tmpfs /media tmpfs defaults 0 0
+/var/persist/home /home none bind 0 0
diff --git a/meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf b/meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf
deleted file mode 100644
index 78141f644..000000000
--- a/meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-# /etc/nsswitch.conf
-#
-# Example configuration of GNU Name Service Switch functionality.
-# If you have the `glibc-doc' and `info' packages installed, try:
-# `info libc "Name Service Switch"' for information about this file.
-
-passwd: files ldap
-group: files ldap
-shadow: files ldap
-
-hosts: files dns
-networks: files
-
-protocols: db files
-services: db files
-ethers: db files
-rpc: db files
-
-netgroup: nis
-
diff --git a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
index c77cfefc7..b6c4222b2 100644
--- a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
+++ b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
@@ -1,4 +1,5 @@
FILESEXTRAPATHS_prepend_df-obmc-ubi-fs := "${THISDIR}/${PN}/df-ubi:"
+FILESEXTRAPATHS_prepend_df-phosphor-mmc := "${THISDIR}/${PN}/df-mmc:"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -6,16 +7,12 @@ RDEPENDS_${PN}_append_df-obmc-ubi-fs = " preinit-mounts"
SRC_URI += " \
file://50-rp_filter.conf \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'file://nsswitch_ldap.conf', '', d)}"
+"
do_install_append() {
install -d ${D}/srv
- if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)}" ]; then
- install -D -m 600 ${WORKDIR}/nsswitch_ldap.conf ${D}/${sysconfdir}/nsswitch.conf
- fi
-
install -d ${D}/${libdir}/sysctl.d
install -D -m 644 ${WORKDIR}/50-rp_filter.conf ${D}/${libdir}/sysctl.d/50-rp_filter.conf
}
diff --git a/meta-phosphor/recipes-core/os-release/os-release.bbappend b/meta-phosphor/recipes-core/os-release/os-release.bbappend
index c01014643..0f938c392 100644
--- a/meta-phosphor/recipes-core/os-release/os-release.bbappend
+++ b/meta-phosphor/recipes-core/os-release/os-release.bbappend
@@ -13,22 +13,11 @@ def run_git(d, cmd):
except:
pass
-python() {
- version_id = run_git(d, 'describe --dirty --long')
- if version_id:
- d.setVar('VERSION_ID', version_id)
- versionList = version_id.split('-')
- version = versionList[0] + "-" + versionList[1]
- d.setVar('VERSION', version)
+VERSION_ID := "${@run_git(d, 'describe --dirty --long')}"
+VERSION = "${@'-'.join(d.getVar('VERSION_ID').split('-')[0:2])}"
- build_id = run_git(d, 'describe --abbrev=0')
- if build_id:
- d.setVar('BUILD_ID', build_id)
-
- target_machine = d.getVar('MACHINE', True)
- if target_machine:
- d.setVar('OPENBMC_TARGET_MACHINE', target_machine)
-}
+BUILD_ID := "${@run_git(d, 'describe --abbrev=0')}"
+OPENBMC_TARGET_MACHINE = "${MACHINE}"
OS_RELEASE_FIELDS_append = " BUILD_ID OPENBMC_TARGET_MACHINE"
diff --git a/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
index a3e2dcda2..e111a4d95 100644
--- a/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
+++ b/meta-phosphor/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -1,7 +1,6 @@
RDEPENDS_${PN}_append = " \
nativesdk-autoconf-archive \
nativesdk-meson \
- nativesdk-phosphor-dbus-interfaces-yaml \
nativesdk-python3-sdbus++ \
nativesdk-phosphor-logging-elog \
"
diff --git a/meta-phosphor/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/meta-phosphor/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
index d62dc9985..8327383d0 100644
--- a/meta-phosphor/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
+++ b/meta-phosphor/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
@@ -1 +1,7 @@
-RRECOMMENDS_${PN}_append = " googletest sdbusplus phosphor-logging libstdc++-staticdev"
+RRECOMMENDS_${PN}_append = " \
+ googletest \
+ libstdc++-staticdev \
+ phosphor-dbus-interfaces-yaml \
+ phosphor-logging \
+ sdbusplus \
+ "
diff --git a/meta-phosphor/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend b/meta-phosphor/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend
index 78b78e40b..c182dafb9 100644
--- a/meta-phosphor/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend
+++ b/meta-phosphor/recipes-core/packagegroups/packagegroup-core-tools-profile.bbappend
@@ -5,8 +5,3 @@ RDEPENDS_${PN}_remove = " \
powertop \
latencytop \
"
-
-RRECOMMENDS_${PN}_remove = " \
- perf \
- trace-cmd \
- "
diff --git a/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb
new file mode 100644
index 000000000..21433976b
--- /dev/null
+++ b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Phosphor systemd configuration overrides"
+DESCRIPTION = "Overrides for systemd and its applications"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS += "systemd"
+
+SRC_URI += "file://service-restart-policy.conf"
+SRC_URI += "file://journald-maxlevel-policy.conf"
+
+FILES_${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
+FILES_${PN} += "${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf"
+
+
+do_install() {
+ install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
+ install -m 644 -D ${WORKDIR}/journald-maxlevel-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf
+}
diff --git a/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf
new file mode 100644
index 000000000..f5f3d0ff1
--- /dev/null
+++ b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/journald-maxlevel-policy.conf
@@ -0,0 +1,6 @@
+# Don't store "debug" messages, only "info" and below.
+# Reference: journald.conf(5)
+
+[Journal]
+MaxLevelStore=info
+MaxLevelSyslog=info
diff --git a/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf
new file mode 100644
index 000000000..54516c2d4
--- /dev/null
+++ b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy/service-restart-policy.conf
@@ -0,0 +1,31 @@
+# This file overrides some defaults for systemd
+#
+# - Change the RestartSec from 100ms to 1s.
+# When a service hits a failure, our new debug collection service kicks
+# in. When a core file is involved, it's been found that generating 5 core
+# files within ~500ms puts a huge strain on the BMC. Also, if the bmc is
+# going to get a fix on a restart of a service, the more time the better
+# (think retries on device driver scenarios).
+#
+# - Change the StartLimitBurst to 2
+# Five just seems excessive for our services in openbmc. In all fail
+# scenarios seen so far (other then with phosphor-hwmon), either
+# restarting once does the job or restarting all 5 times does not help
+# and we just end up hitting the 5 limit anyway.
+#
+# - Change the StartLimitIntervalSec to 30s
+# The BMC CPU performance is already challenged. When a service is
+# failing and a core dump is being generated and collected into a dump,
+# it's even more challenged. Recent failures have shown situations where
+# the service does not fail again until 15-20 seconds after the initial
+# failure which means the default of 10s for this results in the service
+# being restarted indefinitely. Change this to 30s to only allow a service
+# to be restarted StartLimitBurst times within a 30s interval before
+# being put in a permanent fail state.
+#
+# See systemd-system.conf(5) for details on the conf files
+
+[Manager]
+DefaultRestartSec=1s
+DefaultStartLimitBurst=2
+DefaultStartLimitIntervalSec=30s
diff --git a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
index 1aabe378f..f1046de20 100644
--- a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
@@ -25,3 +25,5 @@ ALTERNATIVE_${PN} += "init"
ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
ALTERNATIVE_PRIORITY[init] ?= "300"
+
+RRECOMMENDS_${PN}_append_openbmc-phosphor = " phosphor-systemd-policy"