<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>From: Eric W. Biederman <ebiederm@xmission.com><br>Subject: Re: [Fastboot] kexec - 2.6.14 - loads BIOS again<br>To: "Prabhakar K." <krishkar99@yahoo.com><br>Cc: "Kexec Mailing List" <kexec@lists.infradead.org>, fastboot@lists.linux-foundation.org<br>Date: Tuesday, September 29, 2009, 6:11 AM<br><br><div class="plainMail">"Prabhakar K." <<a ymailto="mailto:krishkar99@yahoo.com" href="/mc/compose?to=krishkar99@yahoo.com">krishkar99@yahoo.com</a>> writes:<br><br>>> Hi - After my previous posting I was able to make some progress.<br>>><br>>> When I do<br>>><br>>> kexec -l vmlinux --append="init 1 root=/dev/hda2" --console-serial<br>>><br>>> and <br>>> kexec -e,<br>>><br>>> I get message:<br>>><br>>> Starting new kernel<br>>> I'm in
purgatory<br>>><br>>> And after that it still boots from BIOS (to the same first kernel).<br>>><br>>> Whats the problem here?<br>><br>> I would recommend instrumenting up purgatory and then your target kernel.<br>><br>> It is quite possible the problem is in your backport.<br>><br>>>>>><br>> I have instrumented the purgatory code. when I run kexec -e, It hangs for a<br>> while at <br>> sha256_starts(&ctx); in the function verify_sha256_digest(), and then reboots<br>> to the first kernel (from BIOS). I have put debug prints in sha256_starts, but<br>> none of those are executed.<br>><br>> Interestingly, the same function sha256_starts is executed during kexec -l,<br>> which is called as part of update_purgatory( )( when my_load( ) is called from<br>> kexec.c).<br>> so its surprise why the same function is giving problems when kexec -e is run.<br><br>Do you
by any chance have a watchdog you are not petting?</div><div class="plainMail"><br></div><div class="plainMail">>> Yes, we do have software watchdog and hardware watchdog. I disabled software watchdog and I think the reason for resetting to the first kernel can be explained due to hardware watchdog kicking in.</div><div class="plainMail"><br></div><div class="plainMail">To try out a different version of the kexec, I took kexec version 20080227 from <a href="http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/">http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/</a></div><div class="plainMail"><a href="http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/"></a>and instrumented that code as well. With this, I was able to see the sha 256 verification done during kexec -e and also the post verification of purgatory code. And it hangs there (does not reboot to the first kernel).</div><div
class="plainMail"><br></div><div class="plainMail">So, any conclusions based on these ? Please CC me in reply. Thanks !!<br><br>Eric</div></td></tr></table><br>