2

I have previosuly compiled this driver on what I beleive was an older kernel. However I am now on 15.10 and just can't figure it out.

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

Here is the output of sudo lshw

I have downloaded the source from here

I then CD to the directory and issue sudo make
Below is the output:

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

Obviously I can not sudo make install

I am also not concerned about the type mismatches and other warnings as they appeared in the previous build and it still worked. I have also tried sudo make -i with no luck

I have downloaded build essentials, kernel source and headers...

Please let me know if you guys need anything else. I have searched google and found similar problems but no solutions. There is even this on this site but no answer and the other alternatives do not work.

Any help would be appreciated!

EDIT:

I also tried running make as follows-

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

Same errors....

I then did a sudo make clean and then ran sudo make RT_CFLAGS="-Wno-error=date-time" -i here is the pastbin

5
  • use -w option while running sudo make. This option will not consider warnings as errors. Nov 18, 2015 at 7:43
  • I tried make clean and then make -w and got the same results. I also tried -iw with the same problems. There appear to be errors and not warnings that is causing the issues. I think but I am not sure to be honest
    – Dylan
    Nov 18, 2015 at 7:46
  • 1
    Bug reports are off topic on AU. You should report this bug to the developers. Nov 20, 2015 at 13:57
  • Considering the age of that Git repository (> 1 year), you will probably be better off finding a different source for that driver. Nov 20, 2015 at 14:36
  • I do not believe this is a bug. I believe this is an issue of compiling an old driver on a newer kernel. Is it a bug if you do not write your code to be able to be compiled on every future kernel to come out? As I advised in my post I am not worried about the warnings in the code about type mismatches. - Also I have considered the age of the repository however this is the correct source and newest available. The original driver from the manf needs to be patched but will then have this same issue.
    – Dylan
    Nov 21, 2015 at 0:11

1 Answer 1

2
+50

I could compile it over her:

$ lsb_release -dc
Description:    Ubuntu 15.10
Codename:   wily

$ uname -r
4.2.0-18-generic

It's recommended not to use sudo for compilation. If the below instructions failed, may be you should start over.

  1. Cloned the git repository.

    git clone https://github.com/unused/patched-Asus-PCE-N53-linux-driver.git
    
    cd patched-Asus-PCE-N53-linux-driver/
    
  2. Add -Wno-error=date-time to compilation flags

    vim os/linux/config.mk +178
    

    Look for WFLAGS:=

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

    make
    

    At this point, the module was compiled successfully:

    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)
    

But I find it weird that make script has tried to copy it to /tftpboot folder. May be the developer was looking for quick way to update/test it on another machine.

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

Anyway, try to complete the remaining installation steps. Let me know if you face any related issue.

1
  • 1
    The solution supplied by Sneetsher worked for me after skipping step 2. After editing the file and running make I got an error stating that 'Wdate did not exist', - not an exact quote. I am running Mint 17. Cloning the git repository worked. I did get errors but I was able to get it to compile and following the rest of the setup instructions worked.
    – James
    Jan 15, 2016 at 22:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .