1.3.20: to NET or not to NET

Tornaria Gonzalo (gtornari@varela.reu.edu.uy)
Thu, 24 Aug 95 4:23:57 URU


I got some "Undefined symbol" when compiling 1.3.20 *without* CONFIG_NET:

in net/network.a(socket.o):

_verify_iovec it's in net/core/iovec.o

in net/network.a(unix.o)

_kfree_skb it's in net/core/skbuff.o
_sock_setsockopt it's in net/core/sock.o
_sock_getsockopt it's in net/core/sock.o
_sock_alloc_send_skb it's in net/core/sock.o
_memcpy_fromiovec it's in net/core/iovec.o
_datagram_select it's in net/core/datagram.o


This is a patch for net/core/Makefile to link only those files in
net/core/core.o (not being a kernel guru, I really don't know if
it's ok, but at least it compiles and has worked a couple of days)

--------->8------------>8---------
--- net/core/Makefile.old Sun Aug 20 04:12:25 1995
+++ net/core/Makefile Sun Aug 20 04:12:53 1995
@@ -9,10 +9,10 @@

O_TARGET := core.o

-O_OBJS :=
+O_OBJS := sock.o iovec.o skbuff.o datagram.o

ifdef CONFIG_NET
-O_OBJS += sock.o dev.o dev_mcast.o iovec.o skbuff.o datagram.o
+O_OBJS += dev.o dev_mcast.o
endif

include $(TOPDIR)/Rules.make
---------8<------------8<---------

After that I had some more problems... I couldn't compile anything

with CONFIG_MODVERSIONS (I don't like to recompile modules every time,
having a 386Dx/25 with only 4Mb... BTW it would be nice to select
which modules to compile). Some warnings in versions.mk, and then
some errors in kernel/ksyms.c.

I didn't understand that, so I turned off CONFIG_MODVERSIONS...
Everything compiled apparently rigth, but when I tried to insmod, I
found yet another _bad_user_access_length problem, with some modules...
Of course with gcc 2.5.8. for example, in floppy.c, I found the
problem in calls to memcpy_fromfs from the COPYIN macro.

I upgraded to 2.6.3 from slackware 2.3 and that solved the problem...
(BTW where can I found 2.7.0 a.out binaries to compile in a.out?
i.e. a quick replace as it was 2.6.3 from slackware. I think I saw
some 2.7.0 a.out in sunsite incoming, but I can't locate it now).

BUT... I have undefined symbols in some modules, namely:

binfmt_elf dump_fpu
minix strnlen
sysv strnlen


Altough I don't need those modules for now... I think those symbols
should be added to kernel/ksyms.c, but I don't want to mess with that...

Also, the Makefiles have some problems with modules in the fs
directory... the "Hack for fs subdirectories" in Rules.make works
iff I have defined CONFIG_BINFMT_ELF (can't chdir to binfmt_elf.o ;-)
Here's a patch that solves this:

--------->8------------>8---------
--- Rules.make.old Mon Aug 21 01:03:47 1995
+++ Rules.make Mon Aug 21 02:48:01 1995
@@ -89,18 +89,16 @@
set -e; for i in $(MOD_SUB_DIRS); do $(MAKE) -C $$i modules; done
endif
ifneq "$(strip $(MOD_LIST_NAME))" ""
-ifndef M_OBJS # Hack for fs subdirectories
rm -f $$TOPDIR/modules/$(MOD_LIST_NAME)
for i in $(MOD_SUB_DIRS); do \
echo `basename $$i`.o >> $$TOPDIR/modules/$(MOD_LIST_NAME); done
-else
- echo $(M_OBJS) > $$TOPDIR/modules/$(MOD_LIST_NAME)
-endif
+ for i in $(M_OBJS); do \
+ echo $$i >> $$TOPDIR/modules/$(MOD_LIST_NAME); done

endif
ifdef M_OBJS
echo $(PDWN)
cd $$TOPDIR/modules; for i in $(M_OBJS); do \
- ln -sf ../$(PDWN)/$$i .; done
+ ln -sf ../$(PDWN)$$i .; done
endif

#
--- fs/Makefile.old Sun Aug 20 12:00:47 1995
+++ fs/Makefile Mon Aug 21 01:04:40 1995
@@ -15,6 +15,8 @@
ioctl.o readdir.o select.o fifo.o locks.o filesystems.o \
dcache.o $(BINFMTS)

+M_OBJS :=
+MOD_SUB_DIRS :=
MOD_LIST_NAME := FS_MODULES
ALL_SUB_DIRS = minix ext ext2 msdos proc isofs nfs xiafs umsdos hpfs sysv smbfs


@@ -85,7 +87,7 @@
ifdef CONFIG_BINFMT_ELF
BINFMTS += binfmt_elf.o
else
-MOD_SUB_DIRS += binfmt_elf.o
+M_OBJS += binfmt_elf.o
endif

include $(TOPDIR)/Rules.make
---------8<------------8<---------

Last one... Does sound work as a module?? I've compiled it (as
module of course, had to compile and run sound/configure, and patch
drivers/Makefile) but when I try to insmod, It says "Initialization
of sound failed", and I get this in /var/adm/messages:


Aug 22 01:08:55 numenor kernel: sound: made modular by Peter Trattler (peter@sbox.tu-graz.ac.at)
Aug 22 01:08:55 numenor kernel: Couldn't get a free page.....

(sometimes only the first line...)

I tried compiling with only 4096 bytes of DMA, but no way...

Gonzalo