sonic-buildimage/device/celestica/x86_64-cel_e1031-r0/platform_reboot
Ikki Zhu 9a7eb495c2
[E1031] add platform specific reboot command support (#15889)
* [E1031] add platform specific reboot command support

Why I did it
E1031: add platform specific cold reboot support

How I did it
Use the CPLD to trigger board level power cycle when cold reboot

How to verify it
Do reboot stress test and check the reboot cause history

* [E1031] try to umount filesystem before power cycle reboot

* [E1031] remove fstrim in customized reboot script
2023-08-02 17:20:53 -07:00

10 lines
195 B
Bash
Executable File

#!/bin/bash
declare -r CPLD_SETREG_PATH="/sys/bus/platform/devices/e1031.smc/setreg"
sync ; sync
umount -fa > /dev/null 2&>1
# Board level power cycle
echo "0x0113 0xAA" > ${CPLD_SETREG_PATH}