kenel Oops excute reboot function

we could manual trigger watchdog:

excute:

echo c > /proc/sysrq-trigger


int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE;

panic_on_oops:
Controls the kernel's behaviour when an oops or BUG is encountered.
0: try to continue operation
1: panic immediately.  If the `panic' sysctl is also non-zero then the

   machine will be rebooted.

modfiy:

vim kernel/panic.c +33
int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE;

add 
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_ON_OOPS_VALUE=1

CONFIG_PANIC_TIMEOUT=3

你可能感兴趣的:(开发)