[Devel] PPC64 Kernel 2.6.18 + RPM packages

Kirill Korotaev dev at sw.ru
Wed May 23 05:41:03 PDT 2007


Christian Kaiser2 wrote:
> Hi all,
> 
> I did my first steps wtih OpenVZ on a JS21 Blade. I'm running FC6 and built
> my own 2.6.18 kernel from kernel.org with your latest patches (028stab31).
> I used the default kernel config (not yours but from vanilla kernel) and I
> removed support for checkpointing. There was no menu entry for the Fair CPU
> scheduler in the menuconfig for the powerpc architecture. The compilation
> failed printing the following lines:

related to Fair CPU scheduler:
please check that CONFIG_SCHED_VCPU=y
then CONFIG_FAIRSCHED will appear and should be set to y as well.

You are right, CONFIG_CPT should be disabled as powerpc is not supported by
checkpointing currently.

> In file included from drivers/media/video/pwc/pwc-uncompress.c:29:
> include/asm/current.h: In function ‘get_current’:
> include/asm/current.h:23: warning: implicit declaration of function
> ‘offsetof’
> include/asm/current.h:23: error: expected expression before ‘struct’
> make[4]: *** [drivers/media/video/pwc/pwc-uncompress.o] Error 1
> make[3]: *** [drivers/media/video/pwc] Error 2
> make[2]: *** [drivers/media/video] Error 2
> make[1]: *** [drivers/media] Error 2
> make: *** [drivers] Error 2

imho, it is a mainstream bug (maybe triggered by our changes).
2 fixes possible:

1. Simply add:

#include <linux/stddef.h>

in include/asm-powerpc/current.h (after #include <asm/paca.h>)

2. or add the same line at the very beginning at file which failed to compile,
   i.e. to drivers/media/video/pwc/pwc-uncompress.c

> 
> Then I replaced the include/asm/current.h file with the
> include/asm/current.h file of the vanilla kernel and compiled for new. Now
> it works. I could compile and boot the kernel with your patches (excluding
> the include/asm/current.h file).

this changes came from diff-merge-2.6.18.8-20070227, which is essentially
the fixes from 2.6.18.8. i.e. the following changeset from mainstream caused the problem:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.18.y.git;a=commitdiff;h=f102c840f7f72492a83c93fa65396fe0edcf1df6


> After that I installed the ppc64 rpm packes of vzquota, vzctl and
> vzctl-lib. "vzkernel" and "vzquotamod" were missing so I had to force the
> installation (--nodeps) because I did the kernel compilation on my own,
> right?

right.

> After installation I tried to run /etc/init.d/vz start but it faild because
> of a missing library libvzctl-0.0.2.so. I found it in /usr/lib64 instead of
> /usr/lib.
> 
> [root at s10b10-0 ~]# /etc/init.d/vz start
> Starting OpenVZ:                                           [  OK  ]
> Bringing up interface venet0:                              [  OK  ]
> Configuring interface venet0:                              [  OK  ]
> vzctl set 0 --cpuunits 1000 failed: /usr/sbin/vzctl: error [FAILED]ading
> shared libraries: libvzctl-0.0.2.so: cannot open shared object file: No
> such file or directory
> 
> It seems to be that there is a mixture of 32 and 64 bit binaries and libs.
> See that output of /usr/sbin:
> 
> [root at s10b10-0 sbin]# file vz*
> vzcalc:        ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for
> GNU/Linux 2.6.4, not stripped
> vzcfgvalidate: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for
> GNU/Linux 2.6.4, not stripped
> vzcpucheck:    Bourne-Again shell script text executable
> vzctl:         ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for
> GNU/Linux 2.6.4, not stripped
> vzdqcheck:     ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for
> GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux
> 2.6.4, stripped
> vzdqdump:      ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for
> GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux
> 2.6.4, stripped
> vzdqload:      ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for
> GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux
> 2.6.4, stripped
> vzlist:        ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for
> GNU/Linux 2.6.4, not stripped
> vzmemcheck:    ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for
> GNU/Linux 2.6.4, not stripped
> vzmigrate:     Bourne-Again shell script text executable
> vznetcfg:      Bourne-Again shell script text executable
> vzpid:         Bourne-Again shell script text executable
> vzquota:       ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for
> GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux
> 2.6.4, stripped
> vzsplit:       ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
> (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for
> GNU/Linux 2.6.4, not stripped

looks like all binaries from vzquota package are 64bit, while
binaries from vzctl package are 32bit... Can you try to recompile vzctl yourself please?
and please tell me where you took the binaries from so I could recheck/fix it if needed :)

> 
> or here a 32 bit object file in /usr/lib64 directory ?!?
> 
> [root at s10b10-0 sbin]# file /usr/lib64/libvzctl-0.0.2.so
> /usr/lib64/libvzctl-0.0.2.so: ELF 32-bit MSB shared object, PowerPC or
> cisco 4500, version 1 (SYSV), not stripped
> 
> So moving the lib from /usr/lib64 to /usr/lib solved my problem but showed
> another error when starting /etc/init.d/vz start
> 
> [root at s10b10-0 vzctl-3.0.16]# /etc/init.d/vz start
> Starting OpenVZ:                                           [  OK  ]
> Bringing up interface venet0:                              [  OK  ]
> Configuring interface venet0:                              [  OK  ]
> vzctl set 0 --cpuunits 1000 failed: Setting CPU units: 1000
> fairsched_chwt: No such file or directory
> WARNING: Settings were not saved and will be resetted to or[FAILED]alues on
> next start (use --save flag)
> 
> What is "fairsched_chwt"? And why is it missing in my configuration?? An VE
> creation works fine:

this is due to not set CONFIG_FAIRSCHED option in your kernel .config file.

> [root at s10b10-0 cache]# vzctl create 101 --ostemplate
> debian-3.1-powerpc-minimal --ipadd 192.168.0.101 --hostname ve101
> Creating VE private area (debian-3.1-powerpc-minimal)
> Warning: Temp dir /vz/private/101.tmp already exists, deleting
> Performing postcreate actions
> VE private area was created
> 
> but starting an VE fails. There is no verbose output on that even when I
> switch it on.
> 
> [root at s10b10-0 ~]# vzctl --verbose start 101
> Starting VE ...
> VE is mounted
> VE start failed
> VE is unmounted
> [root at s10b10-0 ~]#
> 
> Can someone help me on this?
doing my best :)

Thanks,
Kirill




More information about the Devel mailing list