Przejdę od razu do tematu: na swoim ,,prywatnym'' serwerze zainstalowałem sobie Debiana Lenny (kilka dni temu z najnowszej płytki netinstall). Jako, że mam w nim kartę wifi (dlink dwl-520+), którą uruchamiałem wiele razy pod Linuksem, to od razu miałem przygotowane sterowniki i ndiswrappera z repozytorium (ndiswrapper-common i ndiswrapper-utils-1.9). Wszystko szło po mojej myśli, do czasu wpisania komendy:
Kod: Zaznacz cały
modprobe ndiswrapper
Kod: Zaznacz cały
FATAL: Module ndiswrapper not found.
Jednak serwer powinien być zabezpieczony, postanowiłem zainstalować jajko 2.6.27.29-4-grsec, które pobrałem z http://kernelsec.cr0.org/ i tu się zaczęły schody. Po wpisaniu
Kod: Zaznacz cały
modprobe ndiswrapper
Kod: Zaznacz cały
for templ in ; do \
cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27.29-4-grsec/g'` ; \
done
for templ in `ls debian/*.modules.in` ; do \
test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
sed -e 's/##KVERS##/2.6.27.29-4-grsec/g ;s/#KVERS#/2.6.27.29-4-grsec/g ; s/_KVERS_/2.6.27.29-4-grsec/g ; s/##KDREV##/1.0/g ; s/#KDREV#/1.0/g ; s/_KDREV_/1.0/g ' < $templ > ${templ%.modules.in}; \
done
dh_clean
/usr/bin/make clean KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec
make[1]: Entering directory `/usr/src/modules/ndiswrapper'
rm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order *~ .\#*
rm -f *_exports.h win2lin_stubs.h
rm -rf .tmp_versions
make[1]: Leaving directory `/usr/src/modules/ndiswrapper'
/usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules
make[1]: Entering directory `/usr/src/modules/ndiswrapper'
for templ in ; do \
cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27.29-4-grsec/g'` ; \
done
for templ in `ls debian/*.modules.in` ; do \
test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
sed -e 's/##KVERS##/2.6.27.29-4-grsec/g ;s/#KVERS#/2.6.27.29-4-grsec/g ; s/_KVERS_/2.6.27.29-4-grsec/g ; s/##KDREV##/1.0/g ; s/#KDREV#/1.0/g ; s/_KDREV_/1.0/g ' < $templ > ${templ%.modules.in}; \
done
dh_clean
/usr/bin/make clean KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec
make[2]: Entering directory `/usr/src/modules/ndiswrapper'
rm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order *~ .\#*
rm -f *_exports.h win2lin_stubs.h
rm -rf .tmp_versions
make[2]: Leaving directory `/usr/src/modules/ndiswrapper'
make[1]: Nothing to be done for `kdist_config'.
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs lib/modules/2.6.27.29-4-grsec/misc
# build and install the module
/usr/bin/make -C /usr/src/modules/ndiswrapper install KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec \
DIST_DESTDIR=debian/ndiswrapper-modules-2.6.27.29-4-grsec/
make[2]: Entering directory `/usr/src/modules/ndiswrapper'
/usr/bin/make -C /usr/src/linux-headers-2.6.27.29-4-grsec M=/usr/src/modules/ndiswrapper
make[3]: Entering directory `/usr/src/linux-headers-2.6.27.29-4-grsec'
/usr/src/linux-headers-2.6.27.29-4-grsec/arch/x86/Makefile:41: /usr/src/linux-headers-2.6.27.29-4-grsec/arch/x86/Makefile_32.cpu: No such file or directory
make[3]: *** No rule to make target `/usr/src/linux-headers-2.6.27.29-4-grsec/arch/x86/Makefile_32.cpu'. Stop.
make[3]: Leaving directory `/usr/src/linux-headers-2.6.27.29-4-grsec'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/modules/ndiswrapper'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/ndiswrapper'
make: *** [kdist_build] Error 2
Kod: Zaznacz cały
for templ in ; do \
cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27.29-4-grsec/g'` ; \
done
for templ in `ls debian/*.modules.in` ; do \
test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
sed -e 's/##KVERS##/2.6.27.29-4-grsec/g ;s/#KVERS#/2.6.27.29-4-grsec/g ; s/_KVERS_/2.6.27.29-4-grsec/g ; s/##KDREV##/1.0/g ; s/#KDREV#/1.0/g ; s/_KDREV_/1.0/g ' < $templ > ${templ%.modules.in}; \
done
dh_clean
/usr/bin/make clean KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec
make[1]: Entering directory `/usr/src/modules/ndiswrapper'
rm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order *~ .\#*
rm -f *_exports.h win2lin_stubs.h
rm -rf .tmp_versions
make[1]: Leaving directory `/usr/src/modules/ndiswrapper'
/usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules
make[1]: Entering directory `/usr/src/modules/ndiswrapper'
for templ in ; do \
cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27.29-4-grsec/g'` ; \
done
for templ in `ls debian/*.modules.in` ; do \
test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
sed -e 's/##KVERS##/2.6.27.29-4-grsec/g ;s/#KVERS#/2.6.27.29-4-grsec/g ; s/_KVERS_/2.6.27.29-4-grsec/g ; s/##KDREV##/1.0/g ; s/#KDREV#/1.0/g ; s/_KDREV_/1.0/g ' < $templ > ${templ%.modules.in}; \
done
dh_clean
/usr/bin/make clean KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec
make[2]: Entering directory `/usr/src/modules/ndiswrapper'
rm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order *~ .\#*
rm -f *_exports.h win2lin_stubs.h
rm -rf .tmp_versions
make[2]: Leaving directory `/usr/src/modules/ndiswrapper'
make[1]: Nothing to be done for `kdist_config'.
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs lib/modules/2.6.27.29-4-grsec/misc
# build and install the module
/usr/bin/make -C /usr/src/modules/ndiswrapper install KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec \
DIST_DESTDIR=debian/ndiswrapper-modules-2.6.27.29-4-grsec/
make[2]: Entering directory `/usr/src/modules/ndiswrapper'
/usr/bin/make -C /usr/src/linux-headers-2.6.27.29-4-grsec M=/usr/src/modules/ndiswrapper
make[3]: Entering directory `/usr/src/linux-headers-2.6.27.29-4-grsec'
LD /usr/src/modules/ndiswrapper/built-in.o
MKEXPORT /usr/src/modules/ndiswrapper/crt_exports.h
CC [M] /usr/src/modules/ndiswrapper/crt.o
In file included from include/linux/posix_types.h:47,
from include/linux/types.h:11,
from /usr/src/modules/ndiswrapper/ntoskernel.h:19,
from /usr/src/modules/ndiswrapper/crt.c:16:
/usr/lib/gcc/i486-linux-gnu/4.2.4/include/asm/posix_types.h:13:22: error: features.h: No such file or directory
/usr/lib/gcc/i486-linux-gnu/4.2.4/include/asm/posix_types.h:14:35: error: no include path in which to search for asm/posix_types.h
In file included from /usr/src/modules/ndiswrapper/ntoskernel.h:19,
from /usr/src/modules/ndiswrapper/crt.c:16:
include/linux/types.h:12:23: error: asm/types.h: No such file or directory
In file included from /usr/src/modules/ndiswrapper/ntoskernel.h:19,
from /usr/src/modules/ndiswrapper/crt.c:16:
include/linux/types.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__kernel_dev_t’
include/linux/types.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dev_t’
include/linux/types.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ino_t’
[ w tym miejscu jest bardzo dlugi log, w stylu jak powyzsze 3 linijki ]
make[4]: *** [/usr/src/modules/ndiswrapper/crt.o] Error 1
make[3]: *** [_module_/usr/src/modules/ndiswrapper] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-2.6.27.29-4-grsec'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/modules/ndiswrapper'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/ndiswrapper'
make: *** [kdist_build] Error 2
Edycja:
Przed chwilą zrobiłem:
Kod: Zaznacz cały
ln -s /usr/src/linux-headers-2.6.27.29-4-grsec/include/asm-x86 /usr/src/linux-headers-2.6.27.29-4-grsec/include/asm
Kod: Zaznacz cały
for templ in ; do \
cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27.29-4-grsec/g'` ; \
done
for templ in `ls debian/*.modules.in` ; do \
test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
sed -e 's/##KVERS##/2.6.27.29-4-grsec/g ;s/#KVERS#/2.6.27.29-4-grsec/g ; s/_KVERS_/2.6.27.29-4-grsec/g ; s/##KDREV##/1.0/g ; s/#KDREV#/1.0/g ; s/_KDREV_/1.0/g ' < $templ > ${templ%.modules.in}; \
done
dh_clean
/usr/bin/make clean KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec
make[1]: Entering directory `/usr/src/modules/ndiswrapper'
rm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order *~ .\#*
rm -f *_exports.h win2lin_stubs.h
rm -rf .tmp_versions
make[1]: Leaving directory `/usr/src/modules/ndiswrapper'
/usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules
make[1]: Entering directory `/usr/src/modules/ndiswrapper'
for templ in ; do \
cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27.29-4-grsec/g'` ; \
done
for templ in `ls debian/*.modules.in` ; do \
test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
sed -e 's/##KVERS##/2.6.27.29-4-grsec/g ;s/#KVERS#/2.6.27.29-4-grsec/g ; s/_KVERS_/2.6.27.29-4-grsec/g ; s/##KDREV##/1.0/g ; s/#KDREV#/1.0/g ; s/_KDREV_/1.0/g ' < $templ > ${templ%.modules.in}; \
done
dh_clean
/usr/bin/make clean KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec
make[2]: Entering directory `/usr/src/modules/ndiswrapper'
rm -f *.o *.ko .*.cmd *.mod.c *.symvers modules.order *~ .\#*
rm -f *_exports.h win2lin_stubs.h
rm -rf .tmp_versions
make[2]: Leaving directory `/usr/src/modules/ndiswrapper'
make[1]: Nothing to be done for `kdist_config'.
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs lib/modules/2.6.27.29-4-grsec/misc
# build and install the module
/usr/bin/make -C /usr/src/modules/ndiswrapper install KBUILD=/usr/src/linux-headers-2.6.27.29-4-grsec KVERS=2.6.27.29-4-grsec \
DIST_DESTDIR=debian/ndiswrapper-modules-2.6.27.29-4-grsec/
make[2]: Entering directory `/usr/src/modules/ndiswrapper'
/usr/bin/make -C /usr/src/linux-headers-2.6.27.29-4-grsec M=/usr/src/modules/ndiswrapper
make[3]: Entering directory `/usr/src/linux-headers-2.6.27.29-4-grsec'
LD /usr/src/modules/ndiswrapper/built-in.o
MKEXPORT /usr/src/modules/ndiswrapper/crt_exports.h
CC [M] /usr/src/modules/ndiswrapper/crt.o
MKEXPORT /usr/src/modules/ndiswrapper/hal_exports.h
CC [M] /usr/src/modules/ndiswrapper/hal.o
CC [M] /usr/src/modules/ndiswrapper/iw_ndis.o
/usr/src/modules/ndiswrapper/iw_ndis.c: In function ‘ndis_translate_scan’:
/usr/src/modules/ndiswrapper/iw_ndis.c:1031: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1031: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1031: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/modules/ndiswrapper/iw_ndis.c:1031: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/modules/ndiswrapper/iw_ndis.c:1041: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1041: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1041: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1041: error: too few arguments to function ‘iwe_stream_add_point’
/usr/src/modules/ndiswrapper/iw_ndis.c:1047: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1047: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1047: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/modules/ndiswrapper/iw_ndis.c:1047: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/modules/ndiswrapper/iw_ndis.c:1058: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1058: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1058: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/modules/ndiswrapper/iw_ndis.c:1058: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/modules/ndiswrapper/iw_ndis.c:1073: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1073: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1073: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/modules/ndiswrapper/iw_ndis.c:1073: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/modules/ndiswrapper/iw_ndis.c:1087: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1087: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1087: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
/usr/src/modules/ndiswrapper/iw_ndis.c:1087: error: too few arguments to function ‘iwe_stream_add_event’
/usr/src/modules/ndiswrapper/iw_ndis.c:1098: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1098: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1098: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1098: error: too few arguments to function ‘iwe_stream_add_point’
/usr/src/modules/ndiswrapper/iw_ndis.c:1114: warning: passing argument 1 of ‘iwe_stream_add_value’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1114: warning: passing argument 4 of ‘iwe_stream_add_value’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1114: warning: passing argument 5 of ‘iwe_stream_add_value’ makes pointer from integer without a cast
/usr/src/modules/ndiswrapper/iw_ndis.c:1114: error: too few arguments to function ‘iwe_stream_add_value’
/usr/src/modules/ndiswrapper/iw_ndis.c:1125: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1125: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1125: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1125: error: too few arguments to function ‘iwe_stream_add_point’
/usr/src/modules/ndiswrapper/iw_ndis.c:1131: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1131: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1131: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1131: error: too few arguments to function ‘iwe_stream_add_point’
/usr/src/modules/ndiswrapper/iw_ndis.c:1153: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1153: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1153: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
/usr/src/modules/ndiswrapper/iw_ndis.c:1153: error: too few arguments to function ‘iwe_stream_add_point’
make[4]: *** [/usr/src/modules/ndiswrapper/iw_ndis.o] Error 1
make[3]: *** [_module_/usr/src/modules/ndiswrapper] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-2.6.27.29-4-grsec'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/modules/ndiswrapper'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/ndiswrapper'
make: *** [kdist_build] Error 2
Jest dobrze panie i panowie, udało mi się. Tutaj łatka dla pliku iw_ndis.c dla jądra 2.6.27: http://connie.slackware.com/~alien/slac ... 6.27.patch
Temat zamknięty, myślę, że można zostawić dla potomności. Pozdrawiam.