A9VG电玩部落论坛

 找回密码
 注册
搜索
查看: 2072|回复: 2

buildroot-20090131gcn1-i686-cross-powerpc

[复制链接]

精华
0
帖子
582
威望
0 点
积分
535 点
种子
6 点
注册时间
2006-6-3
最后登录
2025-1-28
 楼主| 发表于 2009-4-22 10:02  ·  广东 | 显示全部楼层 |阅读模式
我把pc的usb无线网卡接到wii的linux下

linux识别出来硬件,搞了半天跨平台编译驱动,可惜没编译过去

网卡是TP-Link的WN321G无线网卡

芯片是RT2571wf, 对应的linux驱动是Ralink RT2501USB

有熟悉这个的跨平台编译驱动的朋友帮忙下吗。。


[null@localhost Module]$ powerpc-linux-gcc -v
Using built-in specs.
Target: powerpc-linux-uclibc
Configured with: /home/null/buildroot-20090131gcn1-src/buildroot/toolchain_build_powerpc/gcc-4.3.2/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=powerpc-linux-uclibc --enable-languages=c --with-sysroot=/home/null/buildroot-20090131gcn1-src/buildroot/build_powerpc/staging_dir --with-build-time-tools=/home/null/buildroot-20090131gcn1-src/buildroot/build_powerpc/staging_dir/usr/powerpc-linux-uclibc/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared --with-gmp=/home/null/buildroot-20090131gcn1-src/buildroot/toolchain_build_powerpc/gmp --with-mpfr=/home/null/buildroot-20090131gcn1-src/buildroot/toolchain_build_powerpc/mpfr --disable-nls --enable-threads --disable-multilib --disable-decimal-float --with-tune=750 --disable-largefile
Thread model: posix
gcc version 4.3.2 (GCC)
[null@localhost Module]$ powerpc-linux-gcc -O -c -D__KERNEL__ rtmp_main.c
In file included from rtmp_main.c:40:
rt_config.h:63:26: error: linux/module.h: No such file or directory
rt_config.h:67:24: error: linux/init.h: No such file or directory
rt_config.h:69:25: error: linux/timer.h: No such file or directory
rt_config.h:71:24: error: linux/slab.h: No such file or directory
rt_config.h:75:31: error: linux/etherdevice.h: No such file or directory
rt_config.h:76:26: error: linux/skbuff.h: No such file or directory
rt_config.h:79:27: error: linux/proc_fs.h: No such file or directory
rt_config.h:80:25: error: linux/delay.h: No such file or directory
rt_config.h:82:25: error: linux/ctype.h: No such file or directory
rt_config.h:84:28: error: linux/smp_lock.h: No such file or directory
rt_config.h:85:24: error: linux/kmod.h: No such file or directory
rt_config.h:86:26: error: linux/ioport.h: No such file or directory
rt_config.h:87:27: error: linux/threads.h: No such file or directory
rt_config.h:88:27: error: linux/vmalloc.h: No such file or directory
rt_config.h:91:23: error: linux/usb.h: No such file or directory
rt_config.h:96:76: error: asm/processor.h: No such file or directory
rt_config.h:97:24: error: asm/bitops.h: No such file or directory
rt_config.h:98:26: error: asm/io.h: No such file or directory
rt_config.h:99:28: error: asm/irq.h: No such file or directory
rt_config.h:100:25: error: asm/uaccess.h: No such file or directory
rt_config.h:101:24: error: asm/atomic.h: No such file or directory
In file included from rtmp_main.c:40:
rt_config.h:131: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
rt_config.h:132: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
rt_config.h:134: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token


编译简单的就没问题,怎么把pc的网卡驱动改成wii下用呢

[null@localhost ~]$ cat test.c
main()
{
      printf("test\r\n");
}
[null@localhost ~]$ powerpc-linux-gcc test.c -o test
test.c: In function 'main':
test.c:3: warning: incompatible implicit declaration of built-in function 'printf'
[null@localhost ~]$ file test
test: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
[null@localhost ~]$ strings test
/lib/ld-uClibc.so.0
libgcc_s.so.1
__deregister_frame_info
_Jv_RegisterClasses
__register_frame_info
libc.so.0
puts
__uClibc_main
_edata
__bss_start
_end
GLIBC_2.0
P}+HP}^Sx})
p}}[x;
}}X.
}a[xN
}a[xN
}a[xN
test
[null@localhost ~]$.
该用户已被禁言

精华
0
帖子
5337
威望
7 点
积分
5604 点
种子
0 点
注册时间
2007-1-24
最后登录
2020-10-4
发表于 2009-4-22 12:21  ·  北京 | 显示全部楼层
介种编程问题不懂的说……飘过
lx高手继续讨论

精华
0
帖子
38
威望
0 点
积分
39 点
种子
0 点
注册时间
2005-7-16
最后登录
2009-1-31
发表于 2009-4-22 18:22  ·  北京 | 显示全部楼层
缺linux源码的头文件。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|A9VG电玩部落 川公网安备 51019002005286号

GMT+8, 2025-2-3 09:16 , Processed in 0.147445 second(s), 12 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部