2007-11-03 20:46:04

by Jochen Friedrich

[permalink] [raw]
Subject: [PATCH] [POWERPC] Fix fs_enet module build

If fs_enet is build as module, mii-fec/mii-bitbang should be build as
module, as well. Otherwise some symbols remain undefined.

Building modules, stage 2.
MODPOST 5 modules
ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Jochen Friedrich <[email protected]>
---

This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24

drivers/net/fs_enet/Makefile | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc1..2f7563a 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,15 @@

obj-$(CONFIG_FS_ENET) += fs_enet.o

-obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
-obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
+fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o
+fs_enet-$(CONFIG_CPM2) += mac-fcc.o
+
+ifeq ($(CONFIG_8xx),y)
+ obj-$(CONFIG_FS_ENET) += mii-fec.o
+endif
+
+ifeq ($(CONFIG_CPM2),y)
+ obj-$(CONFIG_FS_ENET) += mii-bitbang.o
+endif

fs_enet-objs := fs_enet-main.o
--
1.5.3.4


2007-11-05 16:20:06

by Scott Wood

[permalink] [raw]
Subject: Re: [PATCH] [POWERPC] Fix fs_enet module build

Jochen Friedrich wrote:
> diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
> index 02d4dc1..2f7563a 100644
> --- a/drivers/net/fs_enet/Makefile
> +++ b/drivers/net/fs_enet/Makefile
> @@ -4,7 +4,15 @@
>
> obj-$(CONFIG_FS_ENET) += fs_enet.o
>
> -obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
> -obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
> +fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o
> +fs_enet-$(CONFIG_CPM2) += mac-fcc.o
> +
> +ifeq ($(CONFIG_8xx),y)
> + obj-$(CONFIG_FS_ENET) += mii-fec.o
> +endif
> +
> +ifeq ($(CONFIG_CPM2),y)
> + obj-$(CONFIG_FS_ENET) += mii-bitbang.o
> +endif
>
> fs_enet-objs := fs_enet-main.o

If we're going to mess with this, we should probably just make
CONFIG_FS_ENET_SCC, CONFIG_FS_ENET_FCC, and CONFIG_FS_ENET_FEC, and have
them depend on CONFIG_FS_ENET.

-Scott