Skip to contentSkip to conversation

Allow building iwl3945 without iwl4965.

PATCH In review Jason Riedy 8 participants 18 messages Apr 26, 2008 – May 6, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow building iwl3945 without iwl4965.

If IWL3945 ever depends on IWLCORE, the silent, user-invisible IWLWIFI option can go away.

---
The breakage made it to Linus's tree but isn't in the wireless forest (as far as I can see). Commit 49186b4a083655 is a "part 2" without a "part 1", so perhaps that "part 1" avoided the problem?

 drivers/net/wireless/Makefile        |    2 +-
 drivers/net/wireless/iwlwifi/Kconfig |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
drivers/net/wireless/Makefile +1 -1
index c2642bc..2c343aa 100644
@@ -56,7 +56,7 @@ obj-$(CONFIG_RTL8187)	+= rtl8187.o
 
 obj-$(CONFIG_ADM8211)	+= adm8211.o
 
-obj-$(CONFIG_IWLCORE)	+= iwlwifi/
+obj-$(CONFIG_IWLWIFI)	+= iwlwifi/
 obj-$(CONFIG_RT2X00)	+= rt2x00/
 
 obj-$(CONFIG_P54_COMMON)	+= p54/
drivers/net/wireless/iwlwifi/Kconfig +6 -0
index c4e631d..9a25f55 100644
@@ -1,6 +1,11 @@
+config IWLWIFI
+	bool
+	default n
+
 config IWLCORE
 	tristate "Intel Wireless Wifi Core"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
+	select IWLWIFI
 
 config IWLWIFI_LEDS
 	bool
@@ -106,6 +111,7 @@ config IWL3945
 	tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
 	select FW_LOADER
+	select IWLWIFI
 	---help---
 	  Select to build the driver supporting the:
 
Signature · 1 line
1.5.5.rc1.121.g1594
maintainer
#1 lore raw

From: Jason Riedy <[email protected]>
Date: Sat, 26 Apr 2008 15:27:43 -0700

Quoted 4 lines

If IWL3945 ever depends on IWLCORE, the silent, user-invisible IWLWIFI option can go away.

Patch applied, thanks a lot jason.

Quoted 3 lines

The breakage made it to Linus's tree but isn't in the wireless forest (as far as I can see). Commit 49186b4a083655 is a "part 2" without a "part 1", so perhaps that "part 1" avoided the problem?

No, the "part 1" is exactly the patch posted by Tomas Winkler and referenced in the 49186b4a083655 commit, which is:

commit d7d313000ba2fc94a5383511a17ff38a39bab928

Author: Tomas Winkler <[email protected]>
Date:   Wed Apr 23 03:48:57 2008 -0700

iwlwifi: Fix built-in compilation of iwlcore

This patch fixes problem in Makefile that prevented built-in compilation of iwlcore

Commit that caused this problem: eadd3c4b ("iwlwifi: make Makefile more concise")

drivers/net/wireless/iwlwifi/Makefile +1 -1
index 4f3e88b..ec6187b 100644
@@ -1,4 +1,4 @@
-obj-$(CONFIG_IWLCORE)	:= iwlcore.o
+obj-$(CONFIG_IWLCORE)	+= iwlcore.o
 iwlcore-objs 		:= iwl-core.o iwl-eeprom.o iwl-hcmd.o
 iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
 iwlcore-$(CONFIG_IWLWIFI_LEDS) += iwl-led.o
#2 lore raw
In reply to Jason Riedy
Quoted 43 lines · Jason Riedy

If IWL3945 ever depends on IWLCORE, the silent, user-invisible IWLWIFI option can go away.

---
The breakage made it to Linus's tree but isn't in the wireless forest (as far as I can see). Commit 49186b4a083655 is a "part 2" without a "part 1", so perhaps that "part 1" avoided the problem?

 drivers/net/wireless/Makefile        |    2 +-
 drivers/net/wireless/iwlwifi/Kconfig |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
drivers/net/wireless/Makefile +1 -1
index c2642bc..2c343aa 100644
@@ -56,7 +56,7 @@ obj-$(CONFIG_RTL8187)	+= rtl8187.o
 
 obj-$(CONFIG_ADM8211)	+= adm8211.o
 
-obj-$(CONFIG_IWLCORE)	+= iwlwifi/
+obj-$(CONFIG_IWLWIFI)	+= iwlwifi/
 obj-$(CONFIG_RT2X00)	+= rt2x00/
 
 obj-$(CONFIG_P54_COMMON)	+= p54/
drivers/net/wireless/iwlwifi/Kconfig +5 -0
index c4e631d..9a25f55 100644
@@ -1,6 +1,11 @@
+config IWLWIFI
+	bool
+	default n
+
 config IWLCORE
 	tristate "Intel Wireless Wifi Core"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
+	select IWLWIFI
 
 config IWLWIFI_LEDS
 	bool

drivers/net/wireless/iwlwifi/Kconfig config IWL3945 · line 116

Quoted 6 lines
drivers/net/wireless/iwlwifi/Kconfig +1 -0
@@ -106,6 +111,7 @@ config IWL3945
 	tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
 	select FW_LOADER
+	select IWLWIFI
 	---help---
 	  Select to build the driver supporting the:

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI with the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)? AFAICS, CONFIG_IWLWIFI is always 'y' whenever CONFIG_IWLCORE is 'y' or 'm'. If the latter is 'm', the Makefile will generate a empty built-in.o which requires vmlinux to update unnecessarily every time we only compile iwl3945/4965 modules.

Thanks,
-yi

#3 lore raw
Quoted 6 lines · Zhu Yi

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI with the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)? AFAICS, CONFIG_IWLWIFI is always 'y' whenever CONFIG_IWLCORE is 'y' or 'm'. If the latter is 'm', the Makefile will generate a empty built-in.o which requires vmlinux to update unnecessarily every time we only compile iwl3945/4965 modules.

Can you do something like "default IWLCORE'? Untested, off the top of my head...

John

Signature · 2 lines
John W. Linville
[email protected]
#4 lore raw
Quoted 5 lines · John W. Linville
Quoted 2 lines

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI

with

Quoted 2 lines

the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)? AFAICS, CONFIG_IWLWIFI is always 'y' whenever CONFIG_IWLCORE is 'y' or 'm'.

Quoted 8 lines

If

Quoted 1 line

the latter is 'm', the Makefile will generate a empty built-in.o

which

Quoted 2 lines

requires vmlinux to update unnecessarily every time we only compile iwl3945/4965 modules.

Can you do something like "default IWLCORE'? Untested, off the top of my head...

I just realized the kernel now updates vmlinux when I type 'make' even if nothing is changed in the source code. Is this a bug or feature?

Thanks,
-yi

maintainer
#5 lore raw

From: Zhu Yi <[email protected]>
Date: Wed, 30 Apr 2008 10:14:39 +0800

Quoted 2 lines

I just realized the kernel now updates vmlinux when I type 'make' even if nothing is changed in the source code. Is this a bug or feature?

The build number increments every time you make.

That's where the "#nn" in the uname output comes from.

#6 lore raw
Quoted 3 lines · David Miller

The build number increments every time you make.

That's where the "#nn" in the uname output comes from.

Well, if nothing is changed, why it tries to recompile the image? IIRC, we don't have this problem in early kernels.

Thanks,
-yi

maintainer
#7 lore raw

From: Zhu Yi <[email protected]>
Date: Wed, 30 Apr 2008 10:31:07 +0800

Quoted 7 lines · David Miller
Quoted 3 lines

The build number increments every time you make.

That's where the "#nn" in the uname output comes from.

Well, if nothing is changed, why it tries to recompile the image? IIRC, we don't have this problem in early kernels.

Something did change, the build number in the header file.

#9 lore raw
In reply to Zhu Yi
Quoted 9 lines · Zhu Yi
Quoted 8 lines · John W. Linville
Quoted 2 lines

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI

with

Quoted 2 lines

the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)? AFAICS, CONFIG_IWLWIFI is always 'y' whenever CONFIG_IWLCORE is 'y' or 'm'.

If

Quoted 1 line

the latter is 'm', the Makefile will generate a empty built-in.o

which

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

requires vmlinux to update unnecessarily every time we only compile iwl3945/4965 modules.

Can you do something like "default IWLCORE'? Untested, off the top of my head...

I just realized the kernel now updates vmlinux when I type 'make' even if nothing is changed in the source code. Is this a bug or feature?

I see files in arch/x86/kernel/acpi/realmode/ always being built. Is that what you see or is it something else?

You can do
make V=2 all >build.log 2>&1
to see what is being rebuilt and hopefully why.
Then post that and maybe we can fix it (with the right people helping).

Signature · 1 line
~Randy
#8 lore raw
In reply to David Miller
Quoted 4 lines · David Miller

From: Zhu Yi <[email protected]>
Date: Wed, 30 Apr 2008 10:31:07 +0800

Quoted 1 line · David Miller
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

The build number increments every time you make.

That's where the "#nn" in the uname output comes from.

Well, if nothing is changed, why it tries to recompile the image? IIRC, we don't have this problem in early kernels.

Something did change, the build number in the header file.

It doesn't do it in 2.6.22:

[root@lang2 linux-2.6.22.9-foo]# pwd
/home/extra/usr/src/kernels/linux-2.6.22.9-foo

[root@lang2 linux-2.6.22.9-foo]# strings - vmlinux | grep 'Linux vers'
Linux version 2.6.22.9-mf1 ([email protected]) (gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)) #4 SMP Wed Apr 30 00:37:52 EDT 2008

[root@lang2 linux-2.6.22.9-foo]# make

  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h

MODPOST vmlinux
Kernel: arch/x86_64/boot/bzImage is ready (#4)
Building modules, stage 2.
MODPOST 1605 modules

[root@lang2 linux-2.6.22.9-foo]# strings - vmlinux | grep 'Linux vers'
Linux version 2.6.22.9-mf1 ([email protected]) (gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)) #4 SMP Wed Apr 30 00:37:52 EDT 2008

This is as it should be I would think.

-Bill

#10 lore raw
In reply to Randy.Dunlap
Quoted 20 lines · Randy.Dunlap
Quoted 9 lines · Zhu Yi
Quoted 8 lines · John W. Linville
Quoted 2 lines

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI

with

Quoted 2 lines

the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)? AFAICS, CONFIG_IWLWIFI is always 'y' whenever CONFIG_IWLCORE is 'y' or 'm'.

If

Quoted 1 line

the latter is 'm', the Makefile will generate a empty built-in.o

which

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

requires vmlinux to update unnecessarily every time we only compile iwl3945/4965 modules.

Can you do something like "default IWLCORE'? Untested, off the top of my head...

I just realized the kernel now updates vmlinux when I type 'make' even if nothing is changed in the source code. Is this a bug or feature?

Quoted 7 lines

I see files in arch/x86/kernel/acpi/realmode/ always being built. Is that what you see or is it something else?

You can do
make V=2 all >build.log 2>&1
to see what is being rebuilt and hopefully why.
Then post that and maybe we can fix it (with the right people helping).

I found below fixes the problem. Sam, could you take a look?

Thanks,
-yi

Makefile +1 -1
index 39516bf..7788c77 100644
@@ -812,7 +812,7 @@ endif
 
 # build vmlinux.o first to catch section mismatch errors early
 ifdef CONFIG_KALLSYMS
-.tmp_vmlinux1: vmlinux.o
+#.tmp_vmlinux1: vmlinux.o
 endif
 vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE
        $(call if_changed_rule,vmlinux-modpost)
#11 lore raw
Quoted 24 lines · Zhu Yi
Quoted 23 lines · Randy.Dunlap
Quoted 9 lines · Zhu Yi
Quoted 8 lines · John W. Linville
Quoted 2 lines

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI

with

Quoted 2 lines

the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)? AFAICS, CONFIG_IWLWIFI is always 'y' whenever CONFIG_IWLCORE is 'y' or 'm'.

If

Quoted 1 line

the latter is 'm', the Makefile will generate a empty built-in.o

which

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

requires vmlinux to update unnecessarily every time we only compile iwl3945/4965 modules.

Can you do something like "default IWLCORE'? Untested, off the top of my head...

I just realized the kernel now updates vmlinux when I type 'make' even if nothing is changed in the source code. Is this a bug or feature?

I see files in arch/x86/kernel/acpi/realmode/ always being built. Is that what you see or is it something else?

Quoted 6 lines
Quoted 4 lines

You can do
make V=2 all >build.log 2>&1
to see what is being rebuilt and hopefully why.
Then post that and maybe we can fix it (with the right people helping).

I found below fixes the problem. Sam, could you take a look?

Fix is in -linus now.

Sam

#12 lore raw
Quoted 7 lines · Sam Ravnborg
Quoted 2 lines
Quoted 2 lines

to see what is being rebuilt and hopefully why. Then post that and maybe we can fix it (with the right people

helping).

Quoted 2 lines

I found below fixes the problem. Sam, could you take a look?

Fix is in -linus now.

Thanks!

-yi

#13 lore raw

PATCH 1/1 make IWLWIFI a tristate

In reply to Zhu Yi
Quoted 41 lines · Zhu Yi
Quoted 40 lines · Jason Riedy

If IWL3945 ever depends on IWLCORE, the silent, user-invisible IWLWIFI option can go away.

---
The breakage made it to Linus's tree but isn't in the wireless forest (as far as I can see). Commit 49186b4a083655 is a "part 2" without a "part 1", so perhaps that "part 1" avoided the problem?

 drivers/net/wireless/Makefile        |    2 +-
 drivers/net/wireless/iwlwifi/Kconfig |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
drivers/net/wireless/Makefile +1 -1
index c2642bc..2c343aa 100644
@@ -56,7 +56,7 @@ obj-$(CONFIG_RTL8187)	+= rtl8187.o
 
 obj-$(CONFIG_ADM8211)	+= adm8211.o
 
-obj-$(CONFIG_IWLCORE)	+= iwlwifi/
+obj-$(CONFIG_IWLWIFI)	+= iwlwifi/
 obj-$(CONFIG_RT2X00)	+= rt2x00/
 
 obj-$(CONFIG_P54_COMMON)	+= p54/
drivers/net/wireless/iwlwifi/Kconfig +5 -0
index c4e631d..9a25f55 100644
@@ -1,6 +1,11 @@
+config IWLWIFI
+	bool
+	default n
+
 config IWLCORE
 	tristate "Intel Wireless Wifi Core"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
+	select IWLWIFI
 
Quoted 13 lines

drivers/net/wireless/iwlwifi/Kconfig config IWL3945 · line 116

Quoted 9 lines
drivers/net/wireless/iwlwifi/Kconfig +1 -0
 config IWLWIFI_LEDS
 	bool
@@ -106,6 +111,7 @@ config IWL3945
 	tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
 	select FW_LOADER
+	select IWLWIFI
 	---help---
 	  Select to build the driver supporting the:

Do we have a way to make "select IWLWIFI" generate CONFIG_IWLWIFI with the same state as CONFIG_IWLCORE (or CONFIG_IWL3945)?
...

Fix below.

Quoted 2 lines

Thanks,
-yi

cu
Adrian

<-- snip -->

IWLWIFI should be a tristate so that if IWLCORE and/or IWL3945 are m and none of them is y kbuild doesn't create an empty drivers/net/wireless/built-in.o

This patch also removes the pointless "default n".

---
f9737a109a127754ae7cc35e94d44fb426e0dea1 diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index d5b7a76..62fb89d 100644

drivers/net/wireless/iwlwifi/Kconfig +1 -2
@@ -1,6 +1,5 @@
 config IWLWIFI
-	bool
-	default n
+	tristate
 
 config IWLCORE
 	tristate "Intel Wireless Wifi Core"
maintainer
#14 lore raw

Re: [2.6 patch] make IWLWIFI a tristate

From: Adrian Bunk <[email protected]>
Date: Mon, 5 May 2008 21:25:16 +0300

Quoted 7 lines

IWLWIFI should be a tristate so that if IWLCORE and/or IWL3945 are m and none of them is y kbuild doesn't create an empty drivers/net/wireless/built-in.o

This patch also removes the pointless "default n".

I'll let this sit and cook for a while so that others can review and test this patch. We've had enough churn in this area already :-)

#15 lore raw

Re: [2.6 patch] make IWLWIFI a tristate

Quoted 7 lines · David Miller

From: Adrian Bunk <[email protected]>
Date: Mon, 5 May 2008 21:25:16 +0300

Quoted 4 lines

IWLWIFI should be a tristate so that if IWLCORE and/or IWL3945 are m and none of them is y kbuild doesn't create an empty drivers/net/wireless/built-in.o

Quoted 7 lines
Quoted 3 lines

This patch also removes the pointless "default n".

I'll let this sit and cook for a while so that others can review and test this patch. We've had enough churn in this area already :-)

No need to hurry, what it fixes is purely cosmetic.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#16 lore raw

Re: [2.6 patch] make IWLWIFI a tristate

In reply to Adrian Bunk
Quoted 17 lines · Adrian Bunk

IWLWIFI should be a tristate so that if IWLCORE and/or IWL3945 are m and none of them is y kbuild doesn't create an empty drivers/net/wireless/built-in.o

This patch also removes the pointless "default n".

---
f9737a109a127754ae7cc35e94d44fb426e0dea1 diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index d5b7a76..62fb89d 100644

drivers/net/wireless/iwlwifi/Kconfig line 5

Quoted 7 lines
drivers/net/wireless/iwlwifi/Kconfig +1 -2
@@ -1,6 +1,5 @@
 config IWLWIFI
-       bool
-       default n
+       tristate
 
 config IWLCORE
        tristate "Intel Wireless Wifi Core"

Great. Thank you Adrian!

-yi

maintainer Applied
#17 lore raw

Re: [2.6 patch] make IWLWIFI a tristate

From: Zhu Yi <[email protected]>
Date: Tue, 06 May 2008 09:26:18 +0800

Quoted 11 lines · Adrian Bunk

drivers/net/wireless/iwlwifi/Kconfig line 5

Quoted 8 lines
drivers/net/wireless/iwlwifi/Kconfig +1 -2
@@ -1,6 +1,5 @@
 config IWLWIFI
-       bool
-       default n
+       tristate
 
 config IWLCORE
        tristate "Intel Wireless Wifi Core"

Great. Thank you Adrian!

I've applied Adrian's patch, thanks everyone.