blob: feb023bebbadfb378fc81f29edafbbf5c4b3db0b [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 \
William A. Kennington IIIaa814b32022-10-26 16:50:30 -070015 file://40-gbmc-time.conf \
Willy Tudba90832021-02-10 11:55:58 -080016 "
17
Willy Tu4dd03ca2021-08-06 09:37:35 -070018FILES:${PN}:append = " \
Willy Tudba90832021-02-10 11:55:58 -080019 ${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \
20 ${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \
Willy Tu2696b0a2021-08-14 18:38:58 -070021 ${systemd_unitdir}/system.conf.d/40-system.conf \
William A. Kennington IIIaa814b32022-10-26 16:50:30 -070022 ${systemd_unitdir}/timesyncd.conf.d/40-gbmc-time.conf \
William A. Kennington III5ba6d082021-03-10 19:24:22 -080023 ${libdir}/sysctl.d/40-gbmc-forward.conf \
Willy Tudba90832021-02-10 11:55:58 -080024 "
25
Willy Tu4dd03ca2021-08-06 09:37:35 -070026FILES:${PN}:append:dev = " \
Willy Tudba90832021-02-10 11:55:58 -080027 ${libdir}/sysctl.d/40-gbmc-debug.conf \
28 "
29
Willy Tu4dd03ca2021-08-06 09:37:35 -070030SYSTEMD_SERVICE:${PN}:append = " \
Willy Tudba90832021-02-10 11:55:58 -080031 firmware-updates.target \
32 firmware-updates-pre.target \
33 "
34
35# Put coredumps in the journal to ensure they stay in ram
36do_install() {
William A. Kennington III5ba6d082021-03-10 19:24:22 -080037 install -d -m 0755 ${D}${systemd_unitdir}/coredump.conf.d
38 printf "[Coredump]\nStorage=journal\n" \
39 >${D}${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.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_unitdir}/resolved.conf.d
42 printf "[Resolve]\nLLMNR=no\nMulticastDNS=resolve\n" \
43 >${D}${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf
Willy Tudba90832021-02-10 11:55:58 -080044
William A. Kennington III5ba6d082021-03-10 19:24:22 -080045 install -d -m 0755 ${D}${systemd_system_unitdir}
46 install -m 0644 ${WORKDIR}/firmware-updates.target ${D}${systemd_system_unitdir}/
47 install -m 0644 ${WORKDIR}/firmware-updates-pre.target ${D}${systemd_system_unitdir}/
48
49 install -d -m0755 ${D}${libdir}/sysctl.d
50 install -m 0644 ${WORKDIR}/40-gbmc-forward.conf ${D}${libdir}/sysctl.d/
Willy Tu2696b0a2021-08-14 18:38:58 -070051
52 install -d -m 0755 ${D}${systemd_unitdir}/system.conf.d/
53 install -D -m0644 ${WORKDIR}/40-system.conf ${D}${systemd_unitdir}/system.conf.d/
William A. Kennington IIIaa814b32022-10-26 16:50:30 -070054
55 install -d -m 0755 ${D}${systemd_unitdir}/timesyncd.conf.d/
56 install -D -m0644 ${WORKDIR}/40-gbmc-time.conf ${D}${systemd_unitdir}/timesyncd.conf.d/
Willy Tudba90832021-02-10 11:55:58 -080057}
58
Willy Tu4dd03ca2021-08-06 09:37:35 -070059do_install:append:dev() {
William A. Kennington III5ba6d082021-03-10 19:24:22 -080060 printf "kernel.sysrq = 1\n" \
61 >${D}${libdir}/sysctl.d/40-gbmc-debug.conf
Willy Tudba90832021-02-10 11:55:58 -080062}