2017-03-29 06:17:49 -05:00
|
|
|
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="processor.max_cstate=1 intel_idle.max_cstate=0"
|
2016-07-26 14:01:58 -05:00
|
|
|
|
2017-06-16 02:05:41 -05:00
|
|
|
if [ "$install_env" = "onie" ]; then
|
|
|
|
|
2016-07-26 14:01:58 -05:00
|
|
|
echo "Replace ONIE reboot with Dell reset commands"
|
|
|
|
|
|
|
|
# set I2C GPIO mux
|
2018-03-30 01:39:49 -05:00
|
|
|
[ -d /sys/class/gpio/gpio1 ] || echo 1 > /sys/class/gpio/export
|
|
|
|
[ -d /sys/class/gpio/gpio2 ] || echo 2 > /sys/class/gpio/export
|
2016-07-26 14:01:58 -05:00
|
|
|
echo out > /sys/class/gpio/gpio1/direction
|
|
|
|
echo out > /sys/class/gpio/gpio2/direction
|
|
|
|
echo 0 > /sys/class/gpio/gpio1/value
|
|
|
|
echo 0 > /sys/class/gpio/gpio2/value
|
|
|
|
|
|
|
|
# replace the original reboot binary with the following command
|
2016-09-14 19:08:05 -05:00
|
|
|
# sync flushes file system buffers
|
|
|
|
# i2cset command triggers a hard system reboot, required by ASIC to operate correctly
|
2016-07-26 14:01:58 -05:00
|
|
|
rm /sbin/reboot
|
2016-09-12 19:49:15 -05:00
|
|
|
cat <<EOF >> /sbin/reboot
|
|
|
|
#!/bin/sh
|
|
|
|
sync
|
|
|
|
i2cset -y 0 0x31 1 0xfd
|
|
|
|
EOF
|
|
|
|
|
2016-07-26 14:01:58 -05:00
|
|
|
chmod a+x /sbin/reboot
|
2017-06-16 02:05:41 -05:00
|
|
|
|
|
|
|
fi
|