Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description = Host Power Control Sequence
|
||||
Wants=ssifbridge.service
|
||||
After=ssifbridge.service
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
RemainAfterExit=true
|
||||
Type=oneshot
|
||||
ExecStart=/usr/libexec/mori-boot/init_once.sh
|
||||
StandardOutput=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Provide source directive to shellcheck.
|
||||
# shellcheck source=meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh
|
||||
source /usr/libexec/mori-fw/mori-lib.sh
|
||||
|
||||
function set_mux_default(){
|
||||
# set all mux route to CPU before power on host
|
||||
# BMC_CPU_DDR_I2C_SEL
|
||||
set_gpio_ctrl CPU_DDR_SEL 1
|
||||
# BMC_CPU_EEPROM_I2C_SEL
|
||||
set_gpio_ctrl CPU_EEPROM_SEL 1
|
||||
# BMC_CPU_PMBUS_SEL
|
||||
set_gpio_ctrl CPU_VRD_SEL 1
|
||||
}
|
||||
|
||||
set_mux_default
|
||||
|
||||
sleep 5
|
||||
set_gpio_ctrl S0_BMC_OK 1
|
||||
|
||||
# Create /run/openbmc for system power files
|
||||
if [[ ! -d "/run/openbmc" ]]; then
|
||||
mkdir "/run/openbmc"
|
||||
fi
|
||||
|
||||
echo "BMC initialization complete"
|
||||
Reference in New Issue
Block a user