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,20 @@
#!/bin/sh
# set and unset occ active for all occ's in system
if [ "$1" = "disable" ]; then
value='false'
elif [ "$1" = "enable" ]; then
value='true'
else
echo "Usage: occ-active.sh [argument]"
echo " enable - set occ's to active state"
echo " disable - set occ's to inactive state"
exit 1
fi
OCC_CONTROL_SERVICE="org.open_power.OCC.Control"
busctl tree $OCC_CONTROL_SERVICE --list | grep -i occ | xargs -r -n1 -I{} \
busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \
OccActive b $value
exit 0
@@ -0,0 +1,13 @@
[Unit]
Description=OpenPOWER OCC Active Disable
Before=obmc-host-stop-pre@%i.target
Before=op-enter-mpreboot@%i.service
Before=op-stop-instructions@%i.service
Conflicts=op-occ-enable@%i.service
[Service]
ExecStart=/usr/bin/occ-active.sh disable
Type=oneshot
[Install]
WantedBy=obmc-host-stop@%i.target
@@ -0,0 +1,16 @@
[Unit]
Description=OpenPOWER OCC Active Enable for host %I
Conflicts=obmc-host-stop@%i.target
Conflicts=op-occ-disable@%i.service
Wants=org.open_power.OCC.Control.service
After=org.open_power.OCC.Control.service
Wants=fsi-scan@%i.service
After=fsi-scan@%i.service
ConditionPathExists=/run/openbmc/host@%i-on
[Service]
ExecStart=/usr/bin/occ-active.sh enable
Type=oneshot
[Install]
WantedBy=obmc-host-start@%i.target
@@ -0,0 +1,17 @@
[Unit]
Description=OpenPOWER OCC controller
Wants=mapper-wait@-xyz-openbmc_project-inventory.service
After=mapper-wait@-xyz-openbmc_project-inventory.service
Wants=obmc-host-reset-running@0.target
After=obmc-host-reset-running@0.target
Wants=xyz.openbmc_project.PLDM
After=xyz.openbmc_project.PLDM
[Service]
ExecStart=/usr/bin/openpower-occ-control
Restart=always
Type=dbus
BusName={BUSNAME}
[Install]
WantedBy=multi-user.target