summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn/recipes-phosphor/initfs/files/failsafe-boot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn/recipes-phosphor/initfs/files/failsafe-boot.sh')
-rw-r--r--meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn/recipes-phosphor/initfs/files/failsafe-boot.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn/recipes-phosphor/initfs/files/failsafe-boot.sh b/meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn/recipes-phosphor/initfs/files/failsafe-boot.sh
new file mode 100644
index 000000000..ea1bd0711
--- /dev/null
+++ b/meta-openbmc-machines/meta-x86/meta-mellanox/meta-msn/recipes-phosphor/initfs/files/failsafe-boot.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+echo "----------------
+System entered recovery mode. Running from backup flash!!!
+help for get ip:
+ifconfig eth0 $IP netmask $NETMASK up;
+route add default gw $GATEWAY eth0
+Or type udhcpc to get ip over dhcp.
+Please scp image file to /tmp folder and re-burn main flash with:
+/run/initramfs/recovery /tmp/<bmc-image-file>.
+----------------";
+
+mkdir /run/lock;
+
+mkdir /dev/mtd;
+
+ln -s /run/mtd\:u-boot-env /dev/mtd/u-boot-env;
+
+/usr/bin/mlx-hw-events.sh add reset /sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@1e78a000/1e78a140.i2c-bus/i2c-4/4-0071/mlxreg-core.1137/hwmon/hwmon*;
+
+mount /dev/mtdblock5 /run/initramfs/rw -t jffs2 -o remount,ro;
+mount tmpfs tmp -t tmpfs -o mode=755,nodev;
+
+export PS1="(recovery)\u@BMC:\w\$"
+
+while true;
+do
+ /run/initramfs/ro/sbin/sulogin;
+done
+
OpenPOWER on IntegriCloud