Skip to content

Commit

Permalink
[DellEMC] S6100 Platform Service optimization porting in master (#11330)
Browse files Browse the repository at this point in the history
To reduce rc.local script execution time. Porting changes from [DellEMC] S6100 Platform Service optimization #10989
Changes:
Moving platform-modules-s6100.service and s6100-lpc-monitor.service asynchronous to rc.local script.
  • Loading branch information
santhosh-kt authored Aug 2, 2022
1 parent ba1e1a9 commit 847a290
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 64 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# postinst script for S6100

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

systemctl enable s6100-lpc-monitor.service
systemctl start s6100-lpc-monitor.service
systemctl start --no-block platform-modules-s6100.service

#DEBHELPER#
3 changes: 3 additions & 0 deletions platform/broadcom/sonic-platform-modules-dell/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ override_dh_auto_install:

override_dh_usrlocal:

override_dh_installmodules:
dh_installmodules --no-scripts;

override_dh_clean:
dh_clean
set -e; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
#platform init script for Dell S6100

if [[ "$1" == "init" ]]; then
depmod -a
case "$(cat /proc/cmdline)" in
*SONIC_BOOT_TYPE=warm*)
TYPE='warm'
;;
*SONIC_BOOT_TYPE=fastfast*)
TYPE='fastfast'
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
TYPE='fast'
;;
*SONIC_BOOT_TYPE=soft*)
TYPE='soft'
;;
*)
TYPE='cold'
esac

if [[ "$TYPE" == "cold" ]]; then
/usr/local/bin/iom_power_on.sh
fi

systemctl enable s6100-lpc-monitor.service
systemctl start --no-block s6100-lpc-monitor.service

pericom="/sys/bus/pci/devices/0000:08:00.0"
modprobe i2c-dev
Expand All @@ -24,23 +48,6 @@ if [[ "$1" == "init" ]]; then

systemctl start --no-block s6100-ssd-upgrade-status.service

case "$(cat /proc/cmdline)" in
*SONIC_BOOT_TYPE=warm*)
TYPE='warm'
;;
*SONIC_BOOT_TYPE=fastfast*)
TYPE='fastfast'
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
TYPE='fast'
;;
*SONIC_BOOT_TYPE=soft*)
TYPE='soft'
;;
*)
TYPE='cold'
esac

if [[ "$TYPE" == "cold" ]]; then
systemctl start s6100-platform-startup.service
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Dell S6100 Platform modules
Before=pmon.service determine-reboot-cause.service
Before=pmon.service determine-reboot-cause.service pcie-check.service system-health.service watchdog-control.service
DefaultDependencies=no

[Service]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Dell S6100 Platform Startup Service
Before=pmon.service determine-reboot-cause.service
Before=pmon.service determine-reboot-cause.service pcie-check.service system-health.service watchdog-control.service
DefaultDependencies=no

[Service]
Expand Down

0 comments on commit 847a290

Please sign in to comment.