2.4.6 PCMCIA NET modular build breakage
Seems like its something that appeared between 2.4.5 and 2.4.6. Anyone know the correct fix, other than reversing the change?
----- Forwarded message from Nicolas Pitre <[email protected]> ----- ---------- Forwarded message ----------
Date: Fri, 6 Jul 2001 12:17:54 +0400
From: Oleg Drokin <[email protected]>
To: [email protected]
Subject: 2.4.6-rmk1-np1 breakage
Hello!
these sevaral bits from latest patch do not allow kernel to build when PCMCIA netcard is selected, but all if the cards are selected as modules
drivers/net/pcmcia/Config.in Wed Jul 4 10:47:46 2001@@ -32,13 +32,4 @@ renamed from drivers/net/pcmcia/Config.in Mon May 28 10:21:00 2001 +0 -0
fi
fi
-if [ "$CONFIG_PCMCIA_3C589" = "y" -o "$CONFIG_PCMCIA_3C574" = "y" -o \
- "$CONFIG_PCMCIA_FMVJ18X" = "y" -o "$CONFIG_PCMCIA_PCNET" = "y" -o \ - "$CONFIG_PCMCIA_NMCLAN" = "y" -o "$CONFIG_PCMCIA_SMC91C92" = "y" -o \ - "$CONFIG_PCMCIA_XIRC2PS" = "y" -o "$CONFIG_PCMCIA_RAYCS" = "y" -o \ - "$CONFIG_PCMCIA_NETWAVE" = "y" -o "$CONFIG_PCMCIA_WAVELAN" = "y" -o \ - "$CONFIG_PCMCIA_XIRTULIP" = "y" ]; then
- define_bool CONFIG_PCMCIA_NETCARD y
-fi
And this bit for top level Makefile
-DRIVERS-$(CONFIG_PCMCIA_NETCARD) += drivers/net/pcmcia/pcmcia_net.o +DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
Since all net cards are modules, object list for pcmcia_net.o is empty and kernel can't be linked.
Bye,
Oleg
----- End forwarded message -----
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 2 lines
Seems like its something that appeared between 2.4.5 and 2.4.6. Anyone know the correct fix, other than reversing the change?
I build with all pcmcia network drivers modular on my test builds, what am I missing here ?
Hello!
Quoted 2 lines
Quoted 2 lines
Seems like its something that appeared between 2.4.5 and 2.4.6. Anyone know the correct fix, other than reversing the change?
AC> I build with all pcmcia network drivers modular on my test builds, what AC> am I missing here ?
Well. As you might have noticed - this is build for StrongArm platform (and that's why I wrote this to SA port maintainer, not to linux-kernel at first).
This is repeatable, of course, and it is started as of 2.4.6 upgrade:
...
make[2]: Leaving directory /home/green/arm/cvs/linux/kernel/arch/arm/fastfpe' make[1]: Leaving directory /home/green/arm/cvs/linux/kernel/arch/arm/fastfpe'
arm-linux-ld -p -X -T arch/arm/vmlinux.lds arch/arm/kernel/head-armv.o arch/arm/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/arm/kernel/kernel.o arch/arm/mm/mm.o arch/arm/mach-sa1100/sa1100.o
kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/cdrom/driver.o drivers/mtd/mtdlink.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/video/video.o \
net/network.o \
arch/arm/fastfpe/fast-math-emu.o arch/arm/nwfpe/math-emu.o arch/arm/lib/lib.a /home/green/arm/cvs/linux/kernel/lib/lib.a /skiff/local/lib/gcc-lib/arm-linux/2.95.2/soft-float/libgcc.a \
--end-group \
-o vmlinuxarm-linux-ld: cannot open drivers/net/pcmcia/pcmcia_net.o: No such file or directory
make: *** [vmlinux] Error 1
And Rules.make is almost identical to that in vanilla kernel (if someone is interested). (almost means that it have rule on how to make .o files from .S)
My .config is below:
CONFIG_ARM=yCONFIG_UID16=yCONFIG_RWSEM_GENERIC_SPINLOCK=yCONFIG_EXPERIMENTAL=yCONFIG_MODULES=yCONFIG_KMOD=yCONFIG_ARCH_SA1100=yCONFIG_SA1100_BITSY=yCONFIG_SA1100_USB=mCONFIG_SA1100_USB_NETLINK=mCONFIG_SA1100_USB_CHAR=mCONFIG_SA1100_REGMON=mCONFIG_CPU_32=y
CONFIG_CPU_32v4=yCONFIG_CPU_SA1100=yCONFIG_DISCONTIGMEM=yCONFIG_CPU_FREQ=yCONFIG_HOTPLUG=yCONFIG_PCMCIA=mCONFIG_PCMCIA_SA1100=mCONFIG_NET=yCONFIG_SYSVIPC=yCONFIG_SYSCTL=yCONFIG_FPE_NWFPE=yCONFIG_FPE_FASTFPE=yCONFIG_KCORE_ELF=yCONFIG_BINFMT_AOUT=mCONFIG_BINFMT_ELF=yCONFIG_PM=yCONFIG_APM=mCONFIG_CMDLINE="keepinitrd"CONFIG_ALIGNMENT_TRAP=yCONFIG_MTD=yCONFIG_MTD_DEBUG=yCONFIG_MTD_DEBUG_VERBOSE=1CONFIG_MTD_PARTITIONS=yCONFIG_MTD_BOOTLDR_PARTS=yCONFIG_MTD_CHAR=mCONFIG_MTD_BLOCK=yCONFIG_MTD_CFI=yCONFIG_MTD_CFI_ADV_OPTIONS=yCONFIG_MTD_CFI_NOSWAP=yCONFIG_MTD_CFI_GEOMETRY=yCONFIG_MTD_CFI_B2=yCONFIG_MTD_CFI_B4=yCONFIG_MTD_CFI_I1=yCONFIG_MTD_CFI_I2=yCONFIG_MTD_CFI_INTELEXT=yCONFIG_MTD_SA1100=yCONFIG_MTD_SA1100_KERNELSIZE=c0000CONFIG_BLK_DEV_LOOP=mCONFIG_BLK_DEV_NBD=mCONFIG_PACKET=yCONFIG_PACKET_MMAP=yCONFIG_NETLINK=yCONFIG_RTNETLINK=yCONFIG_NETFILTER=yCONFIG_FILTER=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_NET_IPIP=yCONFIG_NET_IPGRE=yCONFIG_IP_MROUTE=yCONFIG_IP_PIMSM_V1=yCONFIG_INET_ECN=yCONFIG_IPV6=mCONFIG_IPV6_MOBILITY=mCONFIG_IPV6_MOBILITY_DEBUG=yCONFIG_IP6_NF_IPTABLES=mCONFIG_NETDEVICES=yCONFIG_PPP=mCONFIG_PPP_ASYNC=mCONFIG_PPP_DEFLATE=mCONFIG_PPP_BSDCOMP=mCONFIG_NET_RADIO=yCONFIG_WAVELAN=mCONFIG_ARLAN=mCONFIG_AIRONET4500=mCONFIG_AIRONET4500_NONCS=mCONFIG_PCMCIA_HERMES=mCONFIG_NET_WIRELESS=yCONFIG_NET_PCMCIA=yCONFIG_PCMCIA_3C589=mCONFIG_PCMCIA_3C574=mCONFIG_PCMCIA_FMVJ18X=mCONFIG_PCMCIA_PCNET=mCONFIG_PCMCIA_NMCLAN=mCONFIG_PCMCIA_SMC91C92=mCONFIG_PCMCIA_XIRC2PS=mCONFIG_NET_PCMCIA_RADIO=yCONFIG_PCMCIA_WVLAN=mCONFIG_IRDA=mCONFIG_IRLAN=mCONFIG_IRNET=mCONFIG_IRCOMM=mCONFIG_IRDA_ULTRA=yCONFIG_IRDA_OPTIONS=yCONFIG_IRDA_CACHE_LAST_LSAP=yCONFIG_IRDA_FAST_RR=yCONFIG_IRDA_DEBUG=yCONFIG_SA1100_FIR=mCONFIG_IDE=mCONFIG_BLK_DEV_IDE=mCONFIG_BLK_DEV_IDEDISK=mCONFIG_BLK_DEV_IDECS=mCONFIG_BLK_DEV_IDECD=mCONFIG_BLK_DEV_IDETAPE=mCONFIG_BLK_DEV_IDEFLOPPY=mCONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_SERIAL=mCONFIG_SERIAL_SA1100=yCONFIG_SERIAL_SA1100_CONSOLE=yCONFIG_SA1100_DEFAULT_BAUDRATE=115200CONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_UNIX98_PTY_COUNT=32CONFIG_TOUCHSCREEN_BITSY=mCONFIG_H3600_STOWAWAY=mCONFIG_PROFILER=mCONFIG_MOUSE=mCONFIG_SA1100_RTC=mCONFIG_PCMCIA_SERIAL_CS=mCONFIG_VIDEO_DEV=mCONFIG_VIDEO_PROC_FS=yCONFIG_FAT_FS=mCONFIG_VFAT_FS=mCONFIG_JFFS2_FS=yCONFIG_JFFS2_FS_DEBUG=1CONFIG_CRAMFS=mCONFIG_RAMFS=yCONFIG_PROC_FS=yCONFIG_DEVFS_FS=yCONFIG_DEVFS_MOUNT=yCONFIG_DEVPTS_FS=yCONFIG_EXT2_FS=mCONFIG_NFS_FS=mCONFIG_SUNRPC=mCONFIG_LOCKD=mCONFIG_SMB_FS=mCONFIG_MSDOS_PARTITION=yCONFIG_SMB_NLS=yCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_PC_KEYMAP=yCONFIG_FB=yCONFIG_DUMMY_CONSOLE=yCONFIG_FB_SA1100=yCONFIG_FBCON_ADVANCED=yCONFIG_FBCON_CFB16=yCONFIG_FBCON_FONTWIDTH8_ONLY=yCONFIG_FBCON_FONTS=y
CONFIG_FONT_8x8=yCONFIG_SOUND=mCONFIG_SOUND_BITSY_UDA1341=mCONFIG_SOUND_UDA1341=mCONFIG_DEBUG_ERRORS=y
Bye,
Oleg
Quoted 9 lines · Oleg Drokin
arm-linux-ld -p -X -T arch/arm/vmlinux.lds arch/arm/kernel/head-armv.o arch/arm/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/arm/kernel/kernel.o arch/arm/mm/mm.o arch/arm/mach-sa1100/sa1100.o
kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/cdrom/driver.o drivers/mtd/mtdlink.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/video/video.o \
net/network.o \
arch/arm/fastfpe/fast-math-emu.o arch/arm/nwfpe/math-emu.o arch/arm/lib/lib.a /home/green/arm/cvs/linux/kernel/lib/lib.a /skiff/local/lib/gcc-lib/arm-linux/2.95.2/soft-float/libgcc.a \
--end-group \
-o vmlinuxQuoted 5 lines
arm-linux-ld: cannot open
drivers/net/pcmcia/pcmcia_net.o: No such file or directory
make: *** [vmlinux] Error 1And Rules.make is almost identical to that in vanilla kernel (if someone is interested). (almost means that it have rule on how to make .o files from .S)
It is clear that,
(1) your config has CONFIG_NET_PCMCIA, and appears to be ok
(2) your linux/Makefile is correct, as the link statement includes pcmcia_net.o
So that leaves us with drivers/net/Makefile anddrivers/net/pcmcia/Makefile.
drivers/net/Makefile is a potential problem source, perhaps the following change is not in your arch tree:
subdir-$(CONFIG_NET_PCMCIA) += pcmcia
If that statement exists in drivers/net/Makefile, you need to run a kernel build, and start staring at make output to see exactly why it is not building.
Signature · 3 lines
Jeff Garzik | A recent study has shown that too much soup Building 1024 | can cause malaise in laboratory mice. MandrakeSoft |
Quoted 2 lines · Russell King
Seems like its something that appeared between 2.4.5 and 2.4.6. Anyone know the correct fix, other than reversing the change?
It should be fine.
Quoted 2 lines
Since all net cards are modules, object list for pcmcia_net.o is empty and kernel can't be linked.
Could you reproduce this? (I don't think you can)
Rules.make takes care of an empty $(obj-y) and builds an empty $(O_TARGET) file in this case, so linking this in should work fine.
--Kai
Hello!
Quoted 2 lines
Quoted 2 lines
Seems like its something that appeared between 2.4.5 and 2.4.6. Anyone know the correct fix, other than reversing the change?
KG> It should be fine.
It is not.
Quoted 2 lines
Quoted 2 lines
Since all net cards are modules, object list for pcmcia_net.o is empty and kernel can't be linked.
KG> Could you reproduce this? (I don't think you can) Sure, I can. First thing I did was in fact to try and reproduce that.
KG> Rules.make takes care of an empty $(obj-y) and builds an empty $(O_TARGET) KG> file in this case, so linking this in should work fine. Hmm....
(examining Makefile...)
I see. So there cannot be usual targets before including Rules.make, and my copy of the tree have these. And if I move them after inclusion, everything builds just fine.
Perhaps it should be documented somewhere.
Well. So at the end it seems to be not a vanilla kernel problem. That's good.
Bye,
Oleg
Quoted 8 lines · Oleg Drokin
Hmm....
(examiningMakefile...)
I see. So there cannot be usual targets before including Rules.make, and my copy of the tree have these. And if I move them after inclusion, everything builds just fine.
Perhaps it should be documented somewhere.Well. So at the end it seems to be not a vanilla kernel problem. That's good.
Ok, so you got the problem solved. Mind enlightening me and Nico so we know what's wrong please?
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html