移植MT7620A+MT7610E驅動到Openwrt trunk(Linux Kernel 3.14.18)


MT7620

修改trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620a/mt7620/rt2880/os/linux/rt_linux.c :1201行

  將:  

    pOSFSInfo->fsuid = current_fsuid();
    pOSFSInfo->fsgid = current_fsgid();

  修改為:

    pOSFSInfo->fsuid = *(int *)&current_fsuid();

    pOSFSInfo->fsgid = *(int *)&current_fsgid();

 

MT7610E

7610E驅動要修改的地方有2處

1.修改trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620a/mt7610e..../os/linux/rt_linux.c :899行

  將:  

pOSFSInfo->fsuid = current_fsuid();
pOSFSInfo->fsgid = current_fsgid();

  修改為:

pOSFSInfo->fsuid = *(int *)&current_fsuid();
pOSFSInfo->fsgid = *(int *)&current_fsgid();

2. 修改trunk/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620a/mt7610e....../os/linux/pci_main_dev.c

  在#include區域后面增加如下代碼:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
#define __devexit
#define __devinit
#define __devinitdata
#endif

    修改如下代碼:

#if LINUX_VERSION_CODE >= 0x20412
    remove:     __devexit_p(rt2860_remove_one),
#else remove: __devexit(rt2860_remove_one), #endif

   修改為:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
    remove:     rt2860_remove_one,
#else
#if LINUX_VERSION_CODE >= 0x20412 remove: __devexit_p(rt2860_remove_one), #else remove: __devexit(rt2860_remove_one), #endif #endif

 

重新編譯make V=99

 

整個世界都清凈了。。。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM