Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/presence/presence_sled1
DEVPATH=/dev/input/event0
KEY=58
NAME=presence_sled1
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/presence/presence_sled2
DEVPATH=/dev/input/event0
KEY=59
NAME=presence_sled2
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/presence/presence_sled3
DEVPATH=/dev/input/event0
KEY=60
NAME=presence_sled3
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/presence/presence_sled4
DEVPATH=/dev/input/event0
KEY=61
NAME=presence_sled4
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/presence/presence_sled5
DEVPATH=/dev/input/event0
KEY=62
NAME=presence_sled5
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/presence/presence_sled6
DEVPATH=/dev/input/event0
KEY=63
NAME=presence_sled6
@@ -0,0 +1,22 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
inherit obmc-phosphor-systemd
# Add service file link
TMPL_PRESENT = "phosphor-gpio-presence@.service"
INSTFMT_PRESENT = "phosphor-gpio-presence@presence-sled{0}.service"
PRESENT_TGT = "multi-user.target"
FMT_PRESENT = "../${TMPL_PRESENT}:${PRESENT_TGT}.requires/${INSTFMT_PRESENT}"
SYSTEMD_LINK:${PN}-presence:append:bletchley = " ${@compose_list(d, 'FMT_PRESENT', 'OBMC_HOST_INSTANCES')}"
# Add environment file
SLED_PRESENT_ENV_FMT = "obmc/gpio/presence-sled{0}.conf"
SYSTEMD_ENVIRONMENT_FILE:${PN}-presence:bletchley = " ${@compose_list(d, 'SLED_PRESENT_ENV_FMT', 'OBMC_HOST_INSTANCES')}"
GPIO_PRESENCE_SLED_CONF="/etc/default/obmc/gpio/%i.conf"
do_install:append:bletchley(){
# modify ConditionPathExists and EnvironmentFile to correct filepath
sed -i -e "s,ConditionPathExists=.*,ConditionPathExists=${GPIO_PRESENCE_SLED_CONF},g" ${D}${systemd_system_unitdir}/phosphor-gpio-presence@.service
sed -i -e "s,EnvironmentFile=.*,EnvironmentFile=${GPIO_PRESENCE_SLED_CONF},g" ${D}${systemd_system_unitdir}/phosphor-gpio-presence@.service
}