Initial commit
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=System unit to hard reset or system reset chassis
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/usr/bin/tray_powercycle.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=chassis-system-reset.target
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"gpio_configs":[
|
||||
{
|
||||
"Name" : "PostComplete",
|
||||
"LineName" : "POST_COMPLETE",
|
||||
"Type" : "GPIO",
|
||||
"Polarity" : "ActiveLow"
|
||||
},
|
||||
{
|
||||
"Name" : "PowerButton",
|
||||
"LineName" : "POWER_BUTTON",
|
||||
"Type" : "GPIO",
|
||||
"Polarity" : "ActiveLow"
|
||||
},
|
||||
{
|
||||
"Name" : "PowerOk",
|
||||
"LineName" : "PS_PWROK",
|
||||
"Type" : "GPIO",
|
||||
"Polarity" : "ActiveHigh"
|
||||
},
|
||||
{
|
||||
"Name" : "PowerOut",
|
||||
"LineName" : "POWER_OUT",
|
||||
"Type" : "GPIO",
|
||||
"Polarity" : "ActiveLow"
|
||||
},
|
||||
{
|
||||
"Name" : "ResetButton",
|
||||
"LineName" : "RESET_BUTTON",
|
||||
"Type" : "GPIO",
|
||||
"Polarity" : "ActiveLow"
|
||||
},
|
||||
{
|
||||
"Name" : "ResetOut",
|
||||
"LineName" : "RESET_OUT",
|
||||
"Type" : "GPIO",
|
||||
"Polarity" : "ActiveLow"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
FILESEXTRAPATHS:prepend:gbs := "${THISDIR}/${PN}:"
|
||||
SRC_URI:append:gbs = " file://power-config-host0.json \
|
||||
file://chassis-system-reset.service \
|
||||
"
|
||||
|
||||
EXTRA_OECMAKE:append:gbs = " -DCHASSIS_SYSTEM_RESET=ON"
|
||||
|
||||
RDEPENDS:${PN}:append:gbs = " bash"
|
||||
RDEPENDS:${PN}:append:gbs = " gbs-hotswap-power-cycle"
|
||||
|
||||
do_install:append:gbs() {
|
||||
install -d ${D}${datadir}/${PN}
|
||||
install -m 0644 ${WORKDIR}/power-config-host0.json ${D}${datadir}/${PN}
|
||||
}
|
||||
Reference in New Issue
Block a user