兴趣是坚持一件事永不衰竭的动力
分类: 嵌入式
2016-03-23 20:54:06
1. Rt_linux.c编译时报错 /workspace/git/2010_0203_RT3070_SoftAP_v2.4.0.1_DPA/UTIL/os/linux/../../os/linux/rt_linux.c: In function 'RtmpOSFSInfoChange': /workspace/git/2010_0203_RT3070_SoftAP_v2.4.0.1_DPA/UTIL/os/linux/../../os/linux/rt_linux.c:991:20:error: incompatible types when assigning to type 'int' from type 'kuid_t' pOSFSInfo->fsuid = current_fsuid(); ^ /workspace/git/2010_0203_RT3070_SoftAP_v2.4.0.1_DPA/UTIL/os/linux/../../os/linux/rt_linux.c:992:20: error: incompatible types when assigning to type 'int' from type 'kgid_t' pOSFSInfo->fsgid = current_fsgid(); ^ 修改============= Rt_linux.c diff: line 991 - pOSFSInfo->fsuid = current_fsuid(); + pOSFSInfo->fsuid = current_fsuid().val; diff: line 992 - pOSFSInfo->fsgid = current_fsgid().val; + pOSFSInfo->fsgid = current_fsgid().val; 2. 继续报错: /home/fang/soft/build/2010_0203_RT3070_SoftAP_v2.4.0.1_DPA/UTIL/os/linux/../../os/linux/rt_usb_util.c:136: error: implicit declaration of function ‘usb_buffer_free’ make[3]: *** [/home/fang/soft/build/2010_0203_RT3070_SoftAP_v2.4.0.1_DPA/UTIL/os/linux/../../os/linux/rt_usb_util.o] 错误 1 以前2.6.32版本并没有出现这样的问题,这次是新版本的,那么就可能是内核版本差异造成的,经过努力发现新内核后, usb_buffer_alloc 和 usb_buffer_free 被替换成 usb_alloc_coherent 和 usb_free_coherent。所以编译才会报错。修改 include/os/rt_linux.h 文件。如下
#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_buffer_alloc(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
将usb_buffer_alloc全部替换为usb_alloc_coherent
|