Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
[sonic-platforms-modules-dell] fix backport to 201807 (#44)
Browse files Browse the repository at this point in the history
This commit backports the fixes of depmod and systemd support
for s6100 and z9100 from master branch to 201807. Built the
SONiC binary loaded on both s6100 and z9100 checked the enumerations
of i2c drivers. Did ONIE install and sonic_installer of binaries
rebooted the units and checked.

Signed-off-by: Harish Venkatraman <[email protected]>
  • Loading branch information
vharish02 authored and Shuotian Cheng committed Nov 6, 2018
1 parent 8bc799d commit 8778f07
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 5 deletions.
2 changes: 1 addition & 1 deletion debian/platform-modules-s6100.install
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ common/fstrim.timer etc/systemd/system
common/fstrim.service etc/systemd/system
s6100/scripts/platform_sensors.py usr/local/bin
s6100/scripts/sensors usr/bin

s6100/systemd/platform-modules-s6100.service etc/systemd/system
5 changes: 5 additions & 0 deletions debian/platform-modules-s6100.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
systemctl enable fstrim.timer
systemctl start fstrim.timer

# Enable Dell-S6100-platform-service
depmod -a
systemctl enable platform-modules-s6100.service
systemctl start platform-modules-s6100.service

#DEBHELPER#
1 change: 1 addition & 0 deletions debian/platform-modules-z9100.install
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ common/fstrim.service etc/systemd/system
z9100/scripts/platform_sensors.py usr/local/bin
z9100/scripts/sensors usr/bin
z9100/cfg/z9100-modules.conf etc/modules-load.d
z9100/systemd/platform-modules-z9100.service etc/systemd/system
5 changes: 5 additions & 0 deletions debian/platform-modules-z9100.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
systemctl enable fstrim.timer
systemctl start fstrim.timer

# Enable Dell-Z9100-platform-service
depmod -a
systemctl enable platform-modules-z9100.service
systemctl start platform-modules-z9100.service

#DEBHELPER#
14 changes: 14 additions & 0 deletions s6100/systemd/platform-modules-s6100.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Dell S6100 Platform modules
Before=pmon.service
DefaultDependencies=no

[Service]
Type=oneshot
ExecStartPre=/usr/local/bin/iom_power_on.sh
ExecStart=/usr/local/bin/s6100_platform.sh init
ExecStop=/usr/local/bin/s6100_platform.sh deinit
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
7 changes: 3 additions & 4 deletions z9100/scripts/platform_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

Z9100_MAX_FAN_TRAYS = 5
Z9100_MAX_PSUS = 2
S6100_MAX_IOMS = 4

MAILBOX_DIR = "/sys/devices/platform/SMF.512/hwmon/hwmon1"

Expand Down Expand Up @@ -42,10 +41,10 @@ def get_pmc_register(reg_name):
logging.basicConfig(level=logging.DEBUG)

if (os.path.isdir(MAILBOX_DIR)):
print 'dell-s6100-lpc'
print 'Adapter: S6100 Platform Management Controller'
print 'dell-z9100-lpc'
print 'Adapter: Z9100 Platform Management Controller'
else:
logging.error('S6100 Platform Management Controller module not loaded !')
logging.error('Z9100 Platform Management Controller module not loaded !')
# sys.exit(0)

# Print the information for temperature sensors
Expand Down
13 changes: 13 additions & 0 deletions z9100/systemd/platform-modules-z9100.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Dell Z9100 Platform modules
Before=pmon.service
DefaultDependencies=no

[Service]
Type=oneshot
ExecStart=/usr/local/bin/z9100_platform.sh init
ExecStop=/usr/local/bin/z9100_platform.sh deinit
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

0 comments on commit 8778f07

Please sign in to comment.