[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
This commit is contained in:
parent
b23ec06a87
commit
9a7eb495c2
9
device/celestica/x86_64-cel_e1031-r0/platform_reboot
Executable file
9
device/celestica/x86_64-cel_e1031-r0/platform_reboot
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/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}
|
8
device/celestica/x86_64-cel_e1031-r0/platform_update_reboot_cause
Executable file
8
device/celestica/x86_64-cel_e1031-r0/platform_update_reboot_cause
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
REBOOT_USER=$(logname)
|
||||||
|
REBOOT_TIME=$(date)
|
||||||
|
declare -r REBOOT_CAUSE_FILE="/host/reboot-cause/reboot-cause.txt"
|
||||||
|
|
||||||
|
echo "User issued 'reboot' with platform-specific command [User: ${REBOOT_USER}, Time: ${REBOOT_TIME}]" > ${REBOOT_CAUSE_FILE}
|
||||||
|
sync
|
Reference in New Issue
Block a user