Skip to content
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
2 changes: 0 additions & 2 deletions debian/sonic-platform-nokia-ixr7220h6-128.install
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
ixr7220h6-128/scripts/h6_128_platform_init.sh usr/local/bin
ixr7220h6-128/scripts/bmc_network_init.sh usr/local/bin
ixr7220h6-128/scripts/ports_notify.py usr/local/bin
ixr7220h6-128/service/h6_128_platform_init.service etc/systemd/system
ixr7220h6-128/service/bmc_network_init.service etc/systemd/system
ixr7220h6-128/service/ports_notify.service etc/systemd/system/
ixr7220h6-128/service/70-bmc-usb-network.rules etc/udev/rules.d
ixr7220h6-128/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-nokia_ixr7220_h6_128-r0
11 changes: 8 additions & 3 deletions debian/sonic-platform-nokia-ixr7220h6-128.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
# see: dh_installdeb(1)

chmod a+x /usr/local/bin/h6_128_platform_init.sh
chmod a+x /usr/local/bin/bmc_network_init.sh
systemctl daemon-reload || true
systemctl enable h6_128_platform_init.service
systemctl start h6_128_platform_init.service
# Bind service activation to usb0 device unit; avoid eager start at package install.
systemctl enable bmc_network_init.service
udevadm control --reload-rules || true
# Rename on first deb installation if usb0 is already created
# before udev rule is copied
if [ -d /sys/class/net/usb0 ] && [ ! -d /sys/class/net/bmc0 ]; then
mac=$(cat /sys/class/net/usb0/address 2>/dev/null || true)
if [ "$mac" = "02:00:00:00:00:02" ]; then
ip link set usb0 name bmc0 || true
fi
fi
udevadm trigger --subsystem-match=net || true
chmod a+x /usr/local/bin/ports_notify.py
systemctl enable ports_notify.service
Expand Down
70 changes: 0 additions & 70 deletions ixr7220h6-128/scripts/bmc_network_init.sh

This file was deleted.

5 changes: 2 additions & 3 deletions ixr7220h6-128/service/70-bmc-usb-network.rules
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
SUBSYSTEM=="net", ACTION=="add", KERNEL=="usb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bmc_network_init.service"
SUBSYSTEM=="net", ACTION=="change", KERNEL=="usb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bmc_network_init.service"
SUBSYSTEM=="net", ACTION=="change", KERNEL=="bmc0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bmc_network_init.service"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="02:00:00:00:00:02", NAME="bmc0"
SUBSYSTEM=="net", ACTION=="move", KERNEL=="bmc0", ATTR{address}=="02:00:00:00:00:02", TAG+="systemd", ENV{SYSTEMD_WANTS}+="ifup@bmc0.service"
12 changes: 0 additions & 12 deletions ixr7220h6-128/service/bmc_network_init.service

This file was deleted.

2 changes: 1 addition & 1 deletion ixr7220h6-128/sonic_platform/chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def get_reboot_cause(self):
if val1 & 0x02:
return (self.REBOOT_CAUSE_HARDWARE_OTHER, "CPU Over Heat")
if val2 == 0x5A:
return (self.REBOOT_CAUSE_POWER_LOSS, "BMC Remote Power Cycle")
return (self.REBOOT_CAUSE_POWER_DOWN_REQUEST_FROM_BMC, None)
if val1 & 0x08:
return (self.REBOOT_CAUSE_POWER_LOSS, "Power Cycle")
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
Expand Down
Loading