| View previous topic :: View next topic |
| Author |
Message |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Thu Sep 08, 2005 5:23 am Post subject: ural-linux wireless usb ebuild (RT2500USB chipset) |
|
|
I just made an ebuild for the version 0.8.2 ural-linux drivers. To read more about these drivers check out their homepage: http://etudiants.insia.org/~jbobbio/ural-linux/
I have tested these drivers for the ppc platform using a Dlink DWL-G122-b1. I'm not sure what other archs are supported, but I will assume x86 also works.
Here is a list of cards supported by these drivers: | Code: | * AMIT WL532U
* Asus WL-167g
* Belkin WUAG 7050 V2000
* Buffalo WLI-U2-KG54-AI
* CNet CWD-854
* Compex WLU54G
* Conceptronic C54RU
* D-Link DWL-G122 b1
* Dynalink WLG25USB
* E-Tech WGUS02
* Gigabyte GN-WBKG
* Hercules HWGUSB2-54
* KCORP LifeStyle KLS-685
* Linksys WUSB54G v4 / WUSB54GP v4
* MSI MS-6861 / MS-6865 / MS-6869
* Repotech RP-WU0402
* SerComm UB801R
* SparkLAN WL-685R
* Tonze UW-6200C
* EP-9001-g
* ZWX-G261 |
Here is the ebuild - ural-linux-0.8.2.ebuild: | Code: |
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="ural-linux wireless drivers based on the RT2500USB chipset"
HOMEPAGE="http://etudiants.insia.org/~jbobbio/ural-linux/"
SRC_URI="http://etudiants.insia.org/~jbobbio/ural-linux/files/${P}.tar.bz2"
SLOT="0"
LICENSE="BSD GPL-2"
KEYWORDS="~x86 ~ppc"
IUSE=""
DEPEND="sys-apps/sed"
src_compile() {
# fix typo in Makefile
cp Makefile Makefile.orig
sed -e 's:sbif:sbin:g' Makefile.orig > Makefile || die "sed failed"
emake || die "emake failed"
}
src_install() {
make DESTDIR="${D}" install || die "install failed"
dodoc FAQ NEWS README
dohtml EXTENDING.html ctags.html
}
|
To install ebuild do this:
| Code: | mkdir /usr/local/portage/net-wireless/ural-linux
mv ural-linux-0.8.2.ebuild /usr/local/portage/net-wireless/ural-linux
cd /usr/local/portage/net-wireless/ural-linux
ebuild ural-linux-0.8.2.ebuild digest |
And them emerge it:
EDIT: I submitted it to bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=105216
EDIT2: I updated the ebuild. The functionality is the same, but conforms to gentoo's guidelines.
Last edited by mikegpitt on Sun Sep 11, 2005 2:31 am; edited 1 time in total |
|
| Back to top |
|
 |
.:deadhead:. Advocate


Joined: 25 Nov 2003 Posts: 2904 Location: Milano, Italy
|
|
| Back to top |
|
 |
amon-ra n00b


Joined: 21 Apr 2003 Posts: 59 Location: Albacete
|
Posted: Sat Sep 10, 2005 10:46 am Post subject: |
|
|
| Sorry but page does not work and I can't download the tarball. |
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Sat Sep 10, 2005 4:00 pm Post subject: |
|
|
Yeah, it seems the day after I posted this ebuild the website that hosts it went down. I have no control over their server, so I have just been waiting and hoping it comes back up. The above link is the only place I know where to download the tarball.
I also made some changes to the ebuild, to be consistant with the gentoo guidelines. I think I have the final ebuild now, but when I am sure I will post it again.
EDIT: The site appears to be back up, so have fun downloading. |
|
| Back to top |
|
 |
amon-ra n00b


Joined: 21 Apr 2003 Posts: 59 Location: Albacete
|
Posted: Sat Sep 10, 2005 6:13 pm Post subject: |
|
|
I tested it in amd64, and works perfect!!! Only one thing I must do to make the ebuild works,this:
| Code: | | ln -s /usr/src/linux/arch/x86_64 /usr/src/linux/arch/amd64 |
You can add this to ebuild and ~amd64 keywords. Thats all |
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Sun Sep 11, 2005 2:28 am Post subject: |
|
|
| amon-ra wrote: | I tested it in amd64, and works perfect!!! Only one thing I must do to make the ebuild works,this:
| Code: | | ln -s /usr/src/linux/arch/x86_64 /usr/src/linux/arch/amd64 |
You can add this to ebuild and ~amd64 keywords. Thats all |
Cool thanks for testing! I need to figure out how to make that link without breaking the rules gentoo has on ebuilds, since that will break the sandbox environment, and maybe cause other side-effects later on. I'm new to writing ebuilds, so I need to do a little background reading on how to approach this.
EDIT: I was just looking in the kernel source and noticed that I too didn't have an amd64 directory. Why did you need to add this symlink? Did the ural drivers autodetect the wrong directory? |
|
| Back to top |
|
 |
gustafson Guru


Joined: 12 Aug 2004 Posts: 404
|
Posted: Wed Sep 14, 2005 9:50 pm Post subject: |
|
|
I'm testing on x86. It does seem to work.
I also had to create a symbol link. This time:
| Code: | | ln -s /usr/src/linux/arch/i386 /usr/src/linux/arch/x86 |
I'm not getting an ip address but I think that is a dhcp problem.
Thanks for working on this, it is very encouraging to have the device show up! |
|
| Back to top |
|
 |
gustafson Guru


Joined: 12 Aug 2004 Posts: 404
|
Posted: Wed Sep 14, 2005 10:14 pm Post subject: |
|
|
Bad news. I'm getting kernel panics: Briefly, the error message is:
| Code: | | <0>Kernel panic - not syncing: Fatal exception in interrupt |
What does this mean? |
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Thu Sep 15, 2005 2:22 pm Post subject: |
|
|
| gustafson wrote: | Bad news. I'm getting kernel panics: Briefly, the error message is:
| Code: | | <0>Kernel panic - not syncing: Fatal exception in interrupt |
What does this mean? |
The drivers are unstable as they are now. You can read more on their homepage. I've been using them for about 2 weeks now, and in that time I also had two kernel panics. The panics seem very random, and I think both occured when I wasn't even actively using the card. I can tolerate this though.
If you maybe want to preserve your machine I would recommend 1) compiling with no odd CFLAGS and 2) rmmod the the ural and wlan driver when you aren't usign the wireless.
I personally do 1 but not 2.
| Quote: | I also had to create a symbol link. This time:
Code:
ln -s /usr/src/linux/arch/i386 /usr/src/linux/arch/x86
|
That's odd you needed to do this too. What happened before you made the symlink? Did the Makefile autodetect a nonexistant directory? Could you maybe post the output before you symlinked? |
|
| Back to top |
|
 |
gustafson Guru


Joined: 12 Aug 2004 Posts: 404
|
Posted: Thu Sep 15, 2005 8:47 pm Post subject: |
|
|
Well... I'd like to post it for you. Unfortunately I can't do much more than say it isn't instructive. (I'm building on a laptop that has a broken pcmcia port, so the only internet I will have on it is what ural-linux will provide. Typing that much output isn't worthwhile)
I think your ebuild probably misses that the arch directory is not the same as the architecture keyword, in some cases. For example, the ~x86 or x86 architectures kernels gets built in the /usr/src/linux/arch/i386 directory. The amd64 and ~amd64 keywords kernel gets built in the /usr/src/linux/arch/x86_64 directory.
What CFLAGS would you recommend?
I've tried building with
-O -march=pentium3
-Os -march=pentium3 -fomit-frame-pointer -pipe
Each results in a kernel panic each time. What kernel are you using? I'm on 2.6.12-gentoo-r10 |
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Thu Sep 15, 2005 10:52 pm Post subject: |
|
|
| Try it with -O2 -march=pentuim3. I'm using 2.6.12-gentoo-r6, but I'm also on a ppc (iBook). Maybe ther are problems with the x86 build. |
|
| Back to top |
|
 |
gustafson Guru


Joined: 12 Aug 2004 Posts: 404
|
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Fri Sep 16, 2005 4:10 am Post subject: |
|
|
Cool I'm happy you got it to work... but I do care that it works with native linux drivers. I run a ppc system on my laptop so ndiswrapper is out of the question. |
|
| Back to top |
|
 |
gustafson Guru


Joined: 12 Aug 2004 Posts: 404
|
Posted: Fri Sep 16, 2005 3:52 pm Post subject: |
|
|
I'll come back to the ural-linux drivers later... I think it is bad practice to use tools like ndiswrapper. Don't get me wrong, it is a great package, and very helpful particularly in situations like this, and I'm very greatful to everyone who has worked on it. However, I also think we risk not having native drivers if people become content to use windows drivers.
By later I mean in a few weeks once my (slow) machine has finally compiled the rest of my system. Since I didn't have internet working before, I was obtaining source one package at a time via usb key. |
|
| Back to top |
|
 |
infirit l33t


Joined: 11 Jan 2003 Posts: 764 Location: Hoofddorp / The Netherlands
|
Posted: Fri Sep 16, 2005 11:55 pm Post subject: |
|
|
To find the official rt2x00 kernel modules look here. It also has the usb modulke that is not yet in portage. _________________ EASY TO INSTALL = Difficult to install, but instruction manual has pictures.
Join the adopt an unanswered post initiative today |
|
| Back to top |
|
 |
federico Advocate


Joined: 18 Feb 2003 Posts: 3270 Location: Italy, Milano
|
Posted: Tue Oct 04, 2005 10:01 pm Post subject: |
|
|
I was able to emerge with your ebuild after using the simlink discovered in this thread.
I was able to load automagically the modules when i insert the wifi dongle but i am not able to see any light on the card...
I get strange dmesg log:
| Code: |
scheduling while atomic: khubd/0x00000002/99
[<c0492d03>] schedule+0x593/0x650
[<c04936b5>] schedule_timeout+0x55/0xb0
[<c0125c60>] process_timeout+0x0/0x10
[<c012607f>] msleep+0x2f/0x40
[<c0359f5a>] hub_port_debounce+0x5a/0x120
[<c035ac6e>] hub_port_connect_change+0x32e/0x570
[<c035b2a6>] hub_events+0x3f6/0x640
[<c035b515>] hub_thread+0x25/0x130
[<c0132080>] autoremove_wake_function+0x0/0x60
[<c0492a33>] schedule+0x2c3/0x650
[<c0132080>] autoremove_wake_function+0x0/0x60
[<c035b4f0>] hub_thread+0x0/0x130
[<c0131a15>] kthread+0xc5/0x110
[<c0131950>] kthread+0x0/0x110
[<c010137d>] kernel_thread_helper+0x5/0x18
|
and iwconfig see the card BUT
| Code: |
altair ~ # ifconfig eth2 up
Segmentation fault
|
I am absolutly not able to use the card....
I will try again other links because someone gave me this card as a gift and it looks cute, I have to get it working  _________________ Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk |
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Wed Oct 05, 2005 1:34 am Post subject: |
|
|
Those errors don't look that good. I'm deffinitly not an expert with the ural drivers, but maybe it is a problem with your kernel version. So, which kernel are you using? I'm using the 2.6.12-gentoo-r6 kernel.
Also I should ask the dumb obvious question, what CFLAGS are you using? |
|
| Back to top |
|
 |
bdz Apprentice


Joined: 15 Jul 2005 Posts: 237 Location: Montpellier (France)
|
Posted: Wed Nov 16, 2005 9:00 pm Post subject: |
|
|
I tried your ebuild on x86 but it failed to emerge.
First I had this error:
| Code: | >>> Source unpacked.
Makefile:530: /usr/src/linux-2.6.14-gentoo-r1/arch/x86/Makefile: No such file or directory |
creating the symlink as already mentioned in this thread fixed this problem:
| Code: | | ln -s /usr/src/linux/arch/i386 /usr/src/linux/arch/x86 |
But now the emerge is stuck on another error:
| Code: | /var/tmp/portage/ural-linux-0.8.2/work/ural-linux-0.8.2/ural/if_ral.c: In function `ural_tx_timeout':
/var/tmp/portage/ural-linux-0.8.2/work/ural-linux-0.8.2/ural/if_ral.c:1545: error: `URB_ASYNC_UNLINK' undeclared (first use in this function) |
Also I have a lot these warnings:
| Code: | /var/tmp/portage/ural-linux-0.8.2/work/ural-linux-0.8.2/net80211/ieee80211_var.h:45:7: warning: "__FreeBSD__" is not defined
/var/tmp/portage/ural-linux-0.8.2/work/ural-linux-0.8.2/net80211/ieee80211_var.h:241:5: warning: "NBPFILTER" is not defined |
|
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Thu Nov 17, 2005 5:37 am Post subject: |
|
|
| What kernel are you using? I just tested it on the 2.6.12-gentoo-r10 kernel and it built fine. The website says they have only tested it on the 2.6.11 and 2.6.10 kernels. |
|
| Back to top |
|
 |
bdz Apprentice


Joined: 15 Jul 2005 Posts: 237 Location: Montpellier (France)
|
Posted: Thu Nov 17, 2005 7:29 am Post subject: |
|
|
I'm using kernel 2.6.14
This is the problem. URB_ASYNC_UNLINK is defined in one kernel header. It exists in 2.6.12 and 2.6.13 but was removed in 2.6.14 |
|
| Back to top |
|
 |
scoobydu Veteran


Joined: 16 Feb 2003 Posts: 1076 Location: 'Mind the Gap'
|
Posted: Fri Nov 18, 2005 9:07 pm Post subject: |
|
|
| bdz wrote: | I'm using kernel 2.6.14
This is the problem. URB_ASYNC_UNLINK is defined in one kernel header. It exists in 2.6.12 and 2.6.13 but was removed in 2.6.14 |
Is there a solution for this anyone knows of?
tia _________________ Tyan Tiger K8W, 2xOpteron 240,Powerbook5,6 15" 1.5g, Macbook Black 2g, Mac Mini 1g, Ipod P60g.
| Linux - From a windows user perspective| |
|
| Back to top |
|
 |
bdz Apprentice


Joined: 15 Jul 2005 Posts: 237 Location: Montpellier (France)
|
Posted: Fri Nov 18, 2005 11:54 pm Post subject: |
|
|
I tried to modify the ebuild to add a patch that removes the line causing the error in the if_ral.c file.
It compiles fine but I'm not sure that it is the correct way to solve the problem.
I looked at other source files of the kernel that were using the URB_ASYNC_UNLINK define in 2.6.13 kernel and how they were modfied in 2.6.14. Removing the line seems to be the thing to do. But I may be completely wrong.
Maybe we should contact the author of the ural-linux driver to have this problem fixed. |
|
| Back to top |
|
 |
mikegpitt Advocate


Joined: 22 May 2004 Posts: 3152
|
Posted: Sat Nov 19, 2005 4:05 am Post subject: |
|
|
| bdz wrote: | | Maybe we should contact the author of the ural-linux driver to have this problem fixed. |
This is probably the best solution. The author would probably want to know the driver doesn't work in 2.6.14 anyways.
Sorry I don't have too much info on what is happening... |
|
| Back to top |
|
 |
bdz Apprentice


Joined: 15 Jul 2005 Posts: 237 Location: Montpellier (France)
|
Posted: Sat Nov 19, 2005 5:08 am Post subject: |
|
|
Well, the problem is pretty simple:
The URB_ASYNC_UNLINK define has been deprecated since some kernel versions:
| linux 2.6.13 usb.h wrote: | The URB_ASYNC_UNLINK transfer flag affects later invocations of
* the usb_unlink_urb() routine. Note: Failure to set URB_ASYNC_UNLINK
* with usb_unlink_urb() is deprecated. For synchronous unlinks use
* usb_kill_urb() instead.
|
Since Linux 2.6.14 the URB_ASYNC_UNLINK define has been completely removed.
So when compiling ural-linux driver wih a 2.6.14 kernel we have the following error:
| Code: | /var/tmp/portage/ural-linux-0.8.2/work/ural-linux-0.8.2/ural/if_ral.c: In function `ural_tx_timeout':
/var/tmp/portage/ural-linux-0.8.2/work/ural-linux-0.8.2/ural/if_ral.c:1545: error: `URB_ASYNC_UNLINK' undeclared (first use in this function) |
I think that the information above will be enough for the ural-linux author to understand the problem and fix it.
Let me know if you think I'm wrong. |
|
| Back to top |
|
 |
scoobydu Veteran


Joined: 16 Feb 2003 Posts: 1076 Location: 'Mind the Gap'
|
|
| Back to top |
|
 |
|