Skip to contentSkip to conversation

kvm-13

DISCUSSION Omar Khan 4 participants 11 messages Feb 8, 2007 – Feb 21, 2007 6 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Omar Khan

author
#0 lore raw

hi,

"make install" does not install the modules in the right directory (actually
it is not making the 'extra' directory). I changed

       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
to
       KERNELDIR := /lib/modules/$(shell uname -r)/build

in the kernel/Makefile and it is working now.

Omar

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 10 lines · Omar Khan

hi,

"make install" does not install the modules in the right directory (actually
it is not making the 'extra' directory). I changed

       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
to
       KERNELDIR := /lib/modules/$(shell uname -r)/build

in the kernel/Makefile and it is working now.

That will probably break --kerneldir again. I have to run now but I will look into it ASAP - I suspect the problem is elsewhere.

Cheers,
Muli

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#3 lore raw
In reply to a message not in the archive
Quoted 11 lines · Omar Khan

hi,

"make install" does not install the modules in the right directory (actually it is not making the 'extra' directory). I changed

       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
to
       KERNELDIR := /lib/modules/$(shell uname -r)/build

in the kernel/Makefile and it is working now.

- what does 'grep KERNELDIR config.mak' at the top level say after you've run configure? your change should not have any effect since KERNELDIR is set in config.mak to /lib/modules/$(shell uname -r)/build if --kerneldir is not specified. Did you do 'make install' without configuring and building first?

- 'make install' seems pretty bogus, it relies on KERNELDIR ending in 'build', which is wrong for --kerneldir=xxx and it uses DESTDIR without ever setting it. What was DESTDIR supposed to do? any objections to removing it?

Cheers,
Muli

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

author
#4 lore raw
Quoted 25 lines · Muli Ben-Yehuda
Quoted 11 lines · Omar Khan

hi,

"make install" does not install the modules in the right directory (actually it is not making the 'extra' directory). I changed

       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
to
       KERNELDIR := /lib/modules/$(shell uname -r)/build

in the kernel/Makefile and it is working now.

- what does 'grep KERNELDIR config.mak' at the top level say after you've run configure? your change should not have any effect since KERNELDIR is set in config.mak to /lib/modules/$(shell uname -r)/build if --kerneldir is not specified. Did you do 'make install' without configuring and building first?

- 'make install' seems pretty bogus, it relies on KERNELDIR ending in 'build', which is wrong for --kerneldir=xxx and it uses DESTDIR without ever setting it. What was DESTDIR supposed to do? any objections to removing it?

Quoted 9 lines

Cheers,
Muli

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

I am using opensuse 10.2 and the build directory is linked to the default directory:

lrwxrwxrwx 1 root root 43 Feb 7 01:29 /lib/modules/2.6.18.2-34-default/build -> /usr/src/linux-2.6.18.2-34-obj/i386/default

so KERNELDIR get set to the default directory (KERNELDIR=$(readlink -f $kerneldir)) in configure

I installed kvm-12 before this, could it have caused this?

Omar

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 8 lines · Omar Khan

I am using opensuse 10.2 and the build directory is linked to the default directory:

lrwxrwxrwx 1 root root 43 Feb 7 01:29 /lib/modules/2.6.18.2-34-default/build -> /usr/src/linux-2.6.18.2-34-obj/i386/default

so KERNELDIR get set to the default directory (KERNELDIR=$(readlink -f $kerneldir)) in configure

That does not explain why the change you made (from ?= to :=) made any difference. Could you send a full log of ./configure && make && make install with and without your change?

Thanks,
Muli

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

author
#7 lore raw
Quoted 4 lines · Muli Ben-Yehuda

That does not explain why the change you made (from ?= to :=) made any difference. Could you send a full log of ./configure && make && make install with and without your change?

Well from what I have observed this makes a difference because in config.mak

KERNELDIR=/usr/src/linux-2.6.18.2-34-obj/i386/default

This gets included in the kernel/Makefile and when make reaches

KERNELDIR ?= /lib/modules/$(shell uname -r)/build

KERNELDIR is already set (to default) so it does not set it to /build. Now when it does

INSTALLDIR = $(patsubst %/build, %/extra, $(KERNELDIR)))

nothing gets replaced since there is no 'build' to replace. So nothing gets installed in /lib/modules/2.6.18.2-34-default/extra/ and hence modprobe fails.

if I replace ?= with := it KERNELDIR is changed to /lib/modules/$(shell uname -r)/build and hence we get the INSTALLDIR for the /extra.

I will try to send the log for ./configure , make , make install.

Thanks

Omar Khan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Thanks for the analysis, this problem is understood. Avi commited a fix for -14 a few days back, but the fix re-breaks --kerneldir. Reenabling --kerneldir is simple - see attached patch - but since this is obviously a fragile area, I decided not to push for its inclusion. Maybe I'm the sole --kerneldir user :-)

Makefile +2 -1
Index: kernel/Makefile
===================================================================
@@ -1,4 +1,5 @@
-KERNELDIR := /lib/modules/$(shell uname -r)/build
+include ../config.mak
+
 KVERREL = $(patsubst /lib/modules/%/build,%,$(KERNELDIR))
 
 DESTDIR=
configure +1 -1
Index: configure
===================================================================
@@ -94,7 +94,7 @@
 
 cat <<EOF > config.mak
 PREFIX=$prefix
-KERNELDIR=$(readlink -f $kerneldir)
+KERNELDIR="$kerneldir"
 WANT_MODULE=$want_module
 EOF
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 20070219223657.GM3513-k73YwwB0fHlWk0Htik3J/[email protected]

#11 lore raw
Quoted 7 lines · Muli Ben-Yehuda

Thanks for the analysis, this problem is understood. Avi commited a fix for -14 a few days back, but the fix re-breaks --kerneldir. Reenabling --kerneldir is simple - see attached patch - but since this is obviously a fragile area, I decided not to push for its inclusion. Maybe I'm the sole --kerneldir user :-)

I want --kerneldir to work; but as you say the build stuff is ridiculously fragile.

How was this tested?

Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 45DAA749.10909-atKUWr5tajBWk0Htik3J/[email protected]

#13 lore raw
Quoted 9 lines · Avi Kivity
Quoted 7 lines · Muli Ben-Yehuda

Thanks for the analysis, this problem is understood. Avi commited a fix for -14 a few days back, but the fix re-breaks --kerneldir. Reenabling --kerneldir is simple - see attached patch - but since this is obviously a fragile area, I decided not to push for its inclusion. Maybe I'm the sole --kerneldir user :-)

Quoted 4 lines

I want --kerneldir to work; but as you say the build stuff is ridiculously fragile.

How was this tested?

I used this simple script to compare vanilla and patched and verified the output is the same:

onebuild ()
{
./configure --qemu-cc=gcc-3.4 $1 && echo "XXX configure done" && (cd kernel && make LINUX=~/kvm/linux-2.6 sync) && make echo "XXX installing..."
sudo make install
echo "XXX cleaning"
make clean
}

make clean
onebuild --kerneldir=/home/muli/iommu/calgary/obj.linux/ onebuild --kerneldir=/lib/modules/uname -r/build onebuild

The patch I used is this one:

Makefile +2 -1
Index: kernel/Makefile
===================================================================
@@ -1,4 +1,5 @@
-KERNELDIR := /lib/modules/$(shell uname -r)/build
+include ../config.mak
+
 KVERREL = $(patsubst /lib/modules/%/build,%,$(KERNELDIR))
 
 DESTDIR=
configure +1 -1
Index: configure
===================================================================
@@ -94,7 +94,7 @@
 
 cat <<EOF > config.mak
 PREFIX=$prefix
-KERNELDIR=$(readlink -f $kerneldir)
+KERNELDIR=$kerneldir
 WANT_MODULE=$want_module
 EOF
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 20070221075035.GA2857-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org

#15 lore raw
Quoted 12 lines · Muli Ben-Yehuda
Quoted 10 lines · Avi Kivity
Quoted 8 lines · Muli Ben-Yehuda

Thanks for the analysis, this problem is understood. Avi commited a fix for -14 a few days back, but the fix re-breaks --kerneldir. Reenabling --kerneldir is simple - see attached patch - but since this is obviously a fragile area, I decided not to push for its inclusion. Maybe I'm the sole --kerneldir user :-)

Quoted 10 lines
Quoted 5 lines

I want --kerneldir to work; but as you say the build stuff is ridiculously fragile.

How was this tested?

I used this simple script to compare vanilla and patched and verified the output is the same:

Great. Applied, thanks.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#16 lore raw
In reply to a message not in the archive
Quoted 11 lines · Omar Khan
Quoted 4 lines · Muli Ben-Yehuda

That does not explain why the change you made (from ?= to :=) made any difference. Could you send a full log of ./configure && make && make install with and without your change?

Well from what I have observed this makes a difference because in config.mak

KERNELDIR=/usr/src/linux-2.6.18.2-34-obj/i386/default

Because you passed the wrong path to configure --kerneldir=

This probably should be stated more explicitly in the configure --help comment for kerneldir, which should make it clear that the path MUST be /lib/modules/*/build

If it's not, not only will the module install fail, so will KVERREL!

If you want the default behavior, configure without specifying --kerneldir, don't override the user's choice with the default.

I use --kerneldir too. When I'm upgrading a kernel, there should be no need to reboot (changing uname) in order to build out-of-tree modules, I should be able to prebuild everything and reboot seamlessly.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV