Skip to content

Commit

Permalink
[mellanox]: Adapt to new hw-management package (#12)
Browse files Browse the repository at this point in the history
Use single start script for all platforms and remove symbolic links
Change path to system eeprom

Signed-off-by: marian-pritsak <[email protected]>
  • Loading branch information
marian-pritsak authored and lguohan committed Jan 26, 2018
1 parent 74a2535 commit c99dff7
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2100-r0/hw-management

This file was deleted.

2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2100-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class board(eeprom_tlvinfo.TlvInfoDecoder):
_TLV_INFO_MAX_LEN = 256

def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/bsp/eeprom/sys_eeprom"
self.eeprom_path = "/bsp/eeprom/vpd_info"
super(board, self).__init__(self.eeprom_path, 0, '', True)
1 change: 0 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2410-r0/hw-management

This file was deleted.

2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2410-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class board(eeprom_tlvinfo.TlvInfoDecoder):
_TLV_INFO_MAX_LEN = 256

def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/bsp/eeprom/sys_eeprom"
self.eeprom_path = "/bsp/eeprom/vpd_info"
super(board, self).__init__(self.eeprom_path, 0, '', True)
1 change: 0 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/hw-management

This file was deleted.

2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class board(eeprom_tlvinfo.TlvInfoDecoder):
_TLV_INFO_MAX_LEN = 256

def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/bsp/eeprom/sys_eeprom"
self.eeprom_path = "/bsp/eeprom/vpd_info"
super(board, self).__init__(self.eeprom_path, 0, '', True)
1 change: 0 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2740-r0/hw-management

This file was deleted.

2 changes: 1 addition & 1 deletion device/mellanox/x86_64-mlnx_msn2740-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class board(eeprom_tlvinfo.TlvInfoDecoder):
_TLV_INFO_MAX_LEN = 256

def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/bsp/eeprom/sys_eeprom"
self.eeprom_path = "/bsp/eeprom/vpd_info"
super(board, self).__init__(self.eeprom_path, 0, '', True)
4 changes: 2 additions & 2 deletions files/build_templates/swss.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ExecStartPre=/usr/bin/mst start
ExecStartPre=/usr/bin/mlnx-fw-upgrade.sh
ExecStartPre=/etc/init.d/sxdkernel start
ExecStartPre=/sbin/modprobe i2c-dev
ExecStartPre=/bin/bash -c "/usr/share/sonic/device/$(sonic-cfggen -v platform)/hw-management start"
ExecStartPre=/etc/mlnx/mlnx-hw-management start
{% elif sonic_asic_platform == 'cavium' %}
ExecStartPre=/etc/init.d/xpnet.sh start
{% endif %}
Expand All @@ -43,7 +43,7 @@ ExecStop=/usr/bin/{{docker_container_name}}.sh stop
ExecStopPost=/usr/bin/syncd.sh stop

{% if sonic_asic_platform == 'mellanox' %}
ExecStopPost=/bin/bash -c "/usr/share/sonic/device/$(sonic-cfggen -v platform)/hw-management stop"
ExecStopPost=/etc/mlnx/mlnx-hw-management stop
ExecStopPost=/etc/init.d/sxdkernel stop
ExecStopPost=/usr/bin/mst stop
{% elif sonic_asic_platform == 'cavium' %}
Expand Down

0 comments on commit c99dff7

Please sign in to comment.