mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-24 16:57:02 +00:00
Disable BMC Monitor before bus init to prevent conflict with BMC.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.delta import *
|
||||
import os.path
|
||||
import subprocess
|
||||
|
||||
class OnlPlatform_x86_64_delta_agc7648sv1_r0(OnlPlatformDelta,
|
||||
OnlPlatformPortConfig_32x100):
|
||||
@@ -10,7 +11,13 @@ class OnlPlatform_x86_64_delta_agc7648sv1_r0(OnlPlatformDelta,
|
||||
|
||||
|
||||
def baseconfig(self):
|
||||
#Check BMC monitor status
|
||||
bmc_mon_status = subprocess.check_output('ipmitool raw 0x38 0x1a 0x00', shell=True)
|
||||
if bmc_mon_status == ' 00\n':
|
||||
os.system("ipmitool raw 0x38 0x0a 1")
|
||||
|
||||
#Remove and rescan bus
|
||||
os.system("i2cset -y 0 0x31 0x14 0xfd")
|
||||
os.system("echo 1 > /sys/bus/i2c/devices/i2c-0/firmware_node/physical_node/remove")
|
||||
os.system("echo 1 > /sys/bus/pci/rescan")
|
||||
|
||||
@@ -38,5 +45,11 @@ class OnlPlatform_x86_64_delta_agc7648sv1_r0(OnlPlatformDelta,
|
||||
os.system("echo 498 > /sys/class/gpio/export")
|
||||
os.system("echo 499 > /sys/class/gpio/export")
|
||||
|
||||
#Restore BMC Monitor status
|
||||
if bmc_mon_status == ' 00\n':
|
||||
os.system("ipmitool raw 0x38 0x0a 0")
|
||||
elif bmc_mon_status == ' 01\n':
|
||||
os.system("ipmitool raw 0x38 0x0a 1")
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user