1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" 2 3SYSTEMD_SERVICE:${PN}:append:p10bmc = " obmc-led-create-virtual-leds@.service" 4 5# Copies config file having arguments for led-set-all-groups-asserted.sh 6SYSTEMD_ENVIRONMENT_FILE:${PN}:append:p10bmc =" obmc/led/set-all/groups/config" 7 8# Use the JSON configuration file at runtime than the static led.yaml 9# Also, enable Lamp Test and OperationalStatus monitor feature for 10# p10bmc systems 11PACKAGECONFIG:append:p10bmc = " use-lamp-test monitor-operational-status persistent-led-asserted" 12 13# Install the lamp test override file for p10bmc 14SRC_URI:append:p10bmc = " file://lamp-test-led-overrides.json" 15 16pkg_postinst:${PN}:p10bmc () { 17 18 # Needed this to run as part of BMC boot 19 mkdir -p $D$systemd_system_unitdir/multi-user.target.wants 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 29} 30 31pkg_prerm:${PN}:p10bmc () { 32 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 41do_install:append:p10bmc() { 42 install -d ${D}${datadir}/${BPN}/ 43 install -m 0644 ${UNPACKDIR}/lamp-test-led-overrides.json ${D}${datadir}/${BPN}/ 44} 45