我以前认为我是一个较旧的内核,因此曾对该驱动程序进行过编译。但是我现在在15.10上,只是想不通。
dylan@xaelah:~$ uname -r
4.2.0-18-generic
这是输出sudo lshw
我已经从这里下载了源代码
然后,我将CDsudo 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
过没有运气
我已经下载了构建要领,内核源代码和头文件...
如果您还需要其他任何信息,请告诉我。我已经搜索了谷歌,发现类似的问题,但没有解决方案。此站点上甚至没有此内容,但没有答案,其他替代方法也无效。
任何帮助,将不胜感激!
编辑:
我还尝试了运行make,如下所示:
sudo make RT_CFLAGS="-Wno-error=date-time"
同样的错误。
然后我做了一个sudo make clean
,然后在这里跑sudo make RT_CFLAGS="-Wno-error=date-time" -i
了
我可以将其编译为她:
$ lsb_release -dc
Description: Ubuntu 15.10
Codename: wily
$ uname -r
4.2.0-18-generic
建议不要sudo
用于编译。如果以下说明失败,则可能是您应该重新开始。
克隆了git仓库。
git clone https://github.com/unused/patched-Asus-PCE-N53-linux-driver.git
cd patched-Asus-PCE-N53-linux-driver/
添加-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
编译
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
无论如何,请尝试完成剩余的安装步骤。如果您遇到任何相关问题,请告诉我。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句