Linux 드라이버 Asus PCE-N53(Ralink RT5592 칩셋)용 무선 드라이버를 컴파일할 수 없습니다.

Linux 드라이버 Asus PCE-N53(Ralink RT5592 칩셋)용 무선 드라이버를 컴파일할 수 없습니다.

나는 이전에 이 드라이버를 이전 커널이라고 생각하는 환경에서 컴파일했습니다. 그러나 나는 지금 15.10에 있고 그것을 알아낼 수 없습니다.

dylan@xaelah:~$ uname -r
4.2.0-18-generic

여기의 출력이다sudo lshw

소스는 에서 다운받았어요여기

그런 다음 디렉토리에 CD를 넣고 sudo make
다음을 발행합니다. 출력은 다음과 같습니다.

make -C tools
make[1]: Entering directory '/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/tools'
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/tools/bin2h
cp -f os/linux/Makefile.6 /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/Makefile
make -C /lib/modules/4.2.0-18-generic/build SUBDIRS=/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-18-generic'
  CC [M]  /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.o
In file included from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/rtmp_os.h:44:0,
                 from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/rtmp_comm.h:69,
                 from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/rt_config.h:33,
                 from /home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:28:
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c: In function ‘RTMPQueryInformation’:
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:3953:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    DBGPRINT(RT_DEBUG_TRACE, ("sizeof UCHAR=%d, channel=%d \n", sizeof(UCHAR), p
                              ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/include/os/rt_linux.h:665:16: note: in definition of macro ‘DBGPRINT_RAW’
         printk Fmt;               \
                ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:3953:4: note: in expansion of macro ‘DBGPRINT’
    DBGPRINT(RT_DEBUG_TRACE, ("sizeof UCHAR=%d, channel=%d \n", sizeof(UCHAR), p
    ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:4896:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
 intf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, _
                                                                     ^
/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.c:4896:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
 , size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
                                                                     ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.o' failed
make[2]: *** [/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1398: recipe for target '_module_/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux' failed
make[1]: *** [_module_/home/dylan/Downloads/patched-Asus-PCE-N53-linux-driver-master/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-18-generic'
Makefile:384: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

분명 난 못해sudo make install

또한 이전 빌드에 표시되었지만 여전히 작동했던 유형 불일치 및 기타 경고에 대해 걱정하지 않습니다. 나도 시도했지만 sudo make -i운이 없었어

빌드 필수 사항, 커널 소스 및 헤더를 다운로드했습니다...

다른 것이 필요하면 알려주시기 바랍니다. Google에서 검색해 보니 비슷한 문제가 발견되었지만 해결책이 없습니다. 심지어 있다이것이 사이트에는 답변이 없으며 다른 대안은 작동하지 않습니다.

어떤 도움이라도 주시면 감사하겠습니다!

편집하다:

나는 또한 다음과 같이 make를 실행해 보았습니다.

sudo make RT_CFLAGS="-Wno-error=date-time"

같은 오류....

나는 그런 다음 a를 한 sudo make clean다음 달렸습니다.sudo make RT_CFLAGS="-Wno-error=date-time" -i 여기 과거통이 있어요

답변1

나는 그녀를 통해 그것을 컴파일할 수 있습니다:

$ lsb_release -dc
Description:    Ubuntu 15.10
Codename:   wily

$ uname -r
4.2.0-18-generic

sudo컴파일에는 사용하지 않는 것이 좋습니다 . 아래 지침이 실패하면 다시 시작해야 할 수도 있습니다.

  1. Git 저장소를 복제했습니다.

    git clone https://github.com/unused/patched-Asus-PCE-N53-linux-driver.git
    
    cd patched-Asus-PCE-N53-linux-driver/
    
  2. -Wno-error=date-time컴파일 플래그에 추가

    vim os/linux/config.mk +178
    

    찾다WFLAGS:=

    WFLAGS := -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT  -DLINUX -Wall -Wstrict-prototypes -Wno-trigraphs -Wno-error=date-time
    
  3. 엮다

    make
    

    이 시점에서 모듈은 성공적으로 컴파일되었습니다.

    ls -l os/linux/rt5592sta.ko

    -rw-rw-r-- 1 user user 1767056 Nov 21 10:29 /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko
    

    modinfo /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko

    filename:       /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko
    version:        2.6.0.0_20120326
    srcversion:     150B71061DC1EBE4DE31E22
    alias:          pci:v00001814d00005592sv*sd*bc*sc*i*
    depends:        
    vermagic:       4.2.0-18-generic SMP mod_unload modversions 
    parm:           mac:rt28xx: wireless mac addr (charp)
    

하지만 스크립트가 그것을 폴더 make에 복사하려고 시도한 것이 이상하다는 것을 알았습니다 . /tftpboot개발자가 다른 컴퓨터에서 업데이트/테스트할 수 있는 빠른 방법을 찾고 있었을 수도 있습니다.

LD [M]  /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-18-generic'
cp -f /home/user/Desktop/sand_box/patched-Asus-PCE-N53-linux-driver/os/linux/rt5592sta.ko /tftpboot
cp: cannot create regular file ‘/tftpboot’: Permission denied
Makefile:384: recipe for target 'LINUX' failed
make: *** [LINUX] Error 1

어쨌든 나머지 설치 단계를 완료해 보세요. 관련된 문제가 발생하면 알려주십시오.

관련 정보