OpenVZ Forum


Home » General » Support » *SOLVED* OpenVZ on PPC?
*SOLVED* OpenVZ on PPC? [message #12959] Wed, 16 May 2007 04:04 Go to next message
mbaranczak
Messages: 6
Registered: May 2007
Junior Member
Has anyone successfully built a kernel with OpenVZ for 32-bit PPC?

I'm trying to apply the patch, but I keep getting compile errors. Here's the latest one:

  LD [M]  lib/zlib_inflate/zlib_inflate.o
  Building modules, stage 2.
  MODPOST
WARNING: "__cmpdi2" [fs/vzdquota.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.18-openvz'
make: *** [debian/stamp-build-kernel] Error 2


I'm running Debian Etch on a G3 Mac. Kernel version is 2.6.18.

[Updated on: Fri, 18 May 2007 07:04] by Moderator

Report message to a moderator

Re: OpenVZ on PPC? [message #12962 is a reply to message #12959] Wed, 16 May 2007 06:24 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

we've never tried OpenVZ on PPC (only on PPC64), because unfortunately we don't have such hardware locally. But it should work and we'll be happy to help you running OpenVZ on PPC.

So, the first questions are, can you tell us OpenVZ patch version you're using? And where do you get this patch? Also, am I right that you're applying it to Debian Etch kernel sources?

Thank you,
Vasily.
Re: OpenVZ on PPC? [message #12983 is a reply to message #12962] Wed, 16 May 2007 14:22 Go to previous messageGo to next message
mbaranczak
Messages: 6
Registered: May 2007
Junior Member
Yes, I'm using the Debian Etch kernel sources.

I got the patch from the Debian repo ('kernel-patch-openvz', version: 028.18.1etch1).

I've been following the instructions on this page: http://wiki.openvz.org/Installation_on_Debian (I did notice that CONFIG_VZ_CHECKPOINT isn't supported on PPC, so I turned that off).


-- Mike Baranczak --
Re: OpenVZ on PPC? [message #12990 is a reply to message #12962] Thu, 17 May 2007 04:16 Go to previous messageGo to next message
mbaranczak
Messages: 6
Registered: May 2007
Junior Member
Update: I tried it again, this time with a vanilla 2.6.20 kernel, and the patch downloaded directly from openvz.org. Here are the exact steps that I followed:

- Download and unpack the 2.6.20 kernel sources from kernel.org.
- patch -p0 -i patch-ovz005.1-combined
- cp kernel-2.6.20-ppc64.config.ovz linux-2.6.20/.config
- make xconfig, and uncheck the PPC64 option - leave everything else the same.
- make-kpkg --rootcmd=sudo --initrd binary-arch

Here's the last thing I see from make-kpg: (the warnings about sched.h are repeated several hundred times - I have no idea if it's actually something I should be worried about.)

  CC [M]  fs/gfs2/glock.o
In file included from fs/gfs2/glock.c:10:
include/linux/sched.h: In function ‘cycles_to_clocks’:
include/linux/sched.h:1390: warning: comparison of distinct pointer types lacks a cast
include/linux/sched.h:1390: warning: right shift count >= width of type
include/linux/sched.h:1390: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type
include/linux/sched.h: In function ‘cycles_to_jiffies’:
include/linux/sched.h:1397: warning: comparison of distinct pointer types lacks a cast
include/linux/sched.h:1397: warning: right shift count >= width of type
include/linux/sched.h:1397: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type
fs/gfs2/glock.c:2003:35: error: macro "invalidate_inodes" passed 2 arguments, but takes just 1
fs/gfs2/glock.c: In function ‘gfs2_gl_hash_clear’:
fs/gfs2/glock.c:2003: error: ‘invalidate_inodes’ undeclared (first use in this function)
fs/gfs2/glock.c:2003: error: (Each undeclared identifier is reported only once
fs/gfs2/glock.c:2003: error: for each function it appears in.)
make[3]: *** [fs/gfs2/glock.o] Error 1
make[2]: *** [fs/gfs2] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.20'
make: *** [debian/stamp-build-kernel] Error 2


Does anybody have any suggestions?
Re: OpenVZ on PPC? [message #12997 is a reply to message #12983] Thu, 17 May 2007 10:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Thank you for the colloboration. Let's start from solving the problem with 2.6.18 series. Can you please attach an objdump of vzdquota.ko module that you obtained for 2.6.18 kernel:

objdump -DR vzquota.ko > vzquota.ko.dump

Thanks,
Vasily.
Re: OpenVZ on PPC? [message #13015 is a reply to message #12997] Thu, 17 May 2007 14:20 Go to previous messageGo to next message
mbaranczak
Messages: 6
Registered: May 2007
Junior Member
Can't find 'vzquota.ko' or 'vzdquota.ko' anywhere. Or any other .ko files, either.

-- Mike Baranczak --
Re: OpenVZ on PPC? [message #13030 is a reply to message #12962] Thu, 17 May 2007 20:28 Go to previous messageGo to next message
mbaranczak
Messages: 6
Registered: May 2007
Junior Member
I think I fixed it...

I found this thread, which talks about a similar problem:
http://www.ussg.iu.edu/hypermail/linux/kernel/0003.1/0565.ht ml
This would explain why it worked on 64-bit but not 32-bit: the 64-bit architecture can compare 64-bit integers natively, but on 32 bit, GCC needs to use a library function in libgcc.

I made the following change to fs/vzdq_file.c:

467c467
<               switch ((long) n) {
---
>               switch (n) {


I got it to build successfully, now I just have to get that bad boy installed and running... I'll let you know how it goes.


-- Mike Baranczak --
Re: OpenVZ on PPC? [message #13040 is a reply to message #13030] Fri, 18 May 2007 07:02 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Ohh!.. Thanks for the info, we'll include this fix in the next OpenVZ kernel.
Waiting for info about how it goes Wink

[Updated on: Fri, 18 May 2007 07:03]

Report message to a moderator

Re: OpenVZ on PPC? [message #13043 is a reply to message #13030] Fri, 18 May 2007 07:32 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

fixed in 2.6.18-028stab032. thanks!


http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ on PPC - further problems [message #13078 is a reply to message #13040] Fri, 18 May 2007 14:48 Go to previous messageGo to next message
mbaranczak
Messages: 6
Registered: May 2007
Junior Member
Still struggling...

make-kpkg failed to create the .deb file. No error message, the .deb just isn't there.

So I think, no problem, I'll just do a regular install and bypass the package manager. I run:

make headers_install
sudo make modules_install
sudo make install

The first two complete successfully, but the last one says:
make: *** No rule to make target `install'.  Stop.

Any idea what went wrong?

If I can't fix it, can someone just tell me how to install it manually? I'm new to kernel hacking, so bear with me here.


-- Mike Baranczak --
Re: OpenVZ on PPC - further problems [message #13082 is a reply to message #13078] Fri, 18 May 2007 15:20 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

AFAICS, arch/ppc/boot/Makefile doesn't have install target.
So you need to copy zImage manually to /boot or whatever is used on ppc.

On the other hand powerpc ARCH have this target... Not sure what is the difference?


http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: *CLOSED* Need CPUUNITS Value for Celeron 2.4
Next Topic: OpenVZ and yum service
Goto Forum:
  


Current Time: Sun Apr 28 12:34:30 GMT 2024

Total time taken to generate the page: 0.02299 seconds