diff options
author | Willy Tu <wltu@google.com> | 2021-02-10 22:55:58 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2021-02-13 00:43:18 +0300 |
commit | dba908308d3388a7301572b83745f0eab44e1db8 (patch) | |
tree | 1d2802bc00acb1333080dea50dad3156de3a0372 /meta-google/recipes-google/systemd | |
parent | e7844b4c35efd02aebdc82b3c89821458eb25baa (diff) | |
download | openbmc-dba908308d3388a7301572b83745f0eab44e1db8.tar.xz |
meta-google: recipes-google: systemd: Import from gBMC
Initial recipes-google/systemd code from gBMC.
Google-Bug-Id: 179618486
Upstream: 8ac594bdf054082ca6dbe35c4345759fe4c31669
Signed-off-by: Willy Tu <wltu@google.com>
Change-Id: I3c1b9678049e9f5384482af366d0dd104740a207
Diffstat (limited to 'meta-google/recipes-google/systemd')
3 files changed, 57 insertions, 0 deletions
diff --git a/meta-google/recipes-google/systemd/files/firmware-updates-pre.target b/meta-google/recipes-google/systemd/files/firmware-updates-pre.target new file mode 100644 index 000000000..5e6c8e93a --- /dev/null +++ b/meta-google/recipes-google/systemd/files/firmware-updates-pre.target @@ -0,0 +1,2 @@ +[Unit] +Description=Firmware Update Preconditions diff --git a/meta-google/recipes-google/systemd/files/firmware-updates.target b/meta-google/recipes-google/systemd/files/firmware-updates.target new file mode 100644 index 000000000..e41fe25f6 --- /dev/null +++ b/meta-google/recipes-google/systemd/files/firmware-updates.target @@ -0,0 +1,6 @@ +[Unit] +Description=Firmware Updates and Configuration +Wants=firmware-updates-pre.target + +[Install] +WantedBy=multi-user.target diff --git a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb new file mode 100644 index 000000000..011b62edc --- /dev/null +++ b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb @@ -0,0 +1,49 @@ +SUMMARY = "Configures systemd settings for gBMC" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd + +S = "${WORKDIR}" + +SRC_URI_append = " \ + file://firmware-updates.target \ + file://firmware-updates-pre.target \ + " + +FILES_${PN}_append = " \ + ${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \ + ${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \ + " + +FILES_${PN}_append_dev = " \ + ${libdir}/sysctl.d/40-gbmc-debug.conf \ + " + +SYSTEMD_SERVICE_${PN}_append = " \ + firmware-updates.target \ + firmware-updates-pre.target \ + " + +# Put coredumps in the journal to ensure they stay in ram +do_install() { + install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d + printf "[Coredump]\nStorage=journal\n" \ + >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf + + install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d + printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \ + >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf + + install -d -m 0755 ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/ + install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/ +} + +do_install_append_dev() { + install -d -m 0755 ${D}${libdir}/sysctl.d + printf "kernel.sysrq = 1\n" \ + >${D}${libdir}/sysctl.d/40-gbmc-debug.conf + +} |