Merge pull request #3 from bradbishop/master
Remove tftpy
diff --git a/bin/Openbmc.py b/bin/Openbmc.py
index 87c5ae6..1518f74 100755
--- a/bin/Openbmc.py
+++ b/bin/Openbmc.py
@@ -12,10 +12,12 @@
'DIMM' : 2,
'MAIN_PLANAR' : 3,
'RISER_CARD' : 4,
- 'FAN' : 5,
- 'BMC' : 6,
- 'CORE' : 7,
- 'PCIE_CARD' : 8,
+ 'DAUGHTER_CARD' : 5,
+ 'FAN' : 6,
+ 'BMC' : 7,
+ 'CORE' : 8,
+ 'PCIE_CARD' : 9,
+ 'MEMORY_BUFFER' : 10,
}
FRU_STATES = {
'NORMAL' : 0,
diff --git a/bin/Palmetto.py b/bin/Palmetto.py
index 585b8fc..5cec95c 100755
--- a/bin/Palmetto.py
+++ b/bin/Palmetto.py
@@ -136,34 +136,6 @@
]
}
-SYSTEM_CONFIG['org.openbmc.sensors.Temperature.Ambient'] = {
- 'system_state' : 'BMC_STARTING',
- 'start_process' : True,
- 'monitor_process' : True,
- 'process_name' : 'sensor_ambient.exe',
- 'heartbeat' : 'no',
- 'instances' : [
- {
- 'name' : 'FrontChassis',
- 'user_label': 'Ambient Temperature 1',
- 'properties' : {
- 'org.openbmc.SensorValue': {
- 'poll_interval' : 5000,
- },
- 'org.openbmc.SensorThreshold' : {
- 'lower_critical': 5,
- 'lower_warning' : 10,
- 'upper_warning' : 15,
- 'upper_critical': 20
- },
- 'org.openbmc.SensorI2c' : {
- 'dev_path' : '/dev/i2c/i2c0',
- 'address' : '0xA0'
- }
- }
- },
- ]
- }
SYSTEM_CONFIG['org.openbmc.buttons.Power'] = {
'system_state' : 'BMC_STARTING',
'start_process' : True,
@@ -224,25 +196,6 @@
'instances' : [ { 'name' : 'MBVPD_0' } ]
}
-SYSTEM_CONFIG['org.openbmc.sensors.Occ'] = {
- 'system_state' : 'BMC_STARTING',
- 'start_process' : False,
- 'monitor_process' : False,
- 'process_name' : 'sensor_occ.exe',
- 'heartbeat' : 'no',
- 'instances' : [
- {
- 'name' : 'Occ_0',
- 'properties' : {
- 'org.openbmc.Occ' : {
- 'poll_interval' : 3000,
- }
- }
- },
-
- ]
- }
-
SYSTEM_CONFIG['org.openbmc.sensors.Fan'] = {
'system_state' : 'BMC_STARTING',
'start_process' : True,
@@ -263,171 +216,126 @@
FRU_INSTANCES = {
'<inventory_root>/system' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['SYSTEM'],
- 'is_fru' : True,
- },
- '<inventory_root>/system/io_board' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['MAIN_PLANAR'],
- 'manufacturer' : 'FOXCONN',
- 'is_fru' : True,
- 'location' : 'C1',
- },
+ { 'fru_type' : 'SYSTEM','is_fru' : True, },
- '<inventory_root>/system/motherboard' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['MAIN_PLANAR'],
- 'manufacturer' : 'FOXCONN',
- 'is_fru' : True,
- 'location' : 'C0',
- },
- '<inventory_root>/system/fan0' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['FAN'],
- 'manufacturer' : 'DELTA',
- 'is_fru' : True,
- 'location' : 'F0',
- },
- '<inventory_root>/system/fan1' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['FAN'],
- 'manufacturer' : 'DELTA',
- 'is_fru' : True,
- 'location' : 'F1',
- },
- '<inventory_root>/system/io_board/bmc' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['BMC'],
- 'manufacturer' : 'ASPEED',
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['CPU'],
- 'manufacturer' : 'IBM',
- 'is_fru' : True,
- 'location' : 'P0',
- },
- '<inventory_root>/system/motherboard/cpu0/core0' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core1' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core2' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core3' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core4' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core5' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core6' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core7' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core8' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core9' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core10' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/cpu0/core11' : {
- 'fru_type' : Openbmc.FRU_TYPES['CORE'],
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/centaur0' :
- {
- 'fru_type' : 0,
- 'is_fru' : False,
- },
- '<inventory_root>/system/motherboard/dimm0' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['DIMM'],
- 'is_fru' : True,
- },
- '<inventory_root>/system/motherboard/dimm1' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['DIMM'],
- 'is_fru' : True,
- },
- '<inventory_root>/system/motherboard/dimm2' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['DIMM'],
- 'is_fru' : True,
- },
- '<inventory_root>/system/motherboard/dimm3' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['DIMM'],
- 'is_fru' : True,
- },
- '<inventory_root>/system/io_board/pcie_slot0' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['PCIE_CARD'],
- 'user_label' : 'PCIe card 0',
- 'is_fru' : True,
- },
- '<inventory_root>/system/io_board/pcie_slot1' :
- {
- 'fru_type' : Openbmc.FRU_TYPES['PCIE_CARD'],
- 'user_label' : 'PCIe card 1',
- 'is_fru' : True,
- },
+ '<inventory_root>/system/chassis' :
+ { 'fru_type' : 'SYSTEM','is_fru' : True, },
+
+ '<inventory_root>/system/chassis/motherboard' :
+ { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
+
+ '<inventory_root>/system/chassis/fan0' :
+ { 'fru_type' : 'FAN','is_fru' : True, },
+ '<inventory_root>/system/chassis/fan1' :
+ { 'fru_type' : 'FAN','is_fru' : True, },
+ '<inventory_root>/system/chassis/fan2' :
+ { 'fru_type' : 'FAN','is_fru' : True, },
+ '<inventory_root>/system/chassis/fan3' :
+ { 'fru_type' : 'FAN','is_fru' : True, },
+ '<inventory_root>/system/chassis/fan4' :
+ { 'fru_type' : 'FAN','is_fru' : True, },
+
+ '<inventory_root>/system/chassis/motherboard/bmc' :
+ { 'fru_type' : 'BMC','is_fru' : False,
+ 'manufacturer' : 'ASPEED' },
+ '<inventory_root>/system/chassis/motherboard/cpu0' :
+ { 'fru_type' : 'CPU', 'is_fru' : True, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core0' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core1' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core2' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core3' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core4' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core5' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core6' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core7' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core8' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core9' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core10' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/cpu0/core11' :
+ { 'fru_type' : 'CORE', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/centaur0' :
+ { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
+
+ '<inventory_root>/system/chassis/motherboard/dimm0' :
+ { 'fru_type' : 'DIMM', 'is_fru' : True,},
+
+ '<inventory_root>/system/chassis/motherboard/dimm1' :
+ { 'fru_type' : 'DIMM', 'is_fru' : True,},
+
+ '<inventory_root>/system/chassis/motherboard/dimm2' :
+ { 'fru_type' : 'DIMM', 'is_fru' : True,},
+
+ '<inventory_root>/system/chassis/motherboard/dimm3' :
+ { 'fru_type' : 'DIMM', 'is_fru' : True,},
+
+ '<inventory_root>/system/chassis/io_board/pcie_slot0' :
+ { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
+
+ '<inventory_root>/system/chassis/io_board/pcie_slot1' :
+ { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
+
}
ID_LOOKUP = {
'FRU' : {
- 0x0d : '<inventory_root>/system',
- 0x34 : '<inventory_root>/system/motherboard',
- 0x01 : '<inventory_root>/system/motherboard/cpu0',
- 0x02 : '<inventory_root>/system/motherboard/centaur0',
- 0x03 : '<inventory_root>/system/motherboard/dimm0',
- 0x04 : '<inventory_root>/system/motherboard/dimm1',
- 0x05 : '<inventory_root>/system/motherboard/dimm2',
- 0x06 : '<inventory_root>/system/motherboard/dimm3',
+ 0x0d : '<inventory_root>/system/chassis',
+ 0x34 : '<inventory_root>/system/chassis/motherboard',
+ 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
+ 0x02 : '<inventory_root>/system/chassis/motherboard/centaur0',
+ 0x03 : '<inventory_root>/system/chassis/motherboard/dimm0',
+ 0x04 : '<inventory_root>/system/chassis/motherboard/dimm1',
+ 0x05 : '<inventory_root>/system/chassis/motherboard/dimm2',
+ 0x06 : '<inventory_root>/system/chassis/motherboard/dimm3',
0xff : '<inventory_root>/system',
},
+ 'FRU_STR' : {
+ 'CHASSIS' : '<inventory_root>/system/chassis',
+ 'PRODUCT' : '<inventory_root>/system',
+ 'BOARD' : '<inventory_root>/system/chassis/motherboard',
+ },
'SENSOR' : {
- 0x2f : '<inventory_root>/system/motherboard/cpu0',
- 0x22 : '<inventory_root>/system/motherboard/cpu0/core0',
- 0x23 : '<inventory_root>/system/motherboard/cpu0/core1',
- 0x24 : '<inventory_root>/system/motherboard/cpu0/core2',
- 0x25 : '<inventory_root>/system/motherboard/cpu0/core3',
- 0x26 : '<inventory_root>/system/motherboard/cpu0/core4',
- 0x27 : '<inventory_root>/system/motherboard/cpu0/core5',
- 0x28 : '<inventory_root>/system/motherboard/cpu0/core6',
- 0x29 : '<inventory_root>/system/motherboard/cpu0/core7',
- 0x2a : '<inventory_root>/system/motherboard/cpu0/core8',
- 0x2b : '<inventory_root>/system/motherboard/cpu0/core9',
- 0x2c : '<inventory_root>/system/motherboard/cpu0/core10',
- 0x2d : '<inventory_root>/system/motherboard/cpu0/core11',
- 0x2e : '<inventory_root>/system/motherboard/centaur0',
- 0x1e : '<inventory_root>/system/motherboard/dimm0',
- 0x1f : '<inventory_root>/system/motherboard/dimm1',
- 0x20 : '<inventory_root>/system/motherboard/dimm2',
- 0x21 : '<inventory_root>/system/motherboard/dimm3',
+ 0x2f : '<inventory_root>/system/chassis/motherboard/cpu0',
+ 0x22 : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
+ 0x23 : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
+ 0x24 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
+ 0x25 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
+ 0x26 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
+ 0x27 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
+ 0x28 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
+ 0x29 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
+ 0x2a : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
+ 0x2b : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
+ 0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
+ 0x2d : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
+ 0x2e : '<inventory_root>/system/chassis/motherboard/centaur0',
+ 0x1e : '<inventory_root>/system/chassis/motherboard/dimm0',
+ 0x1f : '<inventory_root>/system/chassis/motherboard/dimm1',
+ 0x20 : '<inventory_root>/system/chassis/motherboard/dimm2',
+ 0x21 : '<inventory_root>/system/chassis/motherboard/dimm3',
0x09 : '/org/openbmc/sensor/virtual/BootCount',
0x05 : '/org/openbmc/sensor/virtual/BootProgress',
0x04 : '/org/openbmc/sensor/virtual/HostStatus',
@@ -435,8 +343,8 @@
0x32 : '/org/openbmc/sensor/virtual/OperatingSystemStatus',
},
'GPIO_PRESENT' : {
- 'SLOT0_PRESENT' : '<inventory_root>/system/io_board/pcie_slot0',
- 'SLOT1_PRESENT' : '<inventory_root>/system/io_board/pcie_slot1',
+ 'SLOT0_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot0',
+ 'SLOT1_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot1',
}
}
@@ -453,8 +361,8 @@
GPIO_CONFIG['SLOT0_RISER_PRESENT'] = { 'gpio_num': 104, 'direction': 'in' }
GPIO_CONFIG['SLOT1_RISER_PRESENT'] = { 'gpio_num': 105, 'direction': 'in' }
GPIO_CONFIG['SLOT2_RISER_PRESENT'] = { 'gpio_num': 106, 'direction': 'in' }
-GPIO_CONFIG['SLOT0_PRESENT'] = { 'gpio_num': 107, 'direction': 'in' }
-GPIO_CONFIG['SLOT1_PRESENT'] = { 'gpio_num': 108, 'direction': 'in' }
+GPIO_CONFIG['SLOT0_PRESENT'] = { 'gpio_num': 470, 'direction': 'in' }
+GPIO_CONFIG['SLOT1_PRESENT'] = { 'gpio_num': 471, 'direction': 'in' }
GPIO_CONFIG['SLOT2_PRESENT'] = { 'gpio_num': 109, 'direction': 'in' }
GPIO_CONFIG['MEZZ0_PRESENT'] = { 'gpio_num': 112, 'direction': 'in' }
GPIO_CONFIG['MEZZ1_PRESENT'] = { 'gpio_num': 113, 'direction': 'in' }
diff --git a/bin/chassis_control.py b/bin/chassis_control.py
index bf84a13..6283aca 100755
--- a/bin/chassis_control.py
+++ b/bin/chassis_control.py
@@ -126,7 +126,7 @@
## Signal handler
def SystemStateHandler(self,state_name):
- if (state_name == "POWERED_OFF" and self.reboot==1):
+ if (state_name == "HOST_POWERED_OFF" and self.reboot==1):
self.powerOn()
diff --git a/bin/sensors_virtual_p8.py b/bin/sensors_virtual_p8.py
index 55aa149..c348e83 100755
--- a/bin/sensors_virtual_p8.py
+++ b/bin/sensors_virtual_p8.py
@@ -53,7 +53,7 @@
SensorValue.__init__(self)
dbus.service.Object.__init__(self,bus,name)
-HS_IFACE = 'org.openbmc.HostStatus'
+CONTROL_IFACE = 'org.openbmc.Control'
class HostStatusSensor(SensorValue):
def __init__(self,bus,name):
SensorValue.__init__(self)
@@ -64,19 +64,37 @@
in_signature='v', out_signature='')
def setValue(self,value):
SensorValue.setValue(self,value)
- if (value == "BOOTED"):
- self.Booted()
+ if (value == "BLAH"):
+ self.GotoSystemState("OS_BOOTED")
- @dbus.service.signal(HS_IFACE,signature='')
- def Booted(self):
+ @dbus.service.signal(CONTROL_IFACE,signature='s')
+ def GotoSystemState(self,state):
pass
+CONTROL_IFACE = 'org.openbmc.Control'
+class BootProgressSensor(SensorValue):
+ def __init__(self,bus,name):
+ SensorValue.__init__(self)
+ dbus.service.Object.__init__(self,bus,name)
+
+ ##override setValue method
+ @dbus.service.method(SensorValue.IFACE_NAME,
+ in_signature='v', out_signature='')
+ def setValue(self,value):
+ SensorValue.setValue(self,value)
+ if (value == "FW Progress, Starting OS"):
+ self.GotoSystemState("HOST_BOOTED")
+
+ @dbus.service.signal(CONTROL_IFACE,signature='s')
+ def GotoSystemState(self,state):
+ pass
+
+
if __name__ == '__main__':
sensors = {
- 'BootProgress' : None,
'OperatingSystemStatus' : None,
'BootCount' : None,
'OccStatus' : None,
@@ -88,6 +106,7 @@
sensors[instance]= VirtualSensor(bus,OBJ_PATH+instance)
sensors['HostStatus'] = HostStatusSensor(bus,OBJ_PATH+"HostStatus")
+ sensors['BootProgress'] = BootProgressSensor(bus,OBJ_PATH+"BootProgress")
mainloop = gobject.MainLoop()
## Initialize sensors
diff --git a/bin/system_manager.py b/bin/system_manager.py
index 441e957..7f94578 100755
--- a/bin/system_manager.py
+++ b/bin/system_manager.py
@@ -56,9 +56,10 @@
new_val = val.replace("<inventory_root>",System.INVENTORY_ROOT)
System.ID_LOOKUP[category][key] = new_val
- self.SystemStateHandler("BMC_INIT")
+ self.SystemStateHandler(System.SYSTEM_STATES[0])
print "SystemManager Init Done"
+
def SystemStateHandler(self,state_name):
print "Checking previous state started..."
i = 0
@@ -97,10 +98,27 @@
pass
self.current_state = state_name
-
+
+ def gotoNextState(self):
+ s = 0
+ for i in range(len(System.SYSTEM_STATES)):
+ if (System.SYSTEM_STATES[i] == self.current_state):
+ s = i+1
+
+ if (s == len(System.SYSTEM_STATES)):
+ print "ERROR SystemManager: No more system states"
+ else:
+ new_state_name = System.SYSTEM_STATES[s]
+ print "SystemManager Goto System State: "+new_state_name
+ self.SystemStateHandler(new_state_name)
+
+
@dbus.service.method(DBUS_NAME,
- in_signature='ss', out_signature='(sss)')
- def getObjectFromId(self,category,key):
+ in_signature='', out_signature='s')
+ def getSystemState(self):
+ return self.current_state
+
+ def doObjectLookup(self,category,key):
bus_name = ""
obj_path = ""
intf_name = INTF_ITEM
@@ -108,25 +126,6 @@
obj_path = System.ID_LOOKUP[category][key]
bus_name = self.bus_name_lookup[obj_path]
parts = obj_path.split('/')
- if (parts[2] == 'sensor'):
- intf_name = INTF_SENSOR
- except Exception as e:
- print "ERROR SystemManager: "+str(e)+" not found in lookup"
-
- return [bus_name,obj_path,intf_name]
-
-
- @dbus.service.method(DBUS_NAME,
- in_signature='sy', out_signature='(sss)')
- def getObjectFromByteId(self,category,key):
- bus_name = ""
- obj_path = ""
- intf_name = INTF_ITEM
- try:
- byte = int(key)
- obj_path = System.ID_LOOKUP[category][byte]
- bus_name = self.bus_name_lookup[obj_path]
- parts = obj_path.split('/')
if (parts[3] == 'sensor'):
intf_name = INTF_SENSOR
except Exception as e:
@@ -134,6 +133,16 @@
return [bus_name,obj_path,intf_name]
+ @dbus.service.method(DBUS_NAME,
+ in_signature='ss', out_signature='(sss)')
+ def getObjectFromId(self,category,key):
+ return self.doObjectLookup(category,key)
+
+ @dbus.service.method(DBUS_NAME,
+ in_signature='sy', out_signature='(sss)')
+ def getObjectFromByteId(self,category,key):
+ byte = int(key)
+ return self.doObjectLookup(category,byte)
def start_process(self,bus_name):
if (System.SYSTEM_CONFIG[bus_name]['start_process'] == True):
@@ -176,7 +185,6 @@
break;
return r
-
def NewBusHandler(self, bus_name, a, b):
if (len(b) > 0 and bus_name.find(Openbmc.BUS_PREFIX) == 0):
objects = {}
@@ -192,7 +200,6 @@
pass
if (System.SYSTEM_CONFIG.has_key(bus_name)):
- System.SYSTEM_CONFIG[bus_name]['heartbeat_count'] = 0
for instance_name in objects.keys():
obj_path = objects[instance_name]['PATH']
for instance in System.SYSTEM_CONFIG[bus_name]['instances']:
@@ -213,18 +220,9 @@
for obj_path in System.EXIT_STATE_DEPEND[self.current_state]:
if (System.EXIT_STATE_DEPEND[self.current_state][obj_path] == 0):
state = 0
+ ## all required objects have started so go to next state
if (state == 1):
- s = 0
- for i in range(len(System.SYSTEM_STATES)):
- if (System.SYSTEM_STATES[i] == self.current_state):
- s = i+1
-
- if (s == len(System.SYSTEM_STATES)):
- print "ERROR SystemManager: No more system states"
- else:
- new_state_name = System.SYSTEM_STATES[s]
- print "SystemManager Goto System State: "+new_state_name
- self.SystemStateHandler(new_state_name)
+ self.gotoNextState()
except:
pass
diff --git a/objects/control_host_obj.c b/objects/control_host_obj.c
index 9f6fb92..d051f88 100644
--- a/objects/control_host_obj.c
+++ b/objects/control_host_obj.c
@@ -91,7 +91,7 @@
gpio_close(&fsi_enable);
gpio_close(&cronus_sel);
- control_emit_goto_system_state(control,"BOOTING");
+ control_emit_goto_system_state(control,"HOST_BOOTING");
control_host_emit_booted(host);
return TRUE;