sub-directory kernel module compilations

Matt Paine matt at mattsoftware.com
Mon Feb 25 16:03:18 CST 2008


Thankyou Matt for your quick reply.

A few notes while I am trying to work this out....




> These:
> 
> 
>>BUILT_MODULE_NAME[14]="wct4xxp/wct4xxp"
>>BUILT_MODULE_NAME[15]="wctc4xxp/wctc4xxp"
>>BUILT_MODULE_NAME[16]="xpp/xpp"
>>BUILT_MODULE_NAME[17]="wctdm24xxp/wctdm24xxp"
>>BUILT_MODULE_NAME[18]="wcte12xp/wcte12xp"
> 
> 
> should be the name w/o the directory.


If I take out the directory........

---------8<--------------
Building module:
cleaning build area...
make KERNELRELEASE=2.6.22.18-vs2.3.0.32.1 -C 
/lib/modules/2.6.22.18-vs2.3.0.32.1/build 
SUBDIRS=/var/lib/dkms/zaptel/1.4.9-0.4/build HOTPLUG_FIRMWARE=yes 
KBUILD_OBJ='pciradio.o tor2.o torisa.o wcfxo.o wctlxxp.o wctdm.o 
wcte11xp.o wcusb.o zaptel.o ztd-eth.o ztd-loc.o ztdummy.o ztdynamic.o 
zttranscode.o wct4xxp/ wctc4xxp/ xpp/ wctdm24xxp/ wctdm24xxp/ wcte12xp/' 
modules........................

Error! Build of wct4xxp.ko failed for 2.6.22.18-vs2.3.0.32.1 (i686)
Consult the make.log in the build directory
/var/lib/dkms/zaptel/1.4.9-0.4/build/ for more information.
---------------->8---------------

>>DEST_MODULE_LOCATION[14]="/kernel/drivers/zaptel"
>>DEST_MODULE_LOCATION[15]="/kernel/drivers/zaptel"
>>DEST_MODULE_LOCATION[16]="/kernel/drivers/zaptel"
>>DEST_MODULE_LOCATION[17]="/kernel/drivers/zaptel"
>>DEST_MODULE_LOCATION[18]="/kernel/drivers/zaptel"
> 
> 
> These should include the above directory name.

Okay, so I put the directory name back in the BUILD_MODULE_NAME[x] 
variables, and then put the names into the DEST_MODULE_LOCATION[x] 
variables, and then ran a build...


-----8<------------
Building module:
cleaning build area....
make KERNELRELEASE=2.6.22.18-vs2.3.0.32.1 -C 
/lib/modules/2.6.22.18-vs2.3.0.32.1/build 
SUBDIRS=/var/lib/dkms/zaptel/1.4.9-0.4/build HOTPLUG_FIRMWARE=yes 
KBUILD_OBJ_M='pciradio.o tor2.o torisa.o wcfxo.o wct1xxp.o wctdm.o 
wcte11xp.o wcusb.o zaptel.o ztd-eth.o ztd-loc.o ztdummy.o ztdynamic.o 
zttranscode.o wct4xxp/ wctc4xxp/ xpp/ wctdm24xxp/ wcte12xp/' 
modules........................
cp: cannot create regular file 
`/var/lib/dkms/zaptel/1.4.9-0.4/2.6.22.18-vs2.3.0.32.1/i686/module/wct4xxp/wct4xxp.ko': 
No such file or directory
cp: cannot create regular file 
`/var/lib/dkms/zaptel/1.4.9-0.4/2.6.22.18-vs2.3.0.32.1/i686/module/wctc4xxp/wctc4xxp.ko': 
No such file or directory
cp: cannot create regular file 
`/var/lib/dkms/zaptel/1.4.9-0.4/2.6.22.18-vs2.3.0.32.1/i686/module/xpp/xpp.ko': 
No such file or directory
cp: cannot create regular file 
`/var/lib/dkms/zaptel/1.4.9-0.4/2.6.22.18-vs2.3.0.32.1/i686/module/wctdm24xxp/wctdm24xxp.ko': 
No such file or directory
cp: cannot create regular file 
`/var/lib/dkms/zaptel/1.4.9-0.4/2.6.22.18-vs2.3.0.32.1/i686/module/wcte12xp/wcte12xp.ko': 
No such file or directory
cleaning build area....

DKMS: build Completed.
--------->8------------------

Is there a parameter to cp that creates directories as well? Else this 
evening (when i get some time) I will perhaps try to do a mkdir before 
the cp in the dkms script.

> Let me know how well this works.  I'm not sure too many folks have
> done what you're doing here.

Cool. Another alternative might be to separate out the subdirectories 
into their own dkms packages but that sounds like a lot of work each 
time a release is made. I'de rather do the hard work now and simply copy 
the directory, add the dkms.conf file and go :)

Any further hints would be great, but I think i'll try and get the 
directories made before the cp statement and see how that goes. Fingers 
crossed!



Matt.




More information about the DKMS-devel mailing list