sub-directory kernel module compilations
Matt Domsch
Matt_Domsch at dell.com
Mon Feb 25 09:04:04 CST 2008
On Mon, Feb 25, 2008 at 09:30:51PM +1000, Matt Paine wrote:
> Hi.
>
> I have only recently joined the mailing list, and I've tried to search
> the list, but i apologise if this has already been covered.
>
> I have used dkms for fuse modules successfully in the past, and really
> enjoy the way dkms solves the problem of kernel modules matching
> different kernels.
>
>
> My problem at the moment is creating a package for asterisk zaptel
> modules. There are a number of modules, most in the main directory, and
> some in sub-directories in the source. I will include my attempt at a
> dkms.conf file below. The dkms.conf file allows the modules to be built
> successfully, but `dkms status` reports.....
>
> [root at phone src]# dkms status
> zaptel, 1.4.9-0.4, 2.6.22.18-vs2.3.0.32.1, i686: built (WARNING!
> Missing some built modules!) (WARNING! Missing some built modules!)
> (WARNING! Missing some built modules!) (WARNING! Missing some built
> modules!) (WARNING! Missing some built modules!)
> fuse, 2.7.0-0.4.MSW.centos5, 2.6.22.18-vs2.3.0.32.1, i686: installed
>
> As you can see there are 5 warnings, which correspond with the 5 modules
> that are actually sub-directories of the tree. Perhaps I need to copy
> the .ko files from the sub-dir's into the parent directory, but I am not
> experienced enough to find out how to achieve that. I have tried using
> the POST_BUILD variable, with no luck. I have a feeling I could achieve
> this by modifying the Kbuild file in those sub-directories, but so far I
> have not been able to find out how.
It looks like Kbuild puts them in the subdirs, yes?
In that case, change your DEST_MODULE_LOCATION[] vars for each of those.
> ------------8<----------dkms.conf---------------
>
> PACKAGE_NAME=zaptel
> PACKAGE_VERSION=1.4.9-0.4
> MAKE="make -C ${kernel_source_dir} SUBDIRS=
> ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/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"
> BUILT_MODULE_NAME[0]="pciradio"
> BUILT_MODULE_NAME[1]="tor2"
> BUILT_MODULE_NAME[2]="torisa"
> BUILT_MODULE_NAME[3]="wcfxo"
> BUILT_MODULE_NAME[4]="wct1xxp"
> BUILT_MODULE_NAME[5]="wctdm"
> BUILT_MODULE_NAME[6]="wcte11xp"
> BUILT_MODULE_NAME[7]="wcusb"
> BUILT_MODULE_NAME[8]="zaptel"
> BUILT_MODULE_NAME[9]="ztd-eth"
> BUILT_MODULE_NAME[10]="ztd-loc"
> BUILT_MODULE_NAME[11]="ztdummy"
> BUILT_MODULE_NAME[12]="ztdynamic"
> BUILT_MODULE_NAME[13]="zttranscode"
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.
> 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.
Let me know how well this works. I'm not sure too many folks have
done what you're doing here.
--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
More information about the DKMS-devel
mailing list