blob: 843053bc8ed5d8f5a5c2d06b6c8135f2b3808873 [file] [log] [blame]
Willy Tudba90832021-02-10 11:55:58 -08001SUMMARY = "Configures systemd settings for gBMC"
2PR = "r1"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5
6inherit systemd
7
8S = "${WORKDIR}"
9
Willy Tu4dd03ca2021-08-06 09:37:35 -070010SRC_URI:append = " \
Willy Tudba90832021-02-10 11:55:58 -080011 file://firmware-updates.target \
12 file://firmware-updates-pre.target \
William A. Kennington III5ba6d082021-03-10 19:24:22 -080013 file://40-gbmc-forward.conf \
Willy Tu2696b0a2021-08-14 18:38:58 -070014 file://40-system.conf \
Willy Tudba90832021-02-10 11:55:58 -080015 "
16
Willy Tu4dd03ca2021-08-06 09:37:35 -070017FILES:${PN}:append = " \
Willy Tudba90832021-02-10 11:55:58 -080018 ${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \
19 ${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \
Willy Tu2696b0a2021-08-14 18:38:58 -070020 ${systemd_unitdir}/system.conf.d/40-system.conf \
William A. Kennington III5ba6d082021-03-10 19:24:22 -080021 ${libdir}/sysctl.d/40-gbmc-forward.conf \
Willy Tudba90832021-02-10 11:55:58 -080022 "
23
Willy Tu4dd03ca2021-08-06 09:37:35 -070024FILES:${PN}:append:dev = " \
Willy Tudba90832021-02-10 11:55:58 -080025 ${libdir}/sysctl.d/40-gbmc-debug.conf \
26 "
27
Willy Tu4dd03ca2021-08-06 09:37:35 -070028SYSTEMD_SERVICE:${PN}:append = " \
Willy Tudba90832021-02-10 11:55:58 -080029 firmware-updates.target \
30 firmware-updates-pre.target \
31 "
32
33# Put coredumps in the journal to ensure they stay in ram
34do_install() {
William A. Kennington III5ba6d082021-03-10 19:24:22 -080035 install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
36 printf "[Coredump]\nStorage=journal\n" \
37 >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf
Willy Tudba90832021-02-10 11:55:58 -080038
William A. Kennington III5ba6d082021-03-10 19:24:22 -080039 install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d
40 printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
41 >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
Willy Tudba90832021-02-10 11:55:58 -080042
William A. Kennington III5ba6d082021-03-10 19:24:22 -080043 install -d -m 0755 ${D}${systemd_system_unitdir}
44 install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
45 install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
46
47 install -d -m0755 ${D}${libdir}/sysctl.d
48 install -m 0644 ${WORKDIR}/40-gbmc-forward.conf ${D}${libdir}/sysctl.d/
Willy Tu2696b0a2021-08-14 18:38:58 -070049
50 install -d -m 0755 ${D}${systemd_unitdir}/system.conf.d/
51 install -D -m0644 ${WORKDIR}/40-system.conf ${D}${systemd_unitdir}/system.conf.d/
Willy Tudba90832021-02-10 11:55:58 -080052}
53
Willy Tu4dd03ca2021-08-06 09:37:35 -070054do_install:append:dev() {
William A. Kennington III5ba6d082021-03-10 19:24:22 -080055 printf "kernel.sysrq = 1\n" \
56 >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
Willy Tudba90832021-02-10 11:55:58 -080057}