Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  [solved] broadcom wl.ko doesnt build with linux-3.4  (Read 17582 times)

Offline ralul

  • User
  • Posts: 1.814
Linx-3.4 headers miss a system.h for building a proprietary broadcom-sta wl.ko module

dkms doesnt recognize architecture. I edited the Makefile to run compilation by hand this command:

Code: [Select]
KVER=3.4-0.towo.4-siduction-amd64 \
KDIR=/lib/modules/3.4-0.towo.4-siduction-amd64/build\ KERNELRELEASE=3.4-0.towo.4-siduction-amd64 make all

/var/lib/dkms/broadcom-sta/5.100.82.112/build/src/wl/sys/wl_linux.c:43:24: fatal error: asm/system.h: Datei oder Verzeichnis nicht gefunden

Also openSUSE doesn't build wl.ko
Both build Nvidia.
Both linux-3.4 header directories
miss arch/x86/system.h
but arch/arm/system.h exists for SUSE headers

PS: I need to use the proprietary broadcom-sta,
because of my very special Mac Mini Hardware:
03:00.0 Network controller [0280]: Broadcom
Corporation BCM4321 802.11a/b/g/n [14e4:4328](rev 05)

I will have to use old linux kernels all my life :(
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline ralul

  • User
  • Posts: 1.814
propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #1 on: 2012/06/01, 15:01:00 »
This surely is not a bug of siduction but upstream!
Posting here to remind people having the same hardware ...

Found a patch to just let system.h go away:
Code: [Select]
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -40,7 +40,9 @@
 #include <linux>
 #define WLC_MAXBSSCFG          1

+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
 #include <asm>
+#endif
 #include <asm>
 #include <asm>
 #include <asm>
--- a/i386/src/wl/sys/wl_linux.c
+++ b/i386/src/wl/sys/wl_linux.c
@@ -40,7 +40,9 @@
 #include <linux>
 #define WLC_MAXBSSCFG          1

+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
 #include <asm>
+#endif
 #include <asm>
 #include <asm>
 #include <asm>
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.989
RE: propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #2 on: 2012/06/01, 15:32:35 »
I have uploaded a fixed broadcom-sta to our fixes repo.
Tested only over module-assistant, so i can't say, if dkms is also working.
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline ralul

  • User
  • Posts: 1.814
RE: propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #3 on: 2012/06/01, 15:36:03 »
Yes that is another problem - not finding the right architecture. But it is a dkms problem! But I wonder why nvidia works? Perhaps the second call to dkms gets an arch parameter lost ?
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.989
RE: propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #4 on: 2012/06/01, 15:50:17 »
Finding the right ARCH should work with the code in the Makefile.
The code works without problem by hand:
Code: [Select]

towo:Defiant> egrep 'CONFIG_X86_(32|64)=y' /lib/modules/3.4-0.towo.4-siduction-amd64/build/.config | cut -d= -f1
CONFIG_X86_64
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline ralul

  • User
  • Posts: 1.814
RE: propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #5 on: 2012/06/01, 16:12:32 »
In the original Makefile of debian package broadcom-sta-dkms:
Code: [Select]
KARCH := $(shell egrep 'CONFIG_X86_(32|64)=y' $(KDIR)/.config 2>/dev/null| cut -d= -f1)
Perhaps KDIR is not defined...

Towo, very thanx for your Help!
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.989
RE: propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #6 on: 2012/06/01, 16:14:44 »
Ideed, it is:
Code: [Select]

ifeq ($(KVER),)
<------>KVER = $(shell uname -r)
endif
KDIR     = /lib/modules/$(KVER)/build
PWD      = $(shell pwd)
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline ralul

  • User
  • Posts: 1.814
RE: propr broadcom wl.ko module doesnt build - linux-3.4
« Reply #7 on: 2012/06/23, 03:40:16 »
There is an open Bug about this:
http://bugs.debian.org/677193  
broadcom-sta-dkms : DKMS doesn't work with 3.4 kernel

Our fix for broadcom-sta-5.100.82.112 /src/wl/sys/wl_linux.c
Code: [Select]
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
#include <asm>
#else
#include <asm>
#endif
has no spaces - this is better functioning:
Code: [Select]
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)Obviously I am the only user who needs to use proprietary broadcom and stumbles upon.
experiencing siduction runs better than my gentoo makes me know I know nothing