Re: error: building kvm for powerpc using cross compiler on x86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 13 January 2011 04:23 AM, Alexander Graf wrote:
On 12.01.2011, at 21:51, Dushyant Bansal<cs5070214@xxxxxxxxxxxxxx>  wrote:

$ 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 ?
Did you select it as * or M? If it's *, there is no module - everything is in the kernel and (with proper udev) you should just get /dev/kvm.

Alex

Yes, I am using * for selection. Thanks for the info.

Dushyant
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux