zoukankan      html  css  js  c++  java
  • 移植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

    整个世界都清净了。。。

  • 相关阅读:
    spring cloud与dubbo的区别
    进程与线程的区别
    机电传动控制第三周计算与plesc仿真
    plecs仿真
    机电传动控制第二周笔记
    机电传动控制第一周笔记
    PLECS软件学习使用(一)简单的RLC电路搭建
    《自动化技术中的进给电气传动》第一章的1.1节和1.2节读书笔记(一)
    机电传动控制第一周学习笔记
    PLC控制伺服电机
  • 原文地址:https://www.cnblogs.com/jzyuchen/p/4064759.html
Copyright © 2011-2022 走看看