blob: d927f25014e2be8de7117aab8f6824e9e628778b [file] [log] [blame]
Adriana Kobylakb96c7502021-08-06 16:25:30 +00001FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -05002
Sunny Srivastava61276c12023-09-25 09:29:03 -05003SYSTEMD_SERVICE:${PN}:append:p10bmc = " obmc-led-create-virtual-leds@.service"
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -05004
5# Copies config file having arguments for led-set-all-groups-asserted.sh
Patrick Williamsd5c716d2022-02-17 07:30:57 -06006SYSTEMD_ENVIRONMENT_FILE:${PN}:append:p10bmc =" obmc/led/set-all/groups/config"
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -05007
Vishwanatha Subbanna9f410cc2021-03-23 13:52:11 +00008# Use the JSON configuration file at runtime than the static led.yaml
Vishwanatha Subbanna06b43da2021-04-12 07:53:58 -05009# Also, enable Lamp Test and OperationalStatus monitor feature for
10# p10bmc systems
George Liufe21f1a2023-11-03 16:29:55 +080011PACKAGECONFIG:append:p10bmc = " use-lamp-test monitor-operational-status persistent-led-asserted"
Vishwanatha Subbanna9f410cc2021-03-23 13:52:11 +000012
Adriana Kobylak6e77b402021-03-25 16:44:27 +000013# Install the lamp test override file for p10bmc
Adriana Kobylakb96c7502021-08-06 16:25:30 +000014SRC_URI:append:p10bmc = " file://lamp-test-led-overrides.json"
Vishwanatha Subbannada5117a2021-03-26 13:01:30 -050015
Adriana Kobylakb96c7502021-08-06 16:25:30 +000016pkg_postinst:${PN}:p10bmc () {
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -050017
18 # Needed this to run as part of BMC boot
19 mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
Vishwanatha Subbannada5117a2021-03-26 13:01:30 -050020 LINK_FAULT="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-create-virtual-leds@sys-class-leds-virtual-enc-fault.service"
21 TARGET_FAULT="../obmc-led-create-virtual-leds@.service"
22 ln -s $TARGET_FAULT $LINK_FAULT
23
24 # Needed this to run as part of BMC boot
25 mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
26 LINK_ID="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-create-virtual-leds@sys-class-leds-virtual-enc-id.service"
27 TARGET_ID="../obmc-led-create-virtual-leds@.service"
28 ln -s $TARGET_ID $LINK_ID
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -050029}
30
Adriana Kobylakb96c7502021-08-06 16:25:30 +000031pkg_prerm:${PN}:p10bmc () {
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -050032
Vishwanatha Subbannada5117a2021-03-26 13:01:30 -050033 LINK_FAULT="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-create-virtual-leds@sys-class-leds-virtual-enc-fault.service"
34 rm $LINK_FAULT
35
36 LINK_ID="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-create-virtual-leds@sys-class-leds-virtual-enc-id.service"
37 rm $LINK_ID
38}
39
40# Install lamp test override json
Adriana Kobylakb96c7502021-08-06 16:25:30 +000041do_install:append:p10bmc() {
Vishwanatha Subbannada5117a2021-03-26 13:01:30 -050042 install -d ${D}${datadir}/${BPN}/
43 install -m 0644 ${WORKDIR}/lamp-test-led-overrides.json ${D}${datadir}/${BPN}/
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -050044}