[elrepo] wl-kmod error at installing

S.Tindall s10dal at elrepo.org
Sun Jan 24 20:16:30 EST 2016


On Sat, 2016-01-23 at 22:26 -0300, Diego Farias wrote:
> I tried to follow this:
> https://wiki.centos.org/HowTos/Laptops/Wireless/Broadcom , which
> 'does' some similar steps as written in your wl-kmod.spec about
> patching, but I couldn't patch this successfully:
> wl-kmod-rhel7_1.patch -
> Hunk 3 failed at line 2074. For what I can understand from your
> method, you do;
> 
>  Perform "patching" edits to the src/wl/sys/wl_cfg80211_hybrid.c file.
> #  Note: Using this method, as opposed to making a patch, allows 
> #   the nosrc.rpm to be compiled under various point release kernels.
> #  Note: Use [ >][>=] where both >= & > are present
> %if "%{kvl}" == "3.10.0"
> %if %{kvr} >= 123
> #  Apply to EL 7.0 point release and later
> #   >  No changes currently needed for EL 7.0 point release
> %endif
> %if %{kvr} >= 229
> #  Apply to EL 7.1 point release and later
> %{__sed} -i 's/ >= KERNEL_VERSION(3, 11, 0)/ >= KERNEL_VERSION(3, 10,
> 0)/' src/wl/sys/wl_cfg80211_hybrid.c
> %{__sed} -i 's/ >= KERNEL_VERSION(3, 15, 0)/ >= KERNEL_VERSION(3, 10,
> 0)/' src/wl/sys/wl_cfg80211_hybrid.c
> %endif
> %if %{kvr} >= 327
> #  Apply to EL 7.2 point release and later
> %{__sed} -i 's/ < KERNEL_VERSION(3, 18, 0)/ < KERNEL_VERSION(3, 9,
> 0)/' src/wl/sys/wl_cfg80211_hybrid.c
> %{__sed} -i 's/ >= KERNEL_VERSION(4, 0, 0)/ >= KERNEL_VERSION(3, 10,
> 0)/' src/wl/sys/wl_cfg80211_hybrid.c
> %endif
> %else
> echo "This specification file has been written for use with RHEL 7
> kernels only."
> false
> %endif
> 
> 
> My guess is; 1) I'm too noob and I have failed like 10 times (which is
> very plausible), or 2) for some reason something in this part fails...
> I'll try again removing everything for being sure that I'm not failing
> in that.

FYI, the original CentOS Broadcom wiki details (i.e., the patch and all
the seds) were derived from an ELRepo wl-kmod.nosrc.rpm a while back
with our blessing. :-) The current instructions may or may not be up to
date (I don't know either way).


It is likely that something "odd" is going on with your system, possibly
from an earlier attempted configuration of Broadcom wl. I keep hearing a
voice saying "dkms" in the back of my head. :-)


What does this return on your system:

 # rpm -qa|grep wl|grep -v firmware

That is mainly to check for non-EL7 wl rpms (e.g., Fedora, SLED, etc.).
Unfortunately, that will not detect previous "from source"
installations.


The rule of thumb with kmod driver installation is to uninstall any
previous attempts to install the driver (source, dkms, etc.) and then
install the kmod.


Just to check on the kmod-wl build protocol
( http://elrepo.org/tiki/wl-kmod ), I followed the wiki instructions
verbatim for EL7 and built/installed kmod-wl on the fresh RHEL 7 VM you
keep hearing about.

 # uname -r
 3.10.0-327.4.4.el7.x86_64

 $ rpmbuild --rebuild --target=`uname -m` \
  --define 'packager local' wl-kmod*rpm
 ...
 Wrote: \
  /home/tindall/rpmbuild/RPMS/x86_64/kmod-wl-6_30_223_271-2.el7.local.x86_64.rpm
 ...
 + exit 0

 # rpm -Uvh \
 /home/tindall/rpmbuild/RPMS/x86_64/kmod-wl-6_30_223_271-2.el7.local.x86_64.rpm

 # rpm -qa|grep wl|grep -v firmware
 kmod-wl-6_30_223_271-2.el7.local.x86_64

 # find -L /lib/modules -type f -name wl'.'*
 /lib/modules/3.10.0-327.el7.x86_64/weak-updates/wl/wl.ko
 /lib/modules/3.10.0-327.3.1.el7.x86_64/weak-updates/wl/wl.ko
 /lib/modules/3.10.0-327.4.4.el7.x86_64/extra/wl/wl.ko

 # rpm -q kernel
 kernel-3.10.0-123.el7.x86_64
 kernel-3.10.0-229.el7.x86_64
 kernel-3.10.0-327.el7.x86_64
 kernel-3.10.0-327.3.1.el7.x86_64
 kernel-3.10.0-327.4.4.el7.x86_64

 # modprobe -v wl
 insmod /lib/modules/3.10.0-327.4.4.el7.x86_64\
  /kernel/net/rfkill/rfkill.ko 
 insmod /lib/modules/3.10.0-327.4.4.el7.x86_64\
  /kernel/net/wireless/cfg80211.ko 
 insmod /lib/modules/3.10.0-327.4.4.el7.x86_64\
  /extra/wl/wl.ko 

The rpmbuild output shows the freshly made rpm being written with an
"exit 0" finish as expected.

After installing kmod-wl, the "find" shows the expected wl.ko in the
"extra" folder for kernel-3.10.0-327.4.4.el7.x86_64 and in the
"weak-updates" folders for the other kernel's-3.10.0-327*el7.x86_64 as
expected. The new wl is not compatible with older kernels and does not
weak link to them (i.e., no wl.ko in their weak-updates folders).

Modprobe (insmod) looks for wl in:
/lib/modules/3.10.0-327.4.4.el7.x86_64/extra/wl/wl.ko
as expected.


On a fresh system, kmod-wl builds and installs as per protocol.


BTW, you can build kmod-wl on any EL7 64-bit system using the 64-bit
Broadcom hybrid source and copy it to a Broadcom hardware-containing
system. I have not tried building on a CentOS7 32-bit system with the
32-bit Broadcom hybrid source, but it may work OK there, too. There is
nothing magic about building it on the same hardware as the Broadcom
device resides on.

Steve



More information about the elrepo mailing list