Android Tablets Forum banner
1 - 8 of 8 Posts

·
Registered
Joined
·
3 Posts
Discussion Starter · #1 ·
I've downloaded the kernel source, and have compiled it. I'm booting Debian off the SD card, and kernel is booting fine. Problem is the rt3070sta won't load because of different version strings. I can't get the driver to compile with emdebian gcc. Has anybody else compiled the driver for the rt3070sta on the M001?
Code:
make -C toolsmake[1]: Entering directory `/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/tools'gcc -g bin2h.c -o bin2hmake[1]: Leaving directory `/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/tools'/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/tools/bin2hcp -f os/linux/Makefile.6 /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/Makefilemake -C /usr/src/linux/ SUBDIRS=/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux modulesmake[1]: Entering directory `/usr/src/projectgus-kernel_wm8505-bc7cbe1'  CC [M]  /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/crypt_md5.oIn file included from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/chip/rt3070.h:59,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rtmp_chip.h:48,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rt_config.h:70,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/crypt_md5.c:28:/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/chip/mac_usb.h:91: error: expected identifier or ?(? before numeric constant/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/chip/mac_usb.h:92: error: expected ?;? before ?UINT32?In file included from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rt_config.h:70,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/crypt_md5.c:28:/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rtmp_chip.h:131:1: warning: "IDLE" redefinedIn file included from arch/arm/mach-wmt/include/mach/wmt.h:32,                 from arch/arm/mach-wmt/include/mach/hardware.h:151,                 from /usr/src/projectgus-kernel_wm8505-bc7cbe1/arch/arm/include/asm/pci.h:7,                 from include/linux/pci.h:1057,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/os/rt_linux.h:50,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rtmp_os.h:42,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rt_config.h:67,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/crypt_md5.c:28:arch/arm/mach-wmt/include/mach/wmt_sdmmc.h:420:1: warning: this is the location of the previous definitionIn file included from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rt_config.h:81,                 from /usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/crypt_md5.c:28:/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/include/rtmp.h:116: error: expected identifier or ?(? before numeric constantmake[2]: *** [/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/crypt_md5.o] Error 1make[1]: *** [_module_/usr/src/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux] Error 2make[1]: Leaving directory `/usr/src/projectgus-kernel_wm8505-bc7cbe1'make: *** [LINUX] Error 2
 

·
Registered
Joined
·
255 Posts
You can configure the kernel to ignore version/magic numbers on modules, but I don't really recommend that.I actually have merged down the latest rt2870sta driver source, with rt3070 support, from the Android's kernel 2.6.35 and I have it building on my desktop. It's not quite working yet, but I'll hopefully sort it out over the weekend and will push to the git repository. I'll post back when that's done.
 

·
Registered
Joined
·
255 Posts
Oh, I just realised that I had the very same issue that you're seeing there... VIA have used some unwisely common C macro names in their headers, and then included them everywhere.I can't remember the name of the header file, but if you look for the one which has "#define IDLE" and "#define R0" and some other unwise choices, you'll find it's included by default from one other common mach/ header... comment that #include out and you'll get going again.Sorry that's a bit vague, I'm not at home and I can't remember the name of the header file (one to do with the mmc support.) I'll definitely push the changes that I've made in the next couple of days anyhow, and it will hopefully work easily then
.
 

·
Registered
Joined
·
255 Posts
I've pushed the merges that I have, you should be able to pull and then compile rt2870 as part of the kernel tree now.The showstopper atm is that the USB bus doesn't seem to be seeing any devices. The kernel finds the USB bus itself just fine (uhci&ehci controllers), and the rt2870 driver loads fine, but the kernel doesn't see anything connected to the bus (ie no wireless card) so the driver is a bit useless. To me, the output in dmesg all looks identical to the factory kernel though, except that after a while the factory kernel detects the new rt2870 wireless device.Good luck.
 

·
Registered
Joined
·
255 Posts
I sorted out the USB issue (the USB stick is powered on via GPIO, and VIA's binary-only wifi module was the part which turned it on.)Have pushed a kernel with rt2870sta kernel module included, which works with the RT3070 module.You'll need to jump through some hoops to get it to work, the steps are described in the README on github. I'd use arch/arm/configs/eken_m001_debian as a base config to start from (copy it to .config then configure as normal.)
 

·
Registered
Joined
·
3 Posts
Latest update:I could not get the firmware to load. I didn't have the following directory.
Code:
echo -n 1  /sys/class/firmware/1-1/loading
I had /sys/class/firmware but not "1-1"So here is what I did. I compiled the firmware into the kernel with the following
Code:
Device Drivers  ---    Generic Driver Options  ---    -*- Userspace firmware loading support    [*]   Include in-kernel firmware blobs in kernel binary
Don't know if that is a good way to do it, but it did work.
 

·
Registered
Joined
·
255 Posts
Glad you get it working. It's definitely a lot simpler to just compile the firmware in. udev should also be loading it automatically from /lib/firmware without needing to do anytrhing, but something is clearly missing (haven't investigated at all.)the /sys/class/firmware/1-1 should appear when you 'ifconfig wlan0 up', I think. Maybe it takes a couple of seconds and I didn't notice that, I don't know. Anyway, you have it working now which is great!
 

·
Registered
Joined
·
3 Posts
Well, now it seems it loads without compiling into the kernel. I recompiled with the eken_m001_debian config. Put the rt2870.bin (Renamed to rt3070.bin) into /lib/firmware. issue the following - echo out /sys/class/gpio/gpio2/directionecho 1 /sys/class/gpio/gpio2/valuemodprobe rt2870sta/etc/init.d/networking startEverything fires up. dmesg shows "requesting firmware rt3070.bin". Doesn't show any confirmation that it loaded though. This wouldn't work without the firmware loading would it?
 
1 - 8 of 8 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top