eDog ha scritto:Ecco qui le istruzioni per compilarli e installarli (alla configurazione ci pensiamo dopo)
- Codice: Seleziona tutto
- Build Instructions:  
 ====================
 
 1> $tar -xvzf DPB_RT2870_Linux_STA_x.x.x.x.tgz
 go to "./DPB_RT2870_Linux_STA_x.x.x.x" directory.
 
 2> In Makefile
 set the "MODE = STA" in Makefile and chose the TARGET to Linux by set "TARGET = LINUX"
 define the linux kernel source include file path LINUX_SRC
 modify to meet your need.
 
 3> In os/linux/config.mk
 define the GCC and LD of the target machine
 define the compiler flags CFLAGS
 modify to meet your need.
 ** Build for being controlled by NetworkManager or wpa_supplicant wext functions
 Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
 => #>cd wpa_supplicant-x.x
 => #>./wpa_supplicant -Dwext -ira0 -c wpa_supplicant.conf -d
 ** Build for being controlled by WpaSupplicant with Ralink Driver
 Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n'.
 => #>cd wpa_supplicant-0.5.7
 => #>./wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d
 
 4> $make
 # compile driver source code
 # To fix "error: too few arguments to function ¡¥iwe_stream_add_event"
 => $patch -i os/linux/sta_ioctl.c.patch os/linux/sta_ioctl.c
 
 5> $cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat
 
 6> load driver, go to "os/linux/" directory.
 #[kernel 2.4]
 #    $/sbin/insmod rt2870sta.o
 #    $/sbin/ifconfig ra0 inet YOUR_IP up
 
 #[kernel 2.6]
 #    $/sbin/insmod rt2870sta.ko
 #    $/sbin/ifconfig ra0 inet YOUR_IP up
 
 7> unload driver
 $/sbin/ifconfig ra0 down
 $/sbin/rmmod rt2870sta
 
Un passo alla volta:
- Codice: Seleziona tutto
- 1> $tar -xvzf DPB_RT2870_Linux_STA_x.x.x.x.tgz
 go to "./DPB_RT2870_Linux_STA_x.x.x.x" directory.
Scompatta l'archivio e poi da terminale raggiungi la cartella scompattata.
- Codice: Seleziona tutto
- 2> In Makefile
 set the "MODE = STA" in Makefile and chose the TARGET to Linux by set "TARGET = LINUX"
 define the linux kernel source include file path LINUX_SRC
 modify to meet your need.
Ho controllato il makefile, è già tutto ok. Quindi, puoi saltare questo passaggio. In sostanza ti diceva di specificare che sei su linux e non su altri SO.
- Codice: Seleziona tutto
- 3> In os/linux/config.mk 
 define the GCC and LD of the target machine
 define the compiler flags CFLAGS
 modify to meet your need.
 ** Build for being controlled by NetworkManager or wpa_supplicant wext functions
 Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
 => #>cd wpa_supplicant-x.x
 => #>./wpa_supplicant -Dwext -ira0 -c wpa_supplicant.conf -d
 ** Build for being controlled by WpaSupplicant with Ralink Driver
 Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n'.
 => #>cd wpa_supplicant-0.5.7
 => #>./wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d
Uhm.. dopo una googlata ho le idee più confuse di prima..
In sostanza, apri il file che si trova in cartella_scompattata/os/linux/config.mk
cerca le stringhe "HAS_WPA_SUPPLICANT=n" e "HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n" e cambia "=n" con "=y" (magari fai un preghierina  
![Fragorosa risata [:D]](http://www.megalab.it/forum/images/smilies/fragorosa_risata.gif)
 )
- Codice: Seleziona tutto
- 4> $make
 # compile driver source code
 # To fix "error: too few arguments to function ¡¥iwe_stream_add_event"
 => $patch -i os/linux/sta_ioctl.c.patch os/linux/sta_ioctl.c
assicurandoti di essere nella cartella scompattata e non in sottocartelle, dai un semplice comando "make" da terminale. Dovrebbe compilare tutto l'ambaradan.
- Codice: Seleziona tutto
- 5> $cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat
Dai da terminale, "cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat".
- Codice: Seleziona tutto
-     #[kernel 2.6]
 #    $/sbin/insmod rt2870sta.ko
 #    $/sbin/ifconfig ra0 inet YOUR_IP up
Sempre da terminale (assicurati di essere root prima):
/sbin/insmod rt2870sta.ko 
e poi 
/sbin/ifconfig ra0 inet UN_IP_DA_ASSEGNARE up
se quest'ultimo comando non va, prova con
/sbin/ifconfig ra0 UN_IP_DA_ASSEGNARE up
Speremo.. 
![Rolleyes [rolleyes]](http://www.megalab.it/forum/images/smilies/rolleyes.gif)