Date: Mon, 27 Mar 2000 17:30:29 -0500 (EST) From: "Eric D. Futch" <efutch@nyct.net> To: freebsd-hackers@freebsd.org Subject: gif and faith as kld... Message-ID: <Pine.BSF.4.05.10003271711280.24832-500000@bsd1.nyct.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] This all started with wanting to play with IPv6 without rebooting. I forgot to add the gif and faith pseudo-device lines in my kernel config last time I was playing in it. I noticed that gif and faith interfaces don't exist as modules. After playing around with trying to make faith and gif (for IPv6) into modules, I managed to get a working if_faith.ko, which seems to work ok so far (i.e. didn't panic :)). I'm using an almost identical Makefile to create the if_gif.ko module, however, when I try to load it I get: # kldload /modules/if_gif.ko kldload: can't load /modules/if_gif.ko: Exec format error # kldstat Id Refs Address Size Name 1 4 0xc0100000 2c213c kernel 2 1 0xc14be000 4000 logo_saver.ko 21 1 0xc16f3000 2000 if_disc.ko 23 1 0xc16f0000 2000 if_faith.ko <--- :) Feel free to slap me around or pass the pointy hat where applicable. I have attached the Makefile and the make output from both modules. -- Eric Futch New York Connect.Net, Ltd. efutch@nyct.net Technical Support Staff http://www.nyct.net (212) 293-2620 "Bringing New York The Internet Access It Deserves" [-- Attachment #2 --] Warning: Object directory not changed from original /usr/src/sys/modules/if_gif @ -> /usr/src/sys machine -> /usr/src/sys/i386/include echo "#define INET 1" > opt_inet.h echo "#define INET6 1" > opt_inet6.h echo "#define NGIF 1" > gif.h cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -c /usr/src/sys/modules/if_gif/../../net/if_gif.c gensetdefs if_gif.o cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -c setdef0.c cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -c setdef1.c ld -Bshareable -o if_gif.ko setdef0.o if_gif.o setdef1.o [-- Attachment #3 --] Warning: Object directory not changed from original /usr/src/sys/modules/if_faith @ -> /usr/src/sys machine -> /usr/src/sys/i386/include echo "#define INET 1" > opt_inet.h echo "#define INET6 1" > opt_inet6.h echo "#define NFAITH 1" > faith.h cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -c /usr/src/sys/modules/if_faith/../../net/if_faith.c gensetdefs if_faith.o cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -c setdef0.c cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/../include -I/usr/include -mpreferred-stack-boundary=2 -c setdef1.c ld -Bshareable -o if_faith.ko setdef0.o if_faith.o setdef1.o [-- Attachment #4 --] # $FreeBSD$ .PATH: ${.CURDIR}/../../net KMOD= if_gif SRCS= if_gif.c opt_inet.h opt_inet6.h gif.h NOMAN= NGIF?= 1 CFLAGS+= ${PROTOS} opt_inet.h: echo "#define INET 1" > opt_inet.h opt_inet6.h: echo "#define INET6 1" > opt_inet6.h gif.h: echo "#define NGIF ${NGIF}" > gif.h .include <bsd.kmod.mk> [-- Attachment #5 --] # $FreeBSD$ .PATH: ${.CURDIR}/../../net KMOD= if_faith SRCS= if_faith.c opt_inet.h opt_inet6.h faith.h NOMAN= NFAITH?= 1 CFLAGS+= ${PROTOS} opt_inet.h: echo "#define INET 1" > opt_inet.h opt_inet6.h: echo "#define INET6 1" > opt_inet6.h faith.h: echo "#define NFAITH ${NFAITH}" > faith.h .include <bsd.kmod.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.10003271711280.24832-500000>
