You are not logged in.

Hi all,
I want to compile my own optimized ck-kernel with localmodcfg="y" which works mostly.
However there is a small problem.
The module 'brcmsmac' for the WLAN card is never included although it is listed in my modprobed.db.
Does someone have any clue what could be the cause?
Thanks
Radioactiveman
Last edited by Radioactiveman (2012-01-13 16:36:15)
Offline

First let's make sure reload_database is working. Run it manually, then post the output of
$ lsmod | grep brcmsIf it's there, locate the option for this module within the nconfig and see if it's enabled by Steven Rostedt's script. If not, I think the problem lies that that code.
Offline

'reload_database' is working fine.
Output of 'lsmod':
$ lsmod | grep brcmsmac
brcmsmac              569832  0
mac80211              222059  1 brcmsmac
brcmutil                6912  1 brcmsmac
cfg80211              165796  2 brcmsmac,mac80211The kernel option is 'CONFIG_BRCMSMAC=m' like in the default config.x86_64 from linux-ck.
However my config (/proc/config.gz) contains '# CONFIG_BRCMSMAC is not set' which leads to the missing module.
Another important information is, I don't use '_makenconfig="Y"' (at least for now).
Graysky, could you try to compile the kernel with brcmsmac to see if it's working for you?
If you want my modprobed.db, tell it.
EDIT: there is a typo at 'Intel C++' https://wiki.archlinux.org/index.php/User:Graysky
Thanks
Radioactiveman
Last edited by Radioactiveman (2011-12-29 13:00:06)
Offline

Today I found out this problem is not related to the ck-kernel because compiling linux-mainline doesn't work properly either.
It would be nice if someone (graysky  ) compiles a kernel with localmodcfg while having brcmsmac loaded.
) compiles a kernel with localmodcfg while having brcmsmac loaded.
Offline

Today I found out this problem is not related to the ck-kernel because compiling linux-mainline doesn't work properly either.
Always glad to hear bugs are NOT due to my stuff  You'll need to email upstream (Steven Rostedt) to let me know about a bug in his code.
  You'll need to email upstream (Steven Rostedt) to let me know about a bug in his code.
It would be nice if someone (graysky
) compiles a kernel with localmodcfg while having brcmsmac loaded.
To verify the bug? I'm confused.
Offline

I just want to make sure that someone is able to reproduce it. Then I know the bug is not caused by a mistake and I'll contact Steven Rostedt.
Offline

I'd say go ahead and email him now; you have verified the behavior under two different kernels.
Offline

Today he answered finally: 
Hi,
Sorry for the late reply. I was on break and this got lost in my pile of
emails during it.Ug this is nasty. The make localmodconfig does a parsing of the
Makefile's looking for the "obj-$(CONFIG_FOO) += foo.o" names. But in
this case we have in drivers/net/wireless/brcm80211/brcmsmac/Makefile:MODULEPFX := brcmsmac
obj-$(CONFIG_BRCMSMAC) += $(MODULEPFX).o
I have no idea why they did this. But this fools the parsing, because
the localmodconfig script doesn't convert the $(MODULEPFX) into
anything. I could try to come up with a patch to do so.Thanks for the report!
-- Steve
Will report again.
Last edited by Radioactiveman (2012-01-12 16:58:50)
Offline

You have to disable bcma to get brcmsmac, see this: https://bugs.archlinux.org/task/27844
ᶘ ᵒᴥᵒᶅ
Offline

Who wrote the first comment there? 
And it's the same with 3.1.x.
Anyway, I responded to his email and report hopefully soon. 
[EDIT]: He sent me a patch, trying it now.
Last edited by Radioactiveman (2012-01-12 17:32:49)
Offline

Who wrote the first comment there?
And it's the same with 3.1.x.Anyway, I responded to his email and report hopefully soon.
[EDIT]: He sent me a patch, trying it now.
Ahh lol, sorry about that. 
ᶘ ᵒᴥᵒᶅ
Offline

A minor fix for the patch by Steven Rostedt solved my issue.
I have compiled linux-ck 3.2.1-2 with localmodconfig today and brcmsmac is now included.
Marking the thread as solved, thanks to Steve.
Patch file:
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index ec7afce..bccf07d 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -250,33 +250,61 @@ if ($kconfig) {
     read_kconfig($kconfig);
 }
 
+sub convert_vars {
+    my ($line, %vars) = @_;
+
+    my $process = "";
+
+    while ($line =~ s/^(.*?)(\$\((.*?)\))//) {
+	my $start = $1;
+	my $variable = $2;
+	my $var = $3;
+
+	if (defined($vars{$var})) {
+	    $process .= $start . $vars{$var};
+	} else {
+	    $process .= $start . $variable;
+	}
+    }
+
+    $process .= $line;
+
+    return $process;
+}
+
 # Read all Makefiles to map the configs to the objects
 foreach my $makefile (@makefiles) {
 
-    my $cont = 0;
+    my $line = "";
+    my %make_vars;
 
     open(MIN,$makefile) || die "Can't open $makefile";
     while (<MIN>) {
+	# if this line ends with a backslash, continue
+	chomp;
+	if (/^(.*)\\$/) {
+	    $line .= $1;
+	    next;
+	}
+
+	$line .= $_;
+	$_ = $line;
+	$line = "";
+
 	my $objs;
 
-	# is this a line after a line with a backslash?
-	if ($cont && /(\S.*)$/) {
-	    $objs = $1;
-	}
-	$cont = 0;
+	$_ = convert_vars($_, %make_vars);
 
 	# collect objects after obj-$(CONFIG_FOO_BAR)
 	if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
 	    $var = $1;
 	    $objs = $2;
+
+	# check if variables are set
+	} elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) {
+	    $make_vars{$1} = $2;
 	}
 	if (defined($objs)) {
-	    # test if the line ends with a backslash
-	    if ($objs =~ m,(.*)\\$,) {
-		$objs = $1;
-		$cont = 1;
-	    }
-
 	    foreach my $obj (split /\s+/,$objs) {
 		$obj =~ s/-/_/g;
 		if ($obj =~ /(.*)\.o$/) {Last edited by Radioactiveman (2012-01-13 16:37:06)
Offline

Patch was merged into 3.0-stable, 3.2-stable and linux-git.
And 3.2.2 was released today with the patch. 
Offline