From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IjtV6-0002bC-IW for qemu-devel@nongnu.org; Mon, 22 Oct 2007 05:23:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IjtV4-0002aa-Uo for qemu-devel@nongnu.org; Mon, 22 Oct 2007 05:23:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjtV4-0002aU-PG for qemu-devel@nongnu.org; Mon, 22 Oct 2007 05:23:06 -0400 Received: from honiara.magic.fr ([195.154.193.36]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IjtV3-0003Ba-Hd for qemu-devel@nongnu.org; Mon, 22 Oct 2007 05:23:06 -0400 Received: from [172.17.17.137] (gw.netgem.com [195.68.2.34]) by honiara.magic.fr (8.13.1/8.13.1) with ESMTP id l9M9MpSM015209 for ; Mon, 22 Oct 2007 11:22:51 +0200 Subject: Re: [Qemu-devel] PreP kernels boot using Qemu From: Jocelyn Mayer In-Reply-To: <1193038567.16781.108.camel@rapid> References: <1193038567.16781.108.camel@rapid> Content-Type: text/plain Date: Mon, 22 Oct 2007 11:23:00 +0200 Message-Id: <1193044980.31445.40.camel@jma4.dev.netgem.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: l_indien@magic.fr, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, 2007-10-22 at 09:36 +0200, J. Mayer wrote: > Hi all, > > I've been investigating more about PreP kernel boot using Qemu and I > achieved to boot 2.4.35, 2.6.12 and 2.6.22 kernels using Qemu CVS and > unmodified OHW. > The issues I found in the kernel are: > - the OpenFirmware video console driver is broken in recent 2.4 kernels > and have been removed from recent 2.6 kernel > - I then decided to use the vga16fb console driver but needed to do some > patches in order to make it compile properly > - the CMOS RTC driver is not available for PPC architecture in 2.6 > kernels and need some patches in order to be usable > - I discovered that the mkprep utility is bugged in 2.4.35 and 2.6.12 > kernels. The bugs are visible only when cross-compiling from a > little-endian and/or 64 bits host. > - I got issues (ie process freezing) when using the 2.6.22 kernel with > HZ > 100. It seems to run properly when the system timer is set to 100 > Hz but this needs more tests for confirmation. > - I got the 2.6.22 kernel crashing (ie kernel Oops in workqueue code) > when it has no RTC available. There is no problem when the RTC is > present. This is likely to be a kernel bug: when no RTC is available, it > cannot calibrate its timers properly and the kernel timer seems to run > very fast. Forcing (with hacks...) the timer to run at nearly real-time > seems to prevent the bug to happen. > > I then generated some kernels that allow me to boot and use those 3 > kernels. > Here are 3 tarballs with: > - a patch to be applied to the vanilla kernel sources to fix the > mentionned bugs > - the .config file I used to build the kernel > - the zImage.prep image > > > > > I then run Qemu with the following command line template: > ./ppc-softmmu/qemu-system-ppc -serial stdio -net nic,model=ne2k_isa -net > tap -net nic,model=ne2k_pci -net tap -net nic,model=rtl8139 -net tap > -cpu 604 -M prep -L pc-bios/ -hda -cdrom > -kernel > /linux-.patched/arch/ppc/boot/images/zImage.prep > > Hope this helps. Two points I forgot: - there is no way to make Qemu stop when the PreP kernel displays "Power down" because the prep_halt routine just does an infinite loop. - the board reset would not work with the current code. I will fix this soon. -- Jocelyn Mayer