blob: 6e26fc99daa221b1760c6e2c4ecbab683b7c0044 [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 Tudba90832021-02-10 11:55:58 -080014 "
15
Willy Tu4dd03ca2021-08-06 09:37:35 -070016FILES:${PN}:append = " \
Willy Tudba90832021-02-10 11:55:58 -080017 ${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \
18 ${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \
William A. Kennington III5ba6d082021-03-10 19:24:22 -080019 ${libdir}/sysctl.d/40-gbmc-forward.conf \
Willy Tudba90832021-02-10 11:55:58 -080020 "
21
Willy Tu4dd03ca2021-08-06 09:37:35 -070022FILES:${PN}:append:dev = " \
Willy Tudba90832021-02-10 11:55:58 -080023 ${libdir}/sysctl.d/40-gbmc-debug.conf \
24 "
25
Willy Tu4dd03ca2021-08-06 09:37:35 -070026SYSTEMD_SERVICE:${PN}:append = " \
Willy Tudba90832021-02-10 11:55:58 -080027 firmware-updates.target \
28 firmware-updates-pre.target \
29 "
30
31# Put coredumps in the journal to ensure they stay in ram
32do_install() {
William A. Kennington III5ba6d082021-03-10 19:24:22 -080033 install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
34 printf "[Coredump]\nStorage=journal\n" \
35 >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf
Willy Tudba90832021-02-10 11:55:58 -080036
William A. Kennington III5ba6d082021-03-10 19:24:22 -080037 install -d -m 0755 ${D}${systemd_unitdir}/resolved.conf.d
38 printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
39 >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
Willy Tudba90832021-02-10 11:55:58 -080040
William A. Kennington III5ba6d082021-03-10 19:24:22 -080041 install -d -m 0755 ${D}${systemd_system_unitdir}
42 install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
43 install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
44
45 install -d -m0755 ${D}${libdir}/sysctl.d
46 install -m 0644 ${WORKDIR}/40-gbmc-forward.conf ${D}${libdir}/sysctl.d/
Willy Tudba90832021-02-10 11:55:58 -080047}
48
Willy Tu4dd03ca2021-08-06 09:37:35 -070049do_install:append:dev() {
William A. Kennington III5ba6d082021-03-10 19:24:22 -080050 printf "kernel.sysrq = 1\n" \
51 >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
Willy Tudba90832021-02-10 11:55:58 -080052}