IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Matériel Discussion :

Aide à la compilation driver rt2860sta


Sujet :

Matériel

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Janvier 2010
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2010
    Messages : 6
    Points : 2
    Points
    2
    Par défaut [Résolu] Aide à la compilation driver rt2860sta
    Bonjour,
    J'essaye en vain de me débattre avec le makefile pour qu'il s'achève sans erreur mais c'est mission impossible. J'aimerais qu'on m'aide à adapter le makefile et enfin comprendre pourquoi ça marche jamais.

    Voici un bout du readme qui contient les instructions :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    =======================================================================
    Build Instructions:
    ====================
     
    1> $tar -xvzf RT2860_Linux_STA_x.x.x.x.tgz
    go to "./RT2860_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 RT2860STA.dat /etc/Wireless/RT2860STA/RT2860STA.dat
     
    6> load driver, go to "os/linux/" directory.
    #[kernel 2.4]
    # $/sbin/insmod rt2860sta.o
    # $/sbin/ifconfig ra0 inet YOUR_IP up
     
    #[kernel 2.6]
    # $/sbin/insmod rt2860sta.ko
    # $/sbin/ifconfig ra0 inet YOUR_IP up
     
    7> unload driver
    $/sbin/ifconfig ra0 down
    $/sbin/rmmod rt2860sta
    et voici le makefile qui me pose des soucis

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    RT28xx_MODE = STA
    TARGET = LINUX
    CHIPSET = 2860
    OSABL = NO
     
    #RT28xx_DIR = home directory of RT28xx source code
    RT28xx_DIR = $(shell pwd)
    RTMP_SRC_DIR = $(RT28xx_DIR)/RT$(CHIPSET)
     
    #PLATFORM: Target platform
    PLATFORM = PC
    #PLATFORM = 5VT
    #PLATFORM = IKANOS_V160
    #PLATFORM = IKANOS_V180
    #PLATFORM = SIGMA
    #PLATFORM = SIGMA_8622
    #PLATFORM = INIC
    #PLATFORM = STAR
    #PLATFORM = IXP
    #PLATFORM = INF_TWINPASS
    #PLATFORM = INF_DANUBE
    #PLATFORM = INF_AR9
    #PLATFORM = BRCM_6358
    #PLATFORM = INF_AMAZON_SE
    #PLATFORM = CAVM_OCTEON
    #PLATFORM = CMPC
    #PLATFORM = RALINK_2880
    #PLATFORM = RALINK_3052
    #PLATFORM = SMDK
    #PLATFORM = KODAK_DC
    #PLATFORM = DM6446
    #PLATFORM = FREESCALE8377
     
     
    ifeq ($(TARGET),LINUX)
    MAKE = make
    endif
     
    ifeq ($(PLATFORM),5VT)
    LINUX_SRC = /project/stable/5vt/ralink-2860-sdk/linux-2.6.17
    CROSS_COMPILE = /opt/crosstool/uClibc_v5te_le_gcc_4_1_1/bin/arm-linux-
    endif
     
    ifeq ($(PLATFORM),IKANOS_V160)
    LINUX_SRC = /home/sample/projects/LX_2618_RG_5_3_00r4_SRC/linux-2.6.18
    CROSS_COMPILE = mips-linux-
    endif
     
    ifeq ($(PLATFORM),IKANOS_V180)
    LINUX_SRC = /home/sample/projects/LX_BSP_VX180_5_4_0r1_ALPHA_26DEC07/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),SIGMA_8622)
    LINUX_SRC = /home/snowpin/armutils_2.5.120.1/build_arm/linux-2.4.22-em86xx
    CROSS_COMPILE = /home/snowpin/armutils_2.5.120.1/toolchain/bin/arm-elf-
    CROSS_COMPILE_INCLUDE = /home/snowpin/armutils_2.5.120.1/toolchain/lib/gcc-lib/arm-elf/2.95.3
    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), RALINK_2880)
    LINUX_SRC = /project/stable/RT288x/RT288x_SDK/source/linux-2.4.x
    CROSS_COMPILE = /opt/buildroot-gdb/bin/mipsel-linux-
    endif
     
    ifeq ($(PLATFORM),RALINK_3052)
    LINUX_SRC = /home/peter/ap_soc/SDK_3_3_0_0/RT288x_SDK/source/linux-2.6.21.x
    CROSS_COMPILE = /opt/buildroot-gcc342/bin/mipsel-linux-uclibc-
    endif
     
    ifeq ($(PLATFORM),FREESCALE8377)
    LINUX_SRC = /opt/ltib-mpc8377_rds-20090309/rpm/BUILD/linux-2.6.25
    CROSS_COMPILE = /opt/freescale/usr/local/gcc-4.2.187-eglibc-2.5.187/powerpc-linux-gnu/bin/powerpc-linux-gnu-
    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
     
    ifeq ($(PLATFORM),INF_DANUBE)
    LINUX_SRC = /opt/danube/sdk/linux-2.6.16.x
    CROSS_COMPILE = mips-linux-
    ROOTDIR = /opt/danube/sdk
    export ROOTDIR
    endif
     
    ifeq ($(PLATFORM),INF_AR9)
    LINUX_SRC = /root/ar9/xR9_BSP1.2.2.0/source/kernel/opensource/linux-2.6.20/
    CROSS_COMPILE = /root/ar9/ifx-lxdb26-1.0.2/gcc-3.4.4/toolchain-mips/bin/
    endif
     
    ifeq ($(PLATFORM),BRCM_6358)
    LINUX_SRC =
    CROSS_COMPILE =
    endif
     
    ifeq ($(PLATFORM),INF_AMAZON_SE)
    # Linux 2.6
    #LINUX_SRC = /lib/modules/$(shell uname -r)/build
    # Linux 2.4 Change to your local setting
    LINUX_SRC = /backup/ifx/3.6.2.2/source/kernel/opensource/linux-2.4.31
    #CROSS_COMPILE = mips-linux-
    #LINUX_SRC = /project/Infineon/3.6.2.2/source/kernel/opensource/linux-2.4.31
    CROSS_COMPILE = /opt/uclibc-toolchain/ifx-lxdb-1-2-3-external/gcc-3.3.6/toolchain-mips/R0208V35/mips-linux-uclibc/bin/
    endif
     
    ifeq ($(PLATFORM),ST)
    LINUX_SRC = /opt/STM/STLinux-2.2/devkit/sources/kernel/linux0039
    CROSS_COMPILE = /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-
    ARCH := sh
    export ARCH
    endif
     
    ifeq ($(PLATFORM),CAVM_OCTEON)
    OCTEON_ROOT = /usr/local/Cavium_Networks/OCTEON-SDK
    LINUX_SRC = $(OCTEON_ROOT)/linux/kernel_2.6/linux
    CROSS_COMPILE = mips64-octeon-linux-gnu-
    endif
     
    ifeq ($(PLATFORM),CMPC)
    LINUX_SRC = /opt/fvt_11N_SDK_0807/fvt131x_SDK_11n/linux-2.6.17
    CROSS_COMPILE =
    endif
     
    ifeq ($(PLATFORM),SMDK)
    LINUX_SRC = /home/bhushan/itcenter/may28/linux-2.6-samsung
    CROSS_COMPILE = /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-
    endif
     
    ifeq ($(PLATFORM),KODAK_DC)
    SKD_SRC = C:/SigmaTel/DC1250_SDK_v1-9/sdk
    CROSS_COMPILE = $(cc)
    endif
     
    ifeq ($(PLATFORM),DM6446)
    LINUX_SRC = /home/fonchi/work/soc/ti-davinci
    endif
     
    export OSABL RT28xx_DIR RT28xx_MODE LINUX_SRC CROSS_COMPILE CROSS_COMPILE_INCLUDE PLATFORM RELEASE CHIPSET RTMP_SRC_DIR LINUX_SRC_MODULE TARGET
     
    all: build_tools $(TARGET)
     
     
    build_tools:
    $(MAKE) -C tools
    $(RT28xx_DIR)/tools/bin2h
     
    test:
    $(MAKE) -C tools test
     
    LINUX:
    ifneq (,$(findstring 2.4,$(LINUX_SRC)))
     
    cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
    $(MAKE) -C $(RT28xx_DIR)/os/linux/
     
    cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.o /tftpboot
    else
    cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
    ifeq ($(PLATFORM),DM6446)
    $(MAKE) ARCH=arm CROSS_COMPILE=arm_v5t_le- -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
    else
    ifeq ($(PLATFORM),FREESCALE8377)
    $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
    else
    $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
    endif
    endif
     
    endif
     
    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
     
    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
    Donc le MODE = STA et TARGET = LINUX, mais que peut vouloir dire "define the linux kernel source include file path LINUX_SRC modify to meet your need."
    Je suis sous le kernel 2.6.31, doit-je remplacer toutes les occurences de noyau 2.X.X par 2.6.31?

  2. #2
    Candidat au Club
    Profil pro
    Inscrit en
    Janvier 2010
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2010
    Messages : 6
    Points : 2
    Points
    2
    Par défaut
    J'ai trouvé ce qui n'allait pas. Apparemment la présences des headers du kernel ne suffisaient pas, pour compiler il avait besoin des sources pour compiler

Discussions similaires

  1. Un peu d'aide pour compiler avec G++ !
    Par Sensei.Dje dans le forum Autres éditeurs
    Réponses: 3
    Dernier message: 26/04/2007, 17h09
  2. Aide pour compiler un code
    Par deubelte dans le forum MATLAB
    Réponses: 3
    Dernier message: 22/02/2007, 19h33
  3. Problème compilation - Drivers
    Par Alexandre` dans le forum Linux
    Réponses: 33
    Dernier message: 21/02/2007, 22h50
  4. Problème compilation driver ethernet
    Par bogsy15 dans le forum Debian
    Réponses: 3
    Dernier message: 20/02/2007, 20h50
  5. Besoin d'aide pour compiler des sources
    Par Fabouney dans le forum C
    Réponses: 9
    Dernier message: 26/07/2006, 00h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo