View previous topic :: View next topic |
Author |
Message |
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Wed Mar 24, 2004 4:22 am Post subject: Lego Mindstorms (ebuilds and usb!) |
|
|
Lego Mindstorms On Gentoo
I have successfully installed and used NQC, BrickOS, and the Lego USB Tower under kernel 2.6!! Pick up ebuild now! They should build fine with our without usb support (depending on your USE variable). However I'm sure there are some errors.
Kernel 2.6 Notes
I'm sure that this builds on kernel 2.6. However, if you don't have OHCI, then you will most likely have to patch your kernel. There is a newer version in their mailing lists on SourceForge, but I can't get a clean copy of it. Could someone help?
The legousb ebuild still needs to install the necessary headers which are missing in the kernel.
Kernel 2.4 Notes
I haven't tested the legousb ebuild with Kernel 2.4, but it's very likely it will install the tower's kernel module properly. If you need help drop by their page. If it doesn't work contact me!
Not Quite C
The NQC executable installs into /usr/bin. You will need to run it with '-Susb' if you are using a usb tower. The current usb code for NQC is stuck to the same usb device path. Therefore, it is patched differently for 2.4 and 2.6. You will need to remerge if you change kernels.
BrickOS
These ebuilds are for binutils-h8300, gcc-h8300, and brickos. They all install into /opt/Mindstorms. Everything seems to work but I haven't played around much.
Final Comments
Just trying to give a little back to the community. I spent days trying to get all of this to work! Hopefully this makes things easier for everyone else.
--------------------------------------
Updates
3-28-2003 - Updated the 2.6 kernel patch link to v. 0.9
Last edited by tomthewombat on Sun Mar 28, 2004 10:16 pm; edited 1 time in total |
|
Back to top |
|
|
homeobocks Guru
Joined: 19 Dec 2003 Posts: 345 Location: I'm from Canada, and they say I'm a little slow . . . eh?
|
Posted: Wed Mar 24, 2004 6:01 am Post subject: |
|
|
Awesome! Jood gob! _________________ HOW DO I SHOT WEB |
|
Back to top |
|
|
Awox n00b
Joined: 19 Nov 2003 Posts: 32 Location: North coast of NSW, Australia
|
Posted: Sat Mar 27, 2004 3:17 pm Post subject: |
|
|
Thankyou, I did make a LejOS ebuild - but lejos isn't as good as BrickOS or NQC so I wont bother looking for it. I'm disappointed, why did you make the brickos ebuild install stuff to /opt/Mindstorms or whatever when you could have installed with a gcc-prefix? Perfectly safe my friend.
But otherwise, what you have done is very nice and I appreciate it.
Thankyou, Awox. |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Sun Mar 28, 2004 10:18 pm Post subject: |
|
|
I originally had the GCC install /usr/bin, but decided that I would do it more along the BrickOS guidelines. Do you think I should change it back and then make BrickOS install to /usr/local or /opt? |
|
Back to top |
|
|
Awox n00b
Joined: 19 Nov 2003 Posts: 32 Location: North coast of NSW, Australia
|
Posted: Sat Apr 03, 2004 5:40 am Post subject: |
|
|
tomthewombat wrote: | I originally had the GCC install /usr/bin, but decided that I would do it more along the BrickOS guidelines. Do you think I should change it back and then make BrickOS install to /usr/local or /opt? |
I think it should install alongside the other gcc and binutils - but using using a binary prefix like hms or something. ./configure --help and you can see there is an option for this.
BrickOS likes this. |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Sat Apr 03, 2004 9:40 pm Post subject: |
|
|
could you check out the file names in /opt/mindstorms? I believe that they are already being built like this. Maybe there is something else that has to be done. I am not home right now so I can't experiment with any config options . |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Wed Apr 07, 2004 8:19 am Post subject: |
|
|
Hi,
This sounds promising.
I got my Lego RIS 2.0 kit last weekend. Yesterday night I finally got the RIS software working on Windows XP (it doesn't work on my dual Athlon for some reason, but it works with my Celeron 700) so I could play a bit with it. So now I'm sure it all works.
Because it didn't work on my dual Athlon, I tried to find the USB tower under Linux (I spotted the legousbtower support in the 2.6 kernel and selected it promptly).
I could see that kernel 2.6 finds the tower and that udev makes a device entry for it. Haven't done any further testing yet.
I'm using only stable ebuilds now, so that is udev-016.
Next thing will be to try out this ebuild.
Thanks in advance for the work.
Cheers _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Wed Apr 07, 2004 9:14 am Post subject: |
|
|
@ tomthewombat
The website of NQC has moved, and the link in your post is broken, it should point here http://bricxcc.sourceforge.net/nqc/
Just helping out
EDIT: More information can be found on the older NQC webiste: http://www.baumfamily.org/nqc_old/index.html _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Wed Apr 07, 2004 8:05 pm Post subject: |
|
|
Luud: yes the new 3.0 version doesn't seem to compile on Linux, although some patches exist.
Remember to download the patch and apply it to your kernel. The current LegoUSB kernel driver isn't functional on UHCI or USB 2.0.
I'm sorry it won't work under SMP in WindowsXP. Very unfortunate. As far as i know, it should function in Linux seemlessly. |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Thu Apr 08, 2004 7:17 am Post subject: |
|
|
I think I'm lucky then. The SMP machine has OHCI, whereas the Celeron and Thinkpad have UHCI. I hope UHCI gets fixed soon as it is very handy to have a laptop that works. It's much more practical when I want to carry it around.
I just came across this link, might be interresting. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Thu Apr 08, 2004 11:23 am Post subject: |
|
|
Hi,
It seems that it should work with UHCI, if I understand the documentation on the LegoUSB homepage correctly: Quote: | usb-uhci contained a bug introduced in version 2.4.21 which will lock the kernel if used with legousbtower driver. Linux version 2.4.22-pre3 and above include the fix and are safe to use.
usb-ohci was fixed in Linux version 2.4.22-pre3 so that it will work with legousbtower.
|
Of course, I won't know for sure until I try. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Fri Apr 09, 2004 12:31 am Post subject: |
|
|
Oh I am sorry. I assumed you were using kernel 2.6. If you are simply applying this patch will fix uhci. If you are using kernel 2.4 there is no problems with legousbtower and uhci!!
Make sure you have usb in you use flags when you use my ebuilds.
If you use my ebuilds everything should work out very easily!!!! |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Tue Apr 13, 2004 11:28 am Post subject: |
|
|
Hi,
Sorry, I still haven't found the time to test your ebuild yet. Kind of too busy with other things and not so much at home.
I do use both 2.6 and 2.4 kernels.
I see the patch you mention is against the 2.6.4 kernel tree. I think you got the patch from here (lwn.net)?
The author's homepage is here.
Need to check if the patch works agains 2.6.5 as well, as that is the current version of the stable gentoo-dev-sources. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Tue Apr 13, 2004 12:15 pm Post subject: Launch of HOWTO |
|
|
Hi,
I decided to launch the first version of the howto in the Documentation, Tips & Tricks forum as topic HOWTO use Lego Mindstorms with Gentoo Linux.
Any feedback is welcome. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Thu Apr 22, 2004 7:46 am Post subject: |
|
|
Hi Tomthewombat,
I finally got around to test your ebuilds. They seem fine to me.
I extracted your tarball in /usr/local/portage_overlay and set PORTDIR_OVERLAY in /etc/make.conf to here.
I only installed nqc, which was painless
And I did put usb in my use flags.
I applied the patch to gentoo-dev-sources-2.6.5-r1 which works fine. However both with and without the patch I can't access the USB IR-Tower.
Code: | # cd /usr/src/linux
# cat legousbtower-0.9-linux-2.6.4.diff | patch -p1 |
This is on my Dual Athlon with the ohci USB driver. There are some worrying warnings in the system log about USB. Can't remember exactly what.
Tomthewombat, can you post the setup on which you have it working (system and other details)?
I will try it on my Celeron 700 and Thinkpad later with the uhci driver.
* EDIT *
I did some research on the web and it seems that nqc looks for whereas my current setup of udev creates Code: | /dev/usb/legousbtower0 | (or similar).
Also, I have the lego usb tower driver not as a module. Maybe I should change that and load it like this Code: | /sbin/modprobe LegoUSB debug=1 config_num=4 usb_reset=1
|
I've got this information from here and here. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Thu Apr 22, 2004 1:32 pm Post subject: |
|
|
Disappointing...
NQC should be patched to use /dev/usb/legousbtower0 if you have a 2.6 kernel. What is the exact error that NQC gives you?
Maybe you should try it with the kernel driver unpatched. The guy making the new patches was concentrating on uhci and usb 2.0. Although, there are reports that his earlier work was fine with ohci, the newer version may have bugs. |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Thu Apr 22, 2004 1:58 pm Post subject: |
|
|
By the way, I have looked over your howto. Very impressive to say the least. Unforetunately I have only had time to skim through it, but it seems to be fairly thorough. Thanks for the props! |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Sun Apr 25, 2004 4:13 pm Post subject: It works! |
|
|
Hi,
Finally got back behind my computer. Only created a symbolic link for the device. Code: | #cd /dev/usb
# ln -s legousbtower0 lego0 |
Now my robot starts it's program when I run
It's time to try this on the laptop, so I will be mobile
Thanks for helping tomthewombat.
It might be that for some reason, The ebuild didn't patch NQC correctly due to an error in my local setup. I will look into this later. At least I have proven myself that it works on my computer. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Sun Apr 25, 2004 5:03 pm Post subject: |
|
|
The ebuild is fine.
Just re-emerged nqc and now it does work with /dev/usb/legousbtower0.
When I did the emerge before, the /usr/src/linux symlink still pointed to a 2.4 kernel tree.
I also tested it with both the onboard OHCI controller of the AMD760MPX chipset and the separate USB 2.0 EHCI controller that comes with the ASUS A7M266-D motherboard. Both work without any problem so far.
Cheers _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Sun Apr 25, 2004 8:46 pm Post subject: |
|
|
Another success.
Switched my Celeron 700 to kernel 2.6.5 and udev
Now the USB tower also works there with UHCI
Note that on all systems I applied the patch to the kernel source tree.
tomthewombat: your ebuilds are working fine for me here. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Tue Apr 27, 2004 8:04 am Post subject: |
|
|
Another update, it also works on the thinkpad 570 with UHCI
Now struggling with my cardbus network card and kernel 2.6. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Fri May 07, 2004 12:29 pm Post subject: |
|
|
Ok,
I've had success on all my x86, usb capable hardware.
I tested the driver with all USB controller drivers (UHCI, OHCE and EHCI) with success. Only tested with gentoo-dev-sources-2.6.5-r1 and udev though.
So I updated the HOWTO with additional details on how to install. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
tomthewombat Apprentice
Joined: 29 Mar 2003 Posts: 244 Location: NY State
|
Posted: Fri May 07, 2004 12:37 pm Post subject: |
|
|
Thank you. I am glad my ebuilds work |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Fri May 07, 2004 12:42 pm Post subject: |
|
|
So am I. _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
flecluse n00b
Joined: 08 Nov 2003 Posts: 24 Location: Belgium (Brussels)
|
Posted: Fri Jun 25, 2004 11:45 am Post subject: How do i emerge this ebuild? |
|
|
Can anyone tell me how I emerge this ebuild? I am pretty new to gentoo linux.
Thanks
Filip _________________ To kill one is a tragedy,
To kill one million is a statistic! |
|
Back to top |
|
|
|