NDIS или WiFi

На доскональное знание данной темы, не может претендовать, пожалуй ни один спец, из ныне живущих на земле. ;-)
Так поможем друг другу.

Модераторы: Trinity admin`s, Free-lance moderator`s

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

NDIS или WiFi

Сообщение sypper-pit » 10 фев 2005, 12:18

Народ помоги  мне если кто сталкивался с проблемой такой кк у меня и решил её то посоветуйте ....

имеется freeBSD 5.3 вроди кк есть поддержка DWL-g520 в ядре (вроди кк есть) и название этому  ath (читать #man 4 ath) там пишут что мол опредилится без проблем на  , однако калякаем #ifconfig - нету ath


теперь проблема в следуюшем есть там так называемый NDIS (#ndiscvt)   конвертим согласно правилам (под root)

#ndiscvt - i /каталог_где_winDriver/driver.inf -s driver.sys -o скомпиленый_и_переделаный.h(рекомендуют ndis_driver_data.h)

где -i и -s означают (i)-(ini), (s)-(sys)

а вот дальше танци с бубном и полное шаманство ....
они вроди кк  пишут скопировать это в папку с ndis'om

находим (# whereis  ndiscvt) и копируем туда ndis_driver_data.h

а дальше пишут компиляй ..... и тут бубен .... нету make
а в man'e пишут мол надо мэйкать ....

и после запускать      #kldload ndis
                                #kldload if_ndis
кто решил это помогите мне ...




votuanr
Advanced member
Сообщения: 176
Зарегистрирован: 11 янв 2005, 17:15
Откуда: MSK
Контактная информация:

Сообщение votuanr » 10 фев 2005, 12:28

ну если нету make, то очевидно его надо доставить из портов, ну и gcc  ним тоже чтоб был...

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 10 фев 2005, 12:37

всё есть ..... и gcc установленна

votuanr
Advanced member
Сообщения: 176
Зарегистрирован: 11 янв 2005, 17:15
Откуда: MSK
Контактная информация:

Re: NDIS или WiFi

Сообщение votuanr » 10 фев 2005, 12:39

sypper-pit писал(а):
а дальше пишут компиляй ..... и тут бубен .... нету make
а в man'e пишут мол надо мэйкать ....

лог, в студию!

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 10 фев 2005, 13:31

# make install clean
install -s -o root -g wheel -m 555   ndiscvt /usr/sbin
install -o root -g wheel -m 444 ndiscvt.8.gz  /usr/share/man/man8
rm -f y.output ndiscvt ndiscvt.o subr_pe.o inf.o inf-token.o inf-parse.o ndiscvt.8.gz ndiscvt.8.cat.gz inf-token.c inf-parse.c y.tab.c y.tab.h
#

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 10 фев 2005, 13:47

качьнуть можно log на ftp://cs.buryatia.ru/pub/log/

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 10 фев 2005, 13:56

это Make

Warning: Object directory not changed from original /usr/src/usr.sbin/ndiscvt
yacc -d -v inf-parse.y
cp y.tab.c inf-parse.c
cc -O -pipe  -I. -I/usr/src/usr.sbin/ndiscvt -I/usr/src/usr.sbin/ndiscvt/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized -c ndiscvt.c
cc -O -pipe  -I. -I/usr/src/usr.sbin/ndiscvt -I/usr/src/usr.sbin/ndiscvt/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized -c /usr/src/usr.sbin/ndiscvt/../../sys/compat/ndis/subr_pe.c
cc -O -pipe  -I. -I/usr/src/usr.sbin/ndiscvt -I/usr/src/usr.sbin/ndiscvt/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized -c inf.c
lex -t  inf-token.l > inf-token.c
cc -O -pipe  -I. -I/usr/src/usr.sbin/ndiscvt -I/usr/src/usr.sbin/ndiscvt/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized -c inf-token.c
cc -O -pipe  -I. -I/usr/src/usr.sbin/ndiscvt -I/usr/src/usr.sbin/ndiscvt/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized -c inf-parse.c
cc -O -pipe  -I. -I/usr/src/usr.sbin/ndiscvt -I/usr/src/usr.sbin/ndiscvt/../../sys -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized  -o ndiscvt ndiscvt.o subr_pe.o inf.o inf-token.o inf-parse.o -ll
gzip -cn ndiscvt.8 > ndiscvt.8.gz

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 10 фев 2005, 14:00

make install

install -s -o root -g wheel -m 555   ndiscvt /usr/sbin
install -o root -g wheel -m 444 ndiscvt.8.gz  /usr/share/man/man8

votuanr
Advanced member
Сообщения: 176
Зарегистрирован: 11 янв 2005, 17:15
Откуда: MSK
Контактная информация:

Сообщение votuanr » 10 фев 2005, 14:03

хде errorы-то, хде?

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 11 фев 2005, 04:49

вот и я думаю где ?, а не пашет ....

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 11 фев 2005, 05:22

вот кк я компиляю ...

# ndiscvt -s GPLUS.sys -i GPLUS.inf -o ndis_driver_data.h -O ndis_driver_data.o -f dwl_g520 -n dwl
objcopy -I binary -O elf32-i386-freebsd -B i386 /tmp/ndiscvt.xIefMZ ndis_driver_data.o
objcopy --redefine-sym _binary__tmp_ndiscvt_xIefMZ_start=GPLUS_sys_drv_data_start --strip-symbol _binary__tmp_ndiscvt_xIefMZ_size --redefine-sym _binary__tmp_ndiscvt_xIefMZ_end=GPLUS_sys_drv_data_end ndis_driver_data.o ndis_driver_data.o

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 11 фев 2005, 05:26

где Man говорит
# man ndiscvt
Formatting page, please wait...Done.
NDISCVT(8)              FreeBSD System Manager's Manual             NDISCVT(8)

NAME
    ndiscvt -- convert Windows(R) NDIS drivers for use with FreeBSD

SYNOPSIS
    ndiscvt [-O] [-i inffile] -s sysfile [-n devname] [-o outfile]
    ndiscvt [-f firmfile]

DESCRIPTION
    The ndiscvt utility transforms a Windows(R) NDIS driver into a data file
    which is used to build an ndis(4) compatibility driver module.
    Windows(R) drivers consist of two main parts: a .SYS file, which contains
    the actual driver executable code, and an .INF file, which provides the
    Windows(R) installer with device identifier information and a list of
    driver-specific registry keys.  The ndiscvt utility can convert these
    files into a header file that is compiled into if_ndis.c to create an
    object code module that can be linked into the FreeBSD kernel.

    The .INF file is typically required since only it contains device identi-
    fication data such as PCI vendor and device IDs or PCMCIA indentifier
    strings.  The .INF file may be optionally omitted however, in which case
    the ndiscvt utility will only perform the conversion of the .SYS file.
    This is useful for debugging purposes only.

OPTIONS
    The options are as follows:

    -i inffile
            Open and parse the specified .INF file when performing conver-
            sion.  The ndiscvt utility will parse this file and emit a device
            identification structure and registry key configuration struc-
            tures which will be used by the ndis(4) driver and ndisapi(9)
            kernel subsystem.  If this is omitted, ndiscvt will emit a dummy
            configuration structure only.

    -s sysfile
            Open and parse the specified .SYS file.  This file must contain a
            Windows(R) driver image.  The ndiscvt utility will perform some
            manipulation of the sections within the executable file to make
            runtime linking within the kernel a little easier and then con-
            vert the image into a data array.
    -n devname
            Specify an alternate name for the network device/interface which
            will be created when the driver is instantiated.  If you need to
            load more than one NDIS driver into your system (i.e., if you
            have two different network cards in your system which require
            NDIS driver support), each module you create must have a unique
            name.  Device can not be larger than IFNAMSIZ.  If no name is
            specified, the driver will use the default a default name
            (``ndis'').

    -o outfile
            Specify the output file in which to place the resulting data.
            This can be any file pathname.  If outfile is a single dash
            (`-'), the data will be written to the standard output.  The
            if_ndis.c module expects to find the driver data in a file called
            ndis_driver_data.h, so it is recommended that this name be used.

    -O      Generate both an ndis_driver_data.h file and an
            ndis_driver.data.o file. The latter file will contain a copy of
            the Windows(R) .SYS driver image encoded as a FreeBSD ELF object
            file (created with objcopy(1)).  Turning the Windows(R) driver
            image directly into an object code file saves disk space and com-
            pilation time.

    -f firmfile
            A few NDIS drivers come with additional files that the core
            driver module will load during initialization time. Typically,
            these files contain firmware which the driver will transfer to
            the device in order to make it fully operational. In Windows(R),
            these files are usually just copied into one of the system direc-
            tories along with the driver itself.

            In FreeBSD there are two mechanism for loading these files. If
            the driver is built as a loadable kernel module which is loaded
            after the kernel has finished booting (and after the root
            filesystem has been mounted), the extra files can simply be
            copied to the /compat/ndis directory, and they will be loaded
            into the kernel on demand when the the driver needs them.

            If however the driver is required to bootstrap the system (i.e.
            if the NDIS-based network interface is to be used for
            diskless/PXE booting), the files need to be pre-loaded by the
            bootstrap loader in order to be accessible, since the driver will
            need them before the root filesystem has been mounted. However,
            the bootstrap loader is only able to load files that are shared
            FreeBSD binary objects.
            The -f flag can be used to convert an arbitrary file firmfile
            into shared object format (the actual conversion is done using
            the objcopy(1) and ld(1) commands).  The resulting files can then
            be copied to the /boot/kernel directory, and can be pre-loaded
            directly from the boot loader prompt, or automatically by editing
            the loader.conf(5) file. If desired, the files can also be loaded
            into memory at runtime using the kldload(8) command.

            When an NDIS driver tries to open an external file, the
            ndisapi(9) code will first search for a loaded kernel module that
            matches the name specified in the open request, and if that
            fails, it will then try to open the file from the /compat/ndis
            directory as well. Note that during kernel bootstrap, the ability
            to open files from /compat/ndis is disabled: only the module
            search will be performed.

            When using the -f flag, ndiscvt will generate both a relocatable
            object file (with a .o extension) and a shared object file (with
            a .ko extension) the /boot/kernel directory. The relocatable
            object file is useful if the user wishes to create a completely
            static kernel image: the object file can be linked into the ker-
            nel directly along with the driver itself. Some editing of the
            kernel configuration files will be necessary in order to have the
            extra object included in the build.

SEE ALSO
    kldload(8), ld(1), ndis(4), ndisapi(9), objcopy(1)

HISTORY
    The ndiscvt utility first appeared in FreeBSD 5.3.

AUTHORS
    The ndiscvt utility was written by Bill Paul <wpaul@windriver.com>.  The
    lex(1) and yacc(1) INF file parser was written by Matthew Dodd
    <mdodd@FreeBSD.org>.

FreeBSD 5.3                    December 10, 2003                   FreeBSD 5.3

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 11 фев 2005, 05:58

я нашол решение ...  

Конфигурим wireless карточку на FreeBSD-5.3
[Добавлено: 09.11.2004 в 20:39:49] Цитировать
На статью это не тянет, но опытом поделиться хочется.

Стабильная ветка FreeBSD 5.3 включает в себя драйвер ndis, позволяюший использовать бинарные драйвера для Виндозных wireless карточек под FreeBSD.

Чтобы использовать этот драйвер, необходимо:

1. Скомпилировать драйвер NDIS. Для этого идем в /sys/modules/ndis и прогоняем make и make install.  

cd /sys/modules/ndis
make
make install

2. Копируем бинарные драйвера для нашей карточки в директорию /sys/modules/if_ndis Бинарные драйвера можно найти на CD, который поставлялся с карточкой или с сайта производителя. Нам нужны два файла: один с расширением .sys, другой с расширением .inf Они содержат соответственно бинарный код драйвера и ключи реестра для драйвера. В моем случае, эти файлы назывались bcmwl5.sys и lsbcmnds.inf

cd /sys/modules/if_ndis
cp /<path_to_files>/<infofile>.inf .
cp /<path_to_files>/<sysfile>.sys .

3. Собираем хедер для нашего модуля из скопированных файлов, используя утилиту ndiscvt

ndiscvt -i infofile.inf -s sysfile.sys -o ndis_driver_data.h

4. Компилируем драйвер для нашей карточки:

make
make install

5. Грузим модули:

kldload ndis
kldload if_ndis

6. Кофигурируем устройство ndis0 как обычный сетевой интерфейс. Команда ifconfig во FreeBSD позволяет установить опции, специфические для wireless интерфейсов (man ifconfig) Например,

ifconfig ndis0 inet 192.168.1.203 ssid Linksys channel 11 up

или, просто

dhclient ndis0  

Все. А вообще, FreeBSD 5.3 мне исключительно нравится. Тем, кто пробовал FreeBSD, но она ему не понравилась, очень советую попробовать еще раз.

Good Luck,  
UT

http://www.nixp.ru/cgi-bin/forum/YaBB.p ... 1100021989

votuanr
Advanced member
Сообщения: 176
Зарегистрирован: 11 янв 2005, 17:15
Откуда: MSK
Контактная информация:

Сообщение votuanr » 11 фев 2005, 15:27

tnx, возьму на заметку

Аватара пользователя
sypper-pit
Junior member
Сообщения: 12
Зарегистрирован: 10 фев 2005, 10:42
Контактная информация:

Сообщение sypper-pit » 14 фев 2005, 10:21

однако теперь другая проблемма

не может найти *.bin от драйвера .....
что делать

Ответить

Вернуться в «Серверы - ПО, Unix подобные системы»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 16 гостей