diff options
author | Charles Kearney <charles.kearney@hpe.com> | 2023-05-30 22:21:02 +0300 |
---|---|---|
committer | Jean-Marie Verdun <jean-marie.verdun@hpe.com> | 2023-07-05 20:15:22 +0300 |
commit | 25b7d7827589fb99db86eb49ff87e5ac3bcae1d4 (patch) | |
tree | 7d023ba9263b36358ba6f13db475687ffe832731 /meta-hpe/meta-rl300-g11 | |
parent | 07fcf806b6d76608d49b6f3cb26fef27eca8a195 (diff) | |
download | openbmc-25b7d7827589fb99db86eb49ff87e5ac3bcae1d4.tar.xz |
meta-hpe: rl300-g11 add host boot enable service
Change-Id: I9e43bd64b8685100249df2c99fefd669c834b34a
Signed-off-by: Charles Kearney <charles.kearney@hpe.com>
Diffstat (limited to 'meta-hpe/meta-rl300-g11')
-rw-r--r-- | meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable.bbappend | 1 | ||||
-rw-r--r-- | meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable/host-boot-enable.sh | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable.bbappend b/meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable.bbappend new file mode 100644 index 0000000000..4fc41d0580 --- /dev/null +++ b/meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable/host-boot-enable.sh b/meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable/host-boot-enable.sh new file mode 100644 index 0000000000..85b80ff8d3 --- /dev/null +++ b/meta-hpe/meta-rl300-g11/recipes-hpe/host/host-boot-enable/host-boot-enable.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +devmem 0xd1000008 8 128 +devmem 0xd1000009 8 36 +devmem 0xd1000041 8 255 +devmem 0xd100004b 8 8 +# Configure UART +# 4d is allocating UEFI SOC ROM to GXP +# 5d is allocating UEFI VAR ROM access to GXP +# devmem 0xd1000119 8 0x4d +devmem 0xc00000af 8 9 +# enable UART on rl300 +systemctl start obmc-console@ttyS1.service +devmem 0xd100011a 8 0x00 +# setup PCIe ID +devmem 0x802f002e 16 0x03d8 + +# Check the current power status + +currentstate=$(busctl get-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis CurrentPowerState | awk '{ print $2 }') + +if [ "$currentstate" = "\"xyz.openbmc_project.State.Chassis.PowerState.On\"" ] +then + systemctl stop phosphor-virtual-sensor.service + modprobe smpro-misc + modprobe smpro-errmon + modprobe smpro-hwmon + modprobe smpro-mfd + systemctl restart xyz.openbmc_project.ampere_host_error_monitor.service + systemctl restart xyz.openbmc_project.amperecpusensor.service + systemctl restart xyz.openbmc_project.EntityManager.service + systemctl restart phosphor-pid-control.service + systemctl start phosphor-virtual-sensor.service +else + # We can start the ROM Version check services + rmmod gxp_spifi_ctrl1 + devmem 0xd1000119 8 0x4d + modprobe gxp_spifi_ctrl1 + systemctl start com.hpe.hpe-uefi-version.service +fi + +while true +do + sleep 1 +done |