Rechercher : dans
Par :

Installer driver propriétaire ralink sur ubun

Dernière réponse le 24 fév 2009 à 09:29:52 renisaac, le 5 avr 2008 à 20:18:08 
 Signaler ce message aux modérateurs

Bonjour,

Je viens d'installer ubutnu 8.04 beta sur mon nouveau desktop, et contrairement a ce que j'espérai ma carte wifi n'est pas directement reconnue.

Il s'agit du chipset Ralink RT2870, et ralink propose un driver sur son site. très bien! sauf que je ne suis pas assez douer pour comprendre leur mode d'emplois.

D'ou question, quelqu'un connait-il un bon tuto que je n'aurai pas trouvé? Ou alors un(e) surdoué(e) peut-il m'aider, genre jipicy, mamiemando, kilian, lami20j, jeanbi ou autre?

là j'en suis à "In Makefile, set the MODE = STA", ok, "TARGET = Linux", ok aussi, mais ou je cale, c'est "define the linux kernel source include file path LINUX_SRC modify to meet your need" Il y a un peu trop de LINUX_SRC pour que je sache quel chemin mettre pour quoi.

extrait du makefile à modifier :

ifeq ($(PLATFORM),5VT)
LINUX_SRC = /opt/fvt_11N_SDK_0807/fvt131x_SDK_11n/linux-2.6.17
CROSS_COMPILE = /opt/crosstool/uClibc_v5te_le_gcc_4_1_1/bin/arm-linux-
endif

ifeq ($(PLATFORM),IKANOS)
LINUX_SRC = /home/sample/projects/LX_2618_RG_5_3_00r4_SRC/linux-2.6.18
CROSS_COMPILE = mips-linux-
endif

ifeq ($(PLATFORM),SIGMA)
LINUX_SRC = /root/sigma/smp86xx_kernel_source_2.7.172.0/linux-2.6.15
CROSS_COMPILE = /root/sigma/smp86xx_toolchain_2.7.172.0/build_mipsel_nofpu/staging_dir/bin/mipsel-linux-
endif

ifeq ($(PLATFORM),INIC)
UCOS_SRC = /opt/uCOS/iNIC_rt2880
CROSS_COMPILE = /usr/bin/mipsel-linux-
endif

ifeq ($(PLATFORM),STAR)
LINUX_SRC = /opt/star/kernel/linux-2.4.27-star
CROSS_COMPILE = /opt/star/tools/arm-linux/bin/arm-linux-
endif

ifeq ($(PLATFORM),PC)
# Linux 2.6
LINUX_SRC = /lib/modules/$(shell uname -r)/build
# Linux 2.4 Change to your local setting
#LINUX_SRC = /usr/src/linux-2.4
LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
CROSS_COMPILE =
endif

ifeq ($(PLATFORM),IXP)
LINUX_SRC = /project/stable/Gmtek/snapgear-uclibc/linux-2.6.x
CROSS_COMPILE = arm-linux-
endif

ifeq ($(PLATFORM),INF_TWINPASS)
# Linux 2.6
#LINUX_SRC = /lib/modules/$(shell uname -r)/build
# Linux 2.4 Change to your local setting
LINUX_SRC = /project/stable/twinpass/release/2.0.1/source/kernel/opensource/linux-2.4.31/
CROSS_COMPILE = mips-linux-
endif

Configuration: Windows XP
Firefox 2.0.0.13

Meilleures réponses pour « installer driver propriétaire ralink sur ubun » dans :
[Debian][HowTo] Xorg7 - installer drivers nvidia Voir Xorg7 - installer drivers nvidia Dans ce tutoriel nous allons aborder comment installer les drivers nvidia sous debian. Tout ce qui dit est valable pour d'autres distributions basées sur debian comme par exemple ubuntu. Toutefois pour cette...
Installer un pilote audio Conexant sur PC portable HP sous XP Voir Vous venez de remplacer Vista par XP sur votre PC portable HP/Compaq et vous n'arrivez pas à installer le pilote du chipset audio, vous n'avez donc plus de son. Vérifiez que le pilote recherché n'est pas disponible sur le site du constructeur. Si...
Windows 7: Installer un pilote non signé VoirWindows Seven bloque par défaut les pilotes non signés, ce qui empêche l’installation de ces pilotes, rendant impossible le fonctionnement du périphérique concerné. Il faut temporairement désactiver la vérification de signature des...
Installer le pilote Twain pour un scanner Canon VoirProblème Comment installer le pilote Twain pour son scanner ? Solution Pour installer le pilote Twain : Il existe différentes manières d'installer le pilote Twain manuellement : Vérifiez que le scanner apparaît dans le "Gestionnaire de...
Realtek HDA : Error 0xE0000227 VoirCette erreur apparaît parfois à l'installation du pilote Realtek High Definition sous XP. Vous pouvez télécharger le pilote ici. Voici la solution : Ouvrir le gestionnaire de périphériques (Menu Démarrer > Panneau de configuration > Système >...
Pilote (Driver) VoirQu'est-ce qu'un driver? Un ordinateur est constitué d'un assemblage de périphériques. Pour pouvoir contrôler chacun de ses périphériques, le système d'exploitation a besoin d'une interface logicielle entre lui et le matériel, on appelle driver...

1

lami20j, le 5 avr 2008 à 20:37:40

Salut,

LINUX_SRC c'est une variable qui doit contenir le chemin des souces de ton kernel en fonction de la platforme que tu utilises

avec la commande

 uname -r
tu peux savoir quel kernel tu as
106485010510997108

Répondre à lami20j

2

lami20j, le 5 avr 2008 à 20:52:25

Ou alors un(e) surdoué(e) peut-il m'aider
P.S. Je suis loin d'être surdoué. Je suis tout simplement pasionné ;-))

106485010510997108

Répondre à lami20j

3

renisaac, le 5 avr 2008 à 21:01:01

Salut l'ami,
rhaaa, j'aurai pu le trouver moi-même!

Par contre, la ligne "CROSS_COMPILE = ", tu crois que je dois la commenter aussi ou pas?

bon, on va voir l'étape suivante

Renisaac

Répondre à renisaac

4

renisaac, le 5 avr 2008 à 21:25:51

Etape suivante je disais donc.

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
Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
** Build for being controlled by WpaSupplicant with Ralink Custom Event
Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n'.
command: #./wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d

donc je dois definir les chemin ver GCC et LD,

je mets qul gcc?

renisaac@renisaac-desktop:/usr/src$ sudo updatedb
renisaac@renisaac-desktop:/usr/src$ locate gcc
/lib/libgcc_s.so.1
/usr/bin/c89-gcc
/usr/bin/c99-gcc
/usr/bin/gcc
/usr/bin/gcc-4.2
/usr/bin/gccmakedep
/usr/bin/i486-linux-gnu-gcc
/usr/bin/i486-linux-gnu-gcc-4.2
/usr/lib/gcc
/usr/lib/libgccpp.so.1
/usr/lib/libgccpp.so.1.0.2
/usr/lib/gcc/i486-linux-gnu
/usr/lib/gcc/i486-linux-gnu/4.2

pour LD, c'est bien le /usr/bin/ld, pas le module en /lib/ld-2.7.so?

Il me demande aussi de choisir entre networkmanager et l'outil ralink, que vaut-il mieux?

pour le Cflag, les lignes actuelles sont celles-ci :

ifeq ($(PLATFORM),PC)
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
# Linux 2.4
CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)
export CFLAGS
else
# Linux 2.6
EXTRA_CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include
endif
endif

que dois-je y changer?
(pour info, wflags : WFLAGS := -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -DLINUX -Wall -Wstrict-prototypes -Wno-trigraphs)

et la question du cross_compile est tjr en suspent,

renisaac

PSsoit pas modeste comme ca, tu es doue, des le debut ou tu a aider sur ce forum, tu te distinguais

Répondre à renisaac

5

lami20j, le 5 avr 2008 à 21:41:33

Tu dois avoir une documentation pour l'installation
Donne le lien pour que je télécharge le drivers.
Merci 106485010510997108

Répondre à lami20j

6

lami20j, le 5 avr 2008 à 21:45:06

C'est bon je l'ai téléchargé
je vais jeter un coup d'oeil ;-) 106485010510997108

Répondre à lami20j

7

renisaac, le 5 avr 2008 à 21:47:30

La documentation, je n'ai trouver que celle fournie avec le driver, un peu trop laconique pour moi.

Le driver vient de la :

http://www.ralinktech.com/ralink/Home/Support/Linux.html

le driver RT2870 USB, fourni sous forme de tar, dont la docu. Si tu veux, je peux t'envoyer la docu seule sur ton adresse mail indiquée dans ton profil.

renisaac

Répondre à renisaac

8

lami20j, le 5 avr 2008 à 21:52:45

Affiche

ls -l /usr/bin/gcc
pour ld c'est le chemin de l'exécutable je suppose donc /usr/bin/ld 106485010510997108

Répondre à lami20j

9

lami20j, le 5 avr 2008 à 21:58:06

En fait CROSS_COMPILE doit contenir le chemin /usr/bin

CROSS_COMPILE=/usr/bin/

puisque dans config.mk tu as

 CC := $(CROSS_COMPILE)gcc
 LD := $(CROSS_COMPILE)ld

106485010510997108

Répondre à lami20j

10

renisaac, le 5 avr 2008 à 22:00:06

Renisaac@renisaac-desktop:~$ ls -l /usr/bin/gcc
lrwxrwxrwx 1 root root 7 2008-04-05 14:48 /usr/bin/gcc -> gcc-4.2
renisaac@renisaac-desktop:~$

donc ce que je chercher est /usr/bin/gcc-4.2

reste cross+compile, cflags et le manager a decider....

Répondre à renisaac

11

lami20j, le 5 avr 2008 à 22:03:42

En fait
tu n'as pas a te faire de souci pour gcc, le lien symbolique pointe vers ton gcc-4.d

regarde mon message 9 pour CROSS_COMPILE 106485010510997108

Répondre à lami20j

12

renisaac, le 5 avr 2008 à 22:10:24

Ok, vu comme ca cela parait logique, et donc en plus la docu n'est pas exact.

pour les flags, je connais le principe pour avoir tater un peu gentoo, mais je ne connais pas assez pour savoir si ceux propose peuvent convenir ou pas.

Pour l'outil de control, je n'ai aucune idee de ce que je dois utiliser.

ensuite, pour le make, etape 4, j'imagine que je dois etre dans le repertoire ou j'ai decompresser le driver?

renisaac

Répondre à renisaac

13

renisaac, le 5 avr 2008 à 22:11:31

J'ai vu pour cross_compile. les messages se croisent

Répondre à renisaac

14

lami20j, le 5 avr 2008 à 22:15:26

Pour faire make tu dois être dans le répertoire où se trouve le Makefile

Attends un peu, je regarde pour CFLAGS 106485010510997108

Répondre à lami20j

15

renisaac, le 5 avr 2008 à 22:18:48

Pour info, ma machine est un core 2 duo E4500, mais j'ai quand meme pris ubuntu 32 bits.

Répondre à renisaac

16

lami20j, le 5 avr 2008 à 22:24:12

Pas grave pour 32bits

en fait par défaut les options sont

ifeq ($(HAS_WPA_SUPPLICANT),y)
WFLAGS += -DWPA_SUPPLICANT_SUPPORT
endif

ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)
WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
endif
donc c'est le cas
        ** Build for being controlled by NetworkManager
           Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
on va laisser comme ça
je pense que tu peux essayer l'étape
make
et croiser les doigts bien sûr ;-)
106485010510997108

Répondre à lami20j

17

renisaac, le 5 avr 2008 à 22:33:54

Heu, dsl, j'ai fait une erreur impardonnable..... je n'ai pas bien croiser les doigts!

/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../sta/connect.c: In function ‘MakeIbssBeacon’:
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../sta/connect.c:2468: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../sta/connect.c:2468: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long unsigned int’
CC [M] /home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../sta/wpa.o
CC [M] /home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_linux.o
CC [M] /home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_profile.o
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_profile.c:223: warning: ‘rtinet_aton’ defined but not used
CC [M] /home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.o
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.c: In function ‘rt_ieee80211_if_setup’:
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.c:671: warning: assignment from incompatible pointer type
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.c:694: warning: passing argument 1 of ‘dev_get_by_name’ from incompatible pointer type
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.c:694: error: too few arguments to function ‘dev_get_by_name’
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.c: In function ‘rt28xx_probe’:
/home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.c:1157: error: implicit declaration of function ‘SET_MODULE_OWNER’
make[2]: *** /home/renisaac/compilationdriverralink/2007_1220_RT2870_Linu­x_STA_v1.2.1.0/os/linux/../../os/linux/rt_main_dev.o Error 1
make[1]: *** [_module_/home/renisaac/compilationdriverralink/2007_1220_RT­2870_Linux_STA_v1.2.1.0/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-15-generic'
make: *** [LINUX] Error 2
renisaac@renisaac-desktop:~/compilationdriverralink/2007_122­0_RT2870_Linux_STA_v1.2.1.0$

tu comprends mieux que moi?

Répondre à renisaac

18

lami20j, le 5 avr 2008 à 22:53:41

Affiche le Makefile et le fichier config.mk
106485010510997108

Répondre à lami20j

19

renisaac, le 5 avr 2008 à 22:57:36

make file :

#MODE STA or AP
RT28xx_MODE = STA
#RT28xx_MODE = AP
#TARTET = LINUX or UCOS
TARGET = LINUX
#CHIPSET = 2860 or 2870
#CHIPSET = 2860
CHIPSET = 2870
#RT28xx_DIR = home directory of RT28xx source code
RT28xx_DIR = $(shell pwd)
RTMP_SRC_DIR = $(RT28xx_DIR)/RT$(CHIPSET)
#PLATFORM = 5VT
PLATFORM = PC
#PLATFORM = IKANOS
#PLATFORM = SIGMA
#PLATFORM = INIC
#PLATFORM = STAR
#PLATFORM = IXP
#PLATFORM = INF_TWINPASS
RELEASE = DPA
#RELEASE = DPB
ifeq ($(PLATFORM),5VT)
LINUX_SRC = /opt/fvt_11N_SDK_0807/fvt131x_SDK_11n/linux-2.6.17
CROSS_COMPILE = /opt/crosstool/uClibc_v5te_le_gcc_4_1_1/bin/arm-linux-
endif

ifeq ($(PLATFORM),IKANOS)
LINUX_SRC = /home/sample/projects/LX_2618_RG_5_3_00r4_SRC/linux-2.6.18
CROSS_COMPILE = mips-linux-
endif

ifeq ($(PLATFORM),SIGMA)
LINUX_SRC = /root/sigma/smp86xx_kernel_source_2.7.172.0/linux-2.6.15
CROSS_COMPILE = /root/sigma/smp86xx_toolchain_2.7.172.0/build_mipsel_nofpu/s­taging_dir/bin/mipsel-linux-
endif

ifeq ($(PLATFORM),INIC)
UCOS_SRC = /opt/uCOS/iNIC_rt2880
CROSS_COMPILE = /usr/bin/mipsel-linux-
endif

ifeq ($(PLATFORM),STAR)
LINUX_SRC = /opt/star/kernel/linux-2.4.27-star
CROSS_COMPILE = /opt/star/tools/arm-linux/bin/arm-linux-
endif

ifeq ($(PLATFORM),PC)
# Linux 2.6
LINUX_SRC = /lib/modules/2.6.24-15-generic/build
# Linux 2.4 Change to your local setting
#LINUX_SRC = /usr/src/linux-2.4
LINUX_SRC_MODULE = /lib/modules/2.6.24-15-generic/kernel/drivers/net/wireless/
CROSS_COMPILE = /usr/bin/
endif

ifeq ($(PLATFORM),IXP)
LINUX_SRC = /project/stable/Gmtek/snapgear-uclibc/linux-2.6.x
CROSS_COMPILE = arm-linux-
endif

ifeq ($(PLATFORM),INF_TWINPASS)
# Linux 2.6
#LINUX_SRC = /lib/modules/$(shell uname -r)/build
# Linux 2.4 Change to your local setting
LINUX_SRC = /project/stable/twinpass/release/2.0.1/source/kernel/opensou­rce/linux-2.4.31/
CROSS_COMPILE = mips-linux-
endif


export RT28xx_DIR RT28xx_MODE LINUX_SRC CROSS_COMPILE PLATFORM RELEASE CHIPSET RTMP_SRC_DIR LINUX_SRC_MODULE

all: build_tools $(TARGET)

build_tools:
make -C tools
$(RT28xx_DIR)/tools/bin2h

UCOS:
make -C os/ucos/ MODE=$(RT28xx_MODE)
echo $(RT28xx_MODE)


LINUX:
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
make -C $(RT28xx_DIR)/os/linux/
ifeq ($(RT28xx_MODE),AP)
cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)ap.o /tftpboot
else
cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.o /tftpboot
endif
else
cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
make -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
ifeq ($(RT28xx_MODE),AP)
cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)ap.ko /tftpboot
else
cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.ko /tftpboot
endif
endif

release:
ifeq ($(TARGET), LINUX)
make -C $(RT28xx_DIR)/os/linux -f Makefile.release release
ifeq ($(RELEASE), DPA)
make -C $(RT28xx_DIR)/os/linux -f Makefile.DPA release
rm -rf build
endif
ifeq ($(RELEASE), DPB)
make -C $(RT28xx_DIR)/os/linux -f Makefile.DPB release
rm -rf build
endif
endif

prerelease:
make -C $(RT28xx_DIR)/os/linux -f Makefile.release prerelease
cp $(RT28xx_DIR)/os/linux/Makefile.DPB $(RTMP_SRC_DIR)/os/linux/.
cp $(RT28xx_DIR)/os/linux/Makefile.DPA $(RTMP_SRC_DIR)/os/linux/.

clean:
ifeq ($(TARGET), LINUX)
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
cp -f os/linux/Makefile.4 os/linux/Makefile
else
cp -f os/linux/Makefile.6 os/linux/Makefile
endif
make -C os/linux clean
rm -rf os/linux/Makefile
endif
ifeq ($(TARGET), UCOS)
make -C os/ucos clean MODE=$(RT28xx_MODE)
endif

uninstall:
ifeq ($(TARGET), LINUX)
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
make -C $(RT28xx_DIR)/os/linux -f Makefile.4 uninstall
else
make -C $(RT28xx_DIR)/os/linux -f Makefile.6 uninstall
endif
endif

install:
ifeq ($(TARGET), LINUX)
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
make -C $(RT28xx_DIR)/os/linux -f Makefile.4 install
else
make -C $(RT28xx_DIR)/os/linux -f Makefile.6 install
endif
endif

config.mk


# Support 28xx QA ATE function
HAS_28xx_QA=n

# Support LLTD function
HAS_LLTD=n

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y

# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

#Support Net interface block while Tx-Sw queue full
HAS_BLOCK_NET_IF=n

CC := $(CROSS_COMPILE)gcc
LD := $(CROSS_COMPILE)ld

WFLAGS := -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -DLINUX -Wall -Wstrict-prototypes -Wno-trigraphs

ifeq ($(RT28xx_MODE),STA)
WFLAGS += -DCONFIG_STA_SUPPORT -DDBG

ifeq ($(HAS_WPA_SUPPLICANT),y)
WFLAGS += -DWPA_SUPPLICANT_SUPPORT
endif

ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)
WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
endif

ifeq ($(HAS_ATE),y)
WFLAGS += -DRALINK_ATE
ifeq ($(HAS_28xx_QA),y)
WFLAGS += -DRALINK_28xx_QA
endif
endif

endif
# endif of ifeq ($(RT28xx_MODE),STA)

ifeq ($(CHIPSET),2860)
WFLAGS +=-DRT2860
endif

ifeq ($(CHIPSET),2870)
WFLAGS +=-DRT2870
endif

ifeq ($(PLATFORM),5VT)
#WFLAGS += -DCONFIG_5VT_ENHANCE
endif

ifeq ($(HAS_BLOCK_NET_IF),y)
WFLAGS += -DBLOCK_NET_IF
endif

ifeq ($(HAS_DFS_SUPPORT),y)
WFLAGS += -DDFS_SUPPORT
endif

ifeq ($(HAS_MC_SUPPORT),y)
WFLAGS += -DMULTIPLE_CARD_SUPPORT
endif

ifeq ($(HAS_LLTD),y)
WFLAGS += -DLLTD_SUPPORT
endif

ifeq ($(PLATFORM),IXP)
WFLAGS += -DBIG_ENDIAN
endif

ifeq ($(PLATFORM),IKANOS)
WFLAGS += -DBIG_ENDIAN -DIKANOS
endif

ifeq ($(PLATFORM),INF_TWINPASS)
WFLAGS += -DBIG_ENDIAN -DINF_TWINPASS
endif

#kernel build options for 2.4
# move to Makefile outside LINUX_SRC := /opt/star/kernel/linux-2.4.27-star

ifeq ($(PLATFORM),STAR)
CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mshort-load-bytes -msoft-float -Uarm -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)

export CFLAGS
endif

ifeq ($(PLATFORM),SIGMA)
CFLAGS := -D__KERNEL__ -I$(RT28xx_DIR)/include -I$(LINUX_SRC)/include -I$(LINUX_SRC)/include/asm/gcc -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -DEM86XX_CHIP=EM86XX_CHIPID_TANGO2 -DEM86XX_REVISION=6 -I$(LINUX_SRC)/include/asm-mips/mach-generic -I$(RT2860_DIR)/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -mabi=32 -march=mips32r2 -Wa,-32 -Wa,-march=mips32r2 -Wa,-mips32r2 -Wa,--trap -DMODULE $(WFLAGS)

export CFLAGS
endif

ifeq ($(PLATFORM),5VT)
CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm926ej-s --param max-inline-insns-single=40000 -Uarm -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE $(WFLAGS)

export CFLAGS
endif

ifeq ($(PLATFORM),IKANOS)
CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(LINUX_SRC)/include/asm/gcc -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-tango2 -I$(LINUX_SRC)/include/asm-mips/mach-generic -I$(RT28xx_DIR)/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -march=lx4189 -Wa, -DMODULE $(WFLAGS)
export CFLAGS
endif

ifeq ($(PLATFORM),INF_TWINPASS)
CFLAGS := -D__KERNEL__ -DMODULE -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -march=4kc -mips32 -Wa,--trap -pipe -mlong-calls $(WFLAGS)
export CFLAGS
endif

ifeq ($(PLATFORM),PC)
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
# Linux 2.4
CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)
export CFLAGS
else
# Linux 2.6
EXTRA_CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include
endif
endif

ifeq ($(PLATFORM),IXP)
EXTRA_CFLAGS := -v $(WFLAGS) -I$(RT28xx_DIR)/include -mbig-endian
endif

Répondre à renisaac