Kernel KVM-PPC virtualization development
 help / color / mirror / Atom feed
From: Dushyant Bansal <cs5070214@cse.iitd.ac.in>
To: kvm-ppc@vger.kernel.org
Subject: Re: error: building kvm for powerpc using cross compiler on x86
Date: Wed, 12 Jan 2011 20:54:00 +0000	[thread overview]
Message-ID: <4D2E146D.8000906@cse.iitd.ac.in> (raw)
In-Reply-To: <4D260C69.7000605@cse.iitd.ac.in>


>>> $ cp arch/powerpc/configs/pmac32_defconfig .config
>>> $ make menuconfig ARCH=powerpc
>>>
>>> seems to work. I'm not sure what default config is taken by default, but apparently one of the KVM constraints isn't fulfilled. Since you want to build a kernel for a pmac32 anyways, just take that config as the basis or use the one from a VM you already have working :).
>>>
>>>
>>> Alex
>>>
>>>        
>> I tried to build kernel image for powerpc-750
>> user@user:~/project/kvm$ cp arch/powerpc/configs/pmac32_defconfig .config
>> user@user:~/project/kvm$ make ARCH=powerpc menuconfig
>>
>> [I selected "KVM support for PowerPC book3s_32 processors" under virtualization menu. I have attached the final .config file]
>>
>> user@user:~/project/kvm$ make ARCH=powerpc CROSS_COMPILE=powerpc-750-linux-gnu-
>> [I get this error]
>>    CHK     include/linux/version.h
>>    CHK     include/generated/utsrelease.h
>>    CALL    scripts/checksyscalls.sh
>>    CHK     include/generated/compile.h
>>    CALL    arch/powerpc/kernel/systbl_chk.sh
>>    CALL    arch/powerpc/kernel/prom_init_check.sh
>>    AS      arch/powerpc/kvm/fpu.o
>> arch/powerpc/kvm/fpu.S: Assembler messages:
>> arch/powerpc/kvm/fpu.S:244: Error: Unrecognized opcode: `frsqrtes.'
>> arch/powerpc/kvm/fpu.S:250: Error: Unrecognized opcode: `fre.'
>> arch/powerpc/kvm/fpu.S:259: Error: Unrecognized opcode: `fcpsgn.'
>> make[1]: *** [arch/powerpc/kvm/fpu.o] Error 1
>> make: *** [arch/powerpc/kvm] Error 2
>>      
> This means that your assembler doesn't understand some of the floating point instructions in the paired single emulation code. Since you don't need that code anyways, just comment them out.
>
>    
Thanks a lot, Alex. After debugging some more errors, I was finally able 
to compile it.

user@user:~/kvm$ make distclean
user@user:~/kvm$ cp arch/powerpc/configs/pmac32_defconfig .config
user@user:~/kvm$ make ARCH=powerpc menuconfig
[I selected "KVM support for PowerPC book3s_32 processors" under 
virtualization menu.]
user@user:~/kvm$ make ARCH=powerpc CROSS_COMPILE=powerpc-750-linux-gnu-
user@user:~/kvm$ make ARCH=powerpc CROSS_COMPILE=powerpc-750-linux-gnu- 
modules

Then, I mounted the qemu-system-ppc image "debian_lenny_powerpc.raw".

user@user:/$  losetup /dev/loop0 debian_lenny_powerpc.raw
user@user:/$  kpartx -a /dev/loop0
user@user:/$  mount /dev/mapper/loop0p3 /mnt/image2
user@user:/$  mount /dev/mapper/loop0p2 /mnt/image2/boot/

user@user:~/kvm$ sudo make ARCH=powerpc 
CROSS_COMPILE=powerpc-750-linux-gnu- INSTALL_NOD_PATH="/mnt/image2" 
modules_install

[Replaced /boot/vmlinux with the generated vmlinux]
user@user:~/kvm$ cp vmlinux /mnt/image2/boot/vmlinux

And, on booting that image [debian_lenny_powerpc.raw], I can see the new 
kernel image.

# uname -r
2.6.37-rc6+
But still, I cannot find the kvm module. File kvm.ko is not present 
inside "lib/modules/2.6.37-rc6+/"

# modprobe kvm
FATAL: Module kvm not found.

Am I missing something? How do I build kvm module ?

Thanks,


  parent reply	other threads:[~2011-01-12 20:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 18:51 error: building kvm for powerpc using cross compiler on x86 Dushyant Bansal
2011-01-06 19:36 ` Hollis Blanchard
2011-01-07  6:52 ` Dushyant
2011-01-07 12:37 ` Alexander Graf
2011-01-07 13:50 ` Dushyant Bansal
2011-01-09  9:55 ` Dushyant Bansal
2011-01-10 12:29 ` Alexander Graf
2011-01-11 12:56 ` Alexander Graf
2011-01-12 20:54 ` Dushyant Bansal [this message]
2011-01-12 22:53 ` Alexander Graf
2011-01-13 11:53 ` Dushyant Bansal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D2E146D.8000906@cse.iitd.ac.in \
    --to=cs5070214@cse.iitd.ac.in \
    --cc=kvm-ppc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox