01org/luv-yocto — pull request #5 by ricardon (2014-06-06 18:15:13+00:00)
Title: Add a crash handler

Hi Matt,

Please find the following patches to add a crash handler.

Given the nature of LuvOS, it is likely that it will interact with UEFI firmware implementations of different levels of maturity. This could cause stability to the Linux kernel and lead to crashes. It can also be possible that the kernel itself has an undiscovered bug.

The crash handler relies on kexec to prepare for a crash before any UEFI test suite is executed. If such a crash occurs, the system will reboot only the kernel to a usable state so that the user can interact with the system and dump any needed information to perform forensic analysis.

The same kernel used for regular boots is also used for recovery. This is because that the piece of software under analysis is not the kernel but the UEFI firmware. Thus, there is no need to use a special or stripped-down kernel.

Pending work to do:
*Add functionality to automatically dump the /proc/vmcore file to non-volatile media.
*Provide a more flexible crashkernel kernel parameter to accomodate systems with different amounts of memory.
*The handler relies on the volume-id of the boot partition to find the vmlinuz and initrd images. Thus, the bootimg.bbclass is modified to allow the usage of a specific volume-id. This needs to either be modified or submitted upstream to the Yocto Project.

Thanks and BR,
Ricardo