Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
Vishwanatha Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 2 | |
Sunny Srivastava | 61276c1 | 2023-09-25 09:29:03 -0500 | [diff] [blame] | 3 | SYSTEMD_SERVICE:${PN}:append:p10bmc = " obmc-led-create-virtual-leds@.service" |
Vishwanatha Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 4 | |
| 5 | # Copies config file having arguments for led-set-all-groups-asserted.sh |
Patrick Williams | d5c716d | 2022-02-17 07:30:57 -0600 | [diff] [blame] | 6 | SYSTEMD_ENVIRONMENT_FILE:${PN}:append:p10bmc =" obmc/led/set-all/groups/config" |
Vishwanatha Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 7 | |
Vishwanatha Subbanna | 9f410cc | 2021-03-23 13:52:11 +0000 | [diff] [blame] | 8 | # Use the JSON configuration file at runtime than the static led.yaml |
Vishwanatha Subbanna | 06b43da | 2021-04-12 07:53:58 -0500 | [diff] [blame] | 9 | # Also, enable Lamp Test and OperationalStatus monitor feature for |
| 10 | # p10bmc systems |
George Liu | fe21f1a | 2023-11-03 16:29:55 +0800 | [diff] [blame] | 11 | PACKAGECONFIG:append:p10bmc = " use-lamp-test monitor-operational-status persistent-led-asserted" |
Vishwanatha Subbanna | 9f410cc | 2021-03-23 13:52:11 +0000 | [diff] [blame] | 12 | |
Adriana Kobylak | 6e77b40 | 2021-03-25 16:44:27 +0000 | [diff] [blame] | 13 | # Install the lamp test override file for p10bmc |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 14 | SRC_URI:append:p10bmc = " file://lamp-test-led-overrides.json" |
Vishwanatha Subbanna | da5117a | 2021-03-26 13:01:30 -0500 | [diff] [blame] | 15 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 16 | pkg_postinst:${PN}:p10bmc () { |
Vishwanatha Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 17 | |
| 18 | # Needed this to run as part of BMC boot |
| 19 | mkdir -p $D$systemd_system_unitdir/multi-user.target.wants |
Vishwanatha Subbanna | da5117a | 2021-03-26 13:01:30 -0500 | [diff] [blame] | 20 | 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 Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 29 | } |
| 30 | |
Adriana Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 31 | pkg_prerm:${PN}:p10bmc () { |
Vishwanatha Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 32 | |
Vishwanatha Subbanna | da5117a | 2021-03-26 13:01:30 -0500 | [diff] [blame] | 33 | 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 Kobylak | b96c750 | 2021-08-06 16:25:30 +0000 | [diff] [blame] | 41 | do_install:append:p10bmc() { |
Vishwanatha Subbanna | da5117a | 2021-03-26 13:01:30 -0500 | [diff] [blame] | 42 | install -d ${D}${datadir}/${BPN}/ |
| 43 | install -m 0644 ${WORKDIR}/lamp-test-led-overrides.json ${D}${datadir}/${BPN}/ |
Vishwanatha Subbanna | 1a8345b | 2020-10-23 02:10:20 -0500 | [diff] [blame] | 44 | } |