[ATrpms-devel] Help nedeed - madwifi drivers for AR5007* cards for CentOS 5 prepared

Ljubomir Ljubojevic office at plcomputers.net
Sun Apr 26 23:18:44 CEST 2009


Axel Thimm wrote:
> On Sun, Apr 26, 2009 at 12:35:51PM +0200, Ljubomir Ljubojevic wrote:
>>> In general, if you want to add files to an rpm (or better said the
>>> build process already adds some new files and you need to tell the
>>> specfile), you just add them to the %files section, e.g.
>>>
>>> %files
>>> /some/other/files/here
>>> ...
>>> ...
>>> /new/file/path
>>> /new/file/path2
>>>
>>> You should try to replace some path elements like /usr/bin,
>>> /usr/share/data etc. with macros like %{_bindir}, %{_datadir},
>>> although for the first tests it doesn't make a difference, we can fix
>>> these later.
>>>
>> I thought using "Install" section like used in official Fedoras package 
>> and would be easiest/safest to implement. I saw %files section in some 
>> spec file but could not find it at the moment.
> 
> You need both. Every specfile has a %files section. %install contains
> the commands to create the files and %files lists them.

I already guessed it. In last 2 days I mixed 5-6 madwifi spec files so
no wonder I was confused. New src rpm is already done.
Download link:
http://www.plcomputers.net/download/plc-centos5-custom/SRPMS/madwifi-ar2425-0.9.4.1-1_r4003.el5.src.rpm

I changed name from madwifi to madwifi-ar2425 to separate the two
versions. There is definite need for blacklisting ath5k driver that came
with kernel. Even in madwifi-0.9.5 driver you compiled. It works, but
after I added blacklisting of ath5k and rebooting.
> 
>>> rpmbuild --define "kmdl_kernelsrcdir /path/to/kernel/source" ...
>>>
>> In your /etc/rpm/macros.kmdl you used:
>> %kmdl_kernelsrcdir	/lib/modules/%(uname -r)/build
>> so I tried yust replacing %(uname -r) with kernel version like:
>>
>> pmbuild -ba --define "kmdl_kernelsrcdir 
>> /lib/modules/2.6.18-92.1.22.el5/build" madwifi.spec
>>
>> but I ws getting error:
>> make: *** /lib/module/2.6.18-92.1.22.el5/build: No such file or 
>> directory. Stop.
> 
> This means that the link /lib/module/2.6.18-92.1.22.el5/build to the
> sources is missing. Use the direct patch to the sources. I setup the
> default that way, so the rpmbuild command would guess from the running
> kernel what kmdls to build.
> 
>> My inital thought was I was doing something wrong, but now I figured it 
>> out. There is a need for actual kernel to be installed, not just 
>> kernel-devel.
> 
> No, you don't need the whole kernel. All that install did was to give
> you the /build symlink. You could also use
> 
> rpmbuild --define "kmdl_kernelsrcdir /usr/src/kernels/abc"
> 
> w/o installing the full kernel.

Ahh. OK, I got it. I will remember this.

Please check if I done spec right. There is instruction in description 
that informs people of new versions in 0.9.5 and higher versions.

I have few questions in connection to 0.9.5 version.

1) Can you add blacklist script in so ath5k driver is disabled when 
madwifi-0.9.5 is instaled?

2) Can madwifi be transformed to use weak-updates module system so 
constant install of new madwifi-kmdl is not needed when new kernel is 
instaled? kvm (at least from lfarkas repository, it's also in my 
repository) use them. If module for current kernel is installed, it will 
override weak-update one, and there is no need to recompile them for 
each kernel (if that is possible with madwifi driver).

Thanks for your help and patience,
Ljubomir




More information about the atrpms-devel mailing list