From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTi7f-0007ZX-JG for qemu-devel@nongnu.org; Sun, 01 Feb 2009 14:36:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTi7d-0007Vw-HN for qemu-devel@nongnu.org; Sun, 01 Feb 2009 14:36:50 -0500 Received: from [199.232.76.173] (port=48416 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTi7d-0007Va-Ah for qemu-devel@nongnu.org; Sun, 01 Feb 2009 14:36:49 -0500 Received: from yx-out-1718.google.com ([74.125.44.157]:53074) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTi7c-0000Rt-VF for qemu-devel@nongnu.org; Sun, 01 Feb 2009 14:36:49 -0500 Received: by yx-out-1718.google.com with SMTP id 3so584945yxi.82 for ; Sun, 01 Feb 2009 11:36:46 -0800 (PST) Message-ID: <4985F9BD.6080809@codemonkey.ws> Date: Sun, 01 Feb 2009 13:36:29 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] How linux kernel is directly loaded? References: <1233468649.5990.3.camel@himanshu-laptop> In-Reply-To: <1233468649.5990.3.camel@himanshu-laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: thakur@symmetricore.com, qemu-devel@nongnu.org Thakur wrote: > Hi, > > I was searching for code in qemu which is directly able to load linux > kernel with -k option. Which file implements it? Can someone point me to > location where this load process is described? My objective is to load > the Minix kernel in same fashion. > It's different for every architecture but since you're interested in Minix, I assume you're interested in x86. The important bits are in hw/pc.c:load_linux(). Currently, the way this is implemented is by loading the kernel into memory and creating a tiny option rom that hijacks int19. int19 is the BIOS boot interrupt so this allows us to run our own tiny boot loader that loads the kernel that we previously loaded into memory. Depending on how different the Minix boot protocol is, it should be relatively easy to adapt. Regards, Anthony Liguori > Thanks > > Best Regards > - Thakur > > > >