Skip to contentSkip to conversation

CONFIG_ATALK cannot be compiled as a module

PATCH Applied Adrian Bunk 3 participants 5 messages May 10, 2004 – May 22, 2004 Networking

lore
Share & tools
lore
#0 lore raw

(2.4.24)
Reply-To:
In-Reply-To: <[email protected]>

Quoted 19 lines · Oliver Feiler

Hi Adrian,

Quoted 11 lines · Adrian Bunk
Quoted 5 lines

when selecting CONFIG_ATALK as a module the symbols register_snap_client and unregister_snap_client will be unresolved. As I understand it they are in net/802/psnap.c which does not get compiled when Appletalk is selected as a module. Compiling into the kernel works fine.
...

thanks for this report and sorry for the late answer.

I wasn't able to reproduce your problem.

Please send your .config.

Attached. Upgraded the server to 2.4.26 in the meantime and threw out appletalk again since we didn't need it in the end.

Quoted 8 lines

A quick test with compiling it as a module produced the same unresolved symbols. Unless I missed another config option to set?

I don't need to set CONFIG_DEV_APPLETALK as well, right? Regardless, just tried, same effect.

Btw, I think I didn't mention earlier, the kernel is patched with i2c-2.8.3. Patch generated with mkpatch from the package and applied.

The patch below that should fix it.

diffstat output:

 net/802/Makefile |   60 ++++++++++++++---------------------------------
 net/Makefile     |    2 -
 2 files changed, 20 insertions(+), 42 deletions(-)

patch description:
- net/Makefile: there might be modules in net/802/
- net/802/Makefile: deuglyfy it and make it more similar to the

                    2.6 version
Quoted 3 lines

Thanks!

Oliver

cu
Adrian

net/802/Makefile renamed from net/802/Makefile.old +19 -41
@@ -11,48 +11,26 @@
 
 export-objs = llc_macinit.o p8022.o psnap.o fc.o
 
-obj-y	= p8023.o
+obj-y			:= p8023.o
+
+obj-$(CONFIG_SYSCTL)	+= sysctl_net_802.o
+
+subdir-$(CONFIG_LLC)	+= transit
+obj-$(CONFIG_LLC)	+= llc_sendpdu.o llc_utility.o cl2llc.o llc_macinit.o
+obj-$(CONFIG_LLC)	+= p8022.o psnap.o
+
+obj-$(CONFIG_TR)	+= p8022.o psnap.o tr.o
+
+obj-$(CONFIG_NET_FC)	+=                 fc.o
+
+obj-$(CONFIG_FDDI)	+=                 fddi.o
+
+obj-$(CONFIG_HIPPI)	+=                 hippi.o
+
+obj-$(CONFIG_IPX)	+= p8022.o psnap.o
+
+obj-$(CONFIG_ATALK)	+= p8022.o psnap.o
 
-obj-$(CONFIG_SYSCTL) += sysctl_net_802.o
-obj-$(CONFIG_LLC) += llc_sendpdu.o llc_utility.o cl2llc.o llc_macinit.o
-ifeq ($(CONFIG_SYSCTL),y)
-obj-y += sysctl_net_802.o
-endif
-
-ifeq ($(CONFIG_LLC),y)
-subdir-y += transit
-obj-y += llc_sendpdu.o llc_utility.o cl2llc.o llc_macinit.o
-SNAP = y
-endif
-
-ifdef CONFIG_TR
-obj-y += tr.o
-	SNAP=y
-endif
-
-ifdef CONFIG_NET_FC
-obj-y += fc.o
-endif
-
-ifdef CONFIG_FDDI
-obj-y += fddi.o
-endif
-
-ifdef CONFIG_HIPPI
-obj-y += hippi.o
-endif
-
-ifdef CONFIG_IPX
-	SNAP=y
-endif
-
-ifdef CONFIG_ATALK
-	SNAP=y
-endif
-
-ifeq ($(SNAP),y)
-obj-y += p8022.o psnap.o
-endif
 
 include $(TOPDIR)/Rules.make
 
net/Makefile renamed from net/Makefile.old +1 -1
@@ -7,7 +7,7 @@
 
 O_TARGET :=	network.o
 
-mod-subdirs :=	ipv4/netfilter ipv6/netfilter ipx irda bluetooth atm netlink sched core sctp
+mod-subdirs :=	ipv4/netfilter ipv6/netfilter ipx irda bluetooth atm netlink sched core sctp 802
 export-objs :=	netsyms.o
 
 subdir-y :=	core ethernet
#1 lore raw
Quoted 4 lines · On Tue, 11 May 2004 01:53:43 +0200 Adrian Bunk <[email protected]> wrote:

patch description:
- net/Makefile: there might be modules in net/802/
- net/802/Makefile: deuglyfy it and make it more similar to the

                    2.6 version

Applied, thanks Adrian.

#2 lore raw
In reply to Adrian Bunk

Hi Adrian,

sorry for the late reply, didn't find time to test it earlier.

Quoted 10 lines · Adrian Bunk
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

when selecting CONFIG_ATALK as a module the symbols register_snap_client and unregister_snap_client will be unresolved. As I understand it they are in net/802/psnap.c which does not get compiled when Appletalk is selected as a module. Compiling into the kernel works fine.
...

The patch below that should fix it.

diffstat output:

Quoted 8 lines
 net/802/Makefile |   60 ++++++++++++++---------------------------------
 net/Makefile     |    2 -
 2 files changed, 20 insertions(+), 42 deletions(-)

patch description:
- net/Makefile: there might be modules in net/802/
- net/802/Makefile: deuglyfy it and make it more similar to the

                    2.6 version

Yes, works fine. No unresolved symbols.

FWIW, the modules psnap.o and p8022.o don't export a license and taint the kernel:

Warning: loading /lib/modules/2.4.26/kernel/net/802/p8022.o will taint the
kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted
modules
Module p8022 loaded, with warnings
Warning: loading /lib/modules/2.4.26/kernel/net/802/psnap.o will taint the
kernel: no license
Module psnap loaded, with warnings
Module appletalk loaded, with warnings

Other than that it works for me. Thanks for your help!

Oliver

Signature · 1 line
Oliver Feiler  -  http://kiza.kcore.de/
#3 lore raw

PATCH 1/1 net/802/{p8022,psnap}.c: add MODULE_LICENSE

Quoted 1 line · Oliver Feiler

Hi Adrian,

Hi Oliver,

Quoted 2 lines

...
Yes, works fine. No unresolved symbols.

thanks for the confirmation, and also thanks for this report.

Quoted 3 lines

FWIW, the modules psnap.o and p8022.o don't export a license and taint the kernel:
...

A fix is below (stolen from 2.6 ;-) ).

Quoted 1 line

Oliver

cu
Adrian

net/802/p8022.c renamed from net/802/p8022.c.old +2 -0
@@ -142,3 +142,5 @@
 
 	restore_flags(flags);
 }
+
+MODULE_LICENSE("GPL");
net/802/psnap.c renamed from net/802/psnap.c.old +2 -0
@@ -152,3 +152,5 @@
 
 	restore_flags(flags);
 }
+
+MODULE_LICENSE("GPL");
#4 lore raw

Re: [2.4 patch] net/802/{p8022,psnap}.c: add MODULE_LICENSE

Applied, thanks Adrian.