Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from Azure:master #189

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ s6100/scripts/iom_power_*.sh usr/local/bin
s6100/scripts/s6100_platform.sh usr/local/bin
common/dell_i2c_utils.sh usr/local/bin
common/io_rd_wr.py usr/local/bin
s6100/scripts/platform_reboot_override usr/share/sonic/device/x86_64-dell_s6100_c2538-r0
s6100/scripts/override.conf /etc/systemd/system/systemd-reboot.service.d
common/dell_lpc_mon.sh usr/local/bin
common/platform_reboot usr/share/sonic/device/x86_64-dell_s6100_c2538-r0
s6100/scripts/platform_sensors.py usr/local/bin
s6100/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-dell_s6100_c2538-r0
s6100/scripts/platform_watchdog_enable.sh usr/local/bin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ z9100/scripts/z9100_platform.sh usr/local/bin
common/dell_i2c_utils.sh usr/local/bin
common/dell_lpc_mon.sh usr/local/bin
common/io_rd_wr.py usr/local/bin
common/platform_reboot usr/share/sonic/device/x86_64-dell_z9100_c2538-r0
z9100/scripts/platform_reboot_override usr/share/sonic/device/x86_64-dell_z9100_c2538-r0
z9100/scripts/override.conf /etc/systemd/system/systemd-reboot.service.d
z9100/scripts/platform_sensors.py usr/local/bin
z9100/scripts/sensors usr/bin
z9100/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-dell_z9100_c2538-r0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/share/sonic/device/x86_64-dell_s6100_c2538-r0/platform_reboot_override
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/python
import sys
import os
import struct

PORT_RES = '/dev/port'


def portio_reg_write(resource, offset, val):
fd = os.open(resource, os.O_RDWR)
if(fd < 0):
print 'file open failed %s" % resource'
return
if(os.lseek(fd, offset, os.SEEK_SET) != offset):
print 'lseek failed on %s' % resource
return
ret = os.write(fd, struct.pack('B', val))
if(ret != 1):
print 'write failed %d' % ret
return
os.close(fd)

if __name__ == "__main__":
portio_reg_write(PORT_RES, 0xcf9, 0xe)

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/share/sonic/device/x86_64-dell_z9100_c2538-r0/platform_reboot_override
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/python
import sys
import os
import struct

PORT_RES = '/dev/port'


def portio_reg_write(resource, offset, val):
fd = os.open(resource, os.O_RDWR)
if(fd < 0):
print 'file open failed %s" % resource'
return
if(os.lseek(fd, offset, os.SEEK_SET) != offset):
print 'lseek failed on %s' % resource
return
ret = os.write(fd, struct.pack('B', val))
if(ret != 1):
print 'write failed %d' % ret
return
os.close(fd)

if __name__ == "__main__":
portio_reg_write(PORT_RES, 0xcf9, 0xe)