[DRBD-user] make kernel module for xenserver ddk 7.2

Dmitrij Nemirskij dmitrij.v.nemirskij at gmail.com
Tue Aug 22 10:09:49 CEST 2017

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi, Roland

We use xenserver ddk 7.2 for make kernel module
[root at localhost boot]# uname -r
4.4.0+10
[root at localhost boot]# uname -a
Linux localhost.localdomain 4.4.0+10 #1 SMP Tue May 9 14:19:55 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux
[root at localhost boot]# ls -l /usr/src/kernels/
total 4
drwxr-xr-x. 23 root root 4096 Aug 21 10:00 4.4.0+10
lrwxrwxrwx   1 root root    8 Aug 21 08:29 4.4.0+10.x86_64 -> 4.4.0+10
[root at localhost boot]# ls -l /boot/
total 49564
-rw-r--r--. 1 root root   107867 May  9 14:20 config-4.4.0+10
drwxr-xr-x. 2 root root     4096 May  9 14:47 grub
drwx------. 6 root root     4096 May  9 14:50 grub2
-rw-r--r--. 1 root root 26321716 May  9 14:48
initramfs-0-rescue-3a47b1aa9e2c42b19ffd091ac6a945c3.img
-rw-r--r--. 1 root root 11294256 May  9 14:49 initrd-4.4.0+10.img
lrwxrwxrwx. 1 root root       19 May  9 14:49 initrd-4.4-xen.img ->
initrd-4.4.0+10.img
-rw-r--r--. 1 root root  2996461 May  9 14:20 System.map-4.4.0+10
-rwxr-xr-x. 1 root root  5156528 May  9 14:48
vmlinuz-0-rescue-3a47b1aa9e2c42b19ffd091ac6a945c3
-rw-r--r--. 1 root root  4772064 May  9 14:20 vmlinuz-4.4.0+10
lrwxrwxrwx. 1 root root       16 May  9 14:49 vmlinuz-4.4-xen ->
vmlinuz-4.4.0+10

Xenserver and DDK  kernel 4.4.0+10 without prefix .x86_64

Standart make compile with prefix .x86_64

im fix KDIR original location, create symlink

[root at localhost boot]# ls -l /usr/src/kernels/
total 4
drwxr-xr-x. 23 root root 4096 Aug 21 10:00 4.4.0+10
lrwxrwxrwx   1 root root    8 Aug 21 08:29 4.4.0+10.x86_64 -> 4.4.0+10



[root at localhost drbd-9.0.8-1]# make kmp-rpm
checking for presence of 9\.0\.8-1 in various changelog files
drbd-kernel.spec:9.0.8-1%{?dist}
ChangeLog:9.0.8-1 (api:genl2/proto:86-112/transport:14)
============================================================
---------------------------------------------------------------------------------------------------------
Processing files: kmod-drbd-9.0.8_4.4.0+10-1.el7.centos.x86_64
error: File not found:
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/lib/modules/4.4.0+10.x86_64
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.eUFbc8
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd drbd-9.0.8-1
+
DOCDIR=/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/usr/share/doc/kmod-drbd-9.0.8_4.4.0+10
+ export DOCDIR
+ /usr/bin/mkdir -p
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/usr/share/doc/kmod-drbd-9.0.8_4.4.0+10
+ cp -pr COPYING
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/usr/share/doc/kmod-drbd-9.0.8_4.4.0+10
+ cp -pr ChangeLog
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/usr/share/doc/kmod-drbd-9.0.8_4.4.0+10
+ cp -pr obj/k-config-4.4.0+10.x86_64.gz
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/usr/share/doc/kmod-drbd-9.0.8_4.4.0+10
cp: cannot stat 'obj/k-config-4.4.0+10.x86_64.gz': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.eUFbc8 (%doc)


RPM build errors:
    File not found:
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/lib/modules/4.4.0+10.x86_64
    Bad exit status from /var/tmp/rpm-tmp.eUFbc8 (%doc)
make: *** [kmp-rpm] Error 1

[root at localhost drbd-9.0.8-1]# ls -l
/root/rpmbuild/BUILDROOT/drbd-kernel-9.0.8-1.el7.centos.x86_64/lib/modules/
total 4
drwxr-xr-x 3 root root 4096 Aug 22 08:01 4.4.0+10
[root at localhost drbd-9.0.8-1]# ls -l /root/rpmbuild/BUILD/drbd-9.0.8-1/obj/
total 64
drwxr-xr-x 6 root root 36864 Aug 22 08:01 default
lrwxrwxrwx 1 root root    15 Aug 22 08:00 drbd-headers -> ../drbd-headers
-rw-r--r-- 1 root root 26784 Aug 22 08:01 k-config-4.4.0+10.gz
      !!!!!!!  without prefix .x86_64

I need help;(

2017-08-22 10:27 GMT+03:00 Roland Kammerer <roland.kammerer at linbit.com>:

> On Fri, Aug 18, 2017 at 05:17:48PM +0300, Dmitrij Nemirskij wrote:
> > Hi
> >
> > Source drbd-9.0.8-1
> >
> > + make -C obj/default all KDIR=/usr/src/kernels/4.4.0+10.x86_64
> > make[1]: Entering directory `/root/rpmbuild/BUILD/drbd-9.
> 0.8-1/obj/default'
> >
> >     Calling toplevel makefile of kernel source tree, which I believe is
> in
> >     KDIR=/usr/src/kernels/4.4.0+10.x86_64
> >
> >     SORRY, kernel makefile not found. You need to tell me a correct KDIR!
>
> Looks like you don't have the necessary headers/kernel-devel installed.
>
> > fix it
>
> ;-). It works for us.
>
> Regards, rck
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20170822/d6db8cee/attachment.htm>


More information about the drbd-user mailing list