NoRocketScience Forum
NoRocketScience Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Edimax / Sweex routers
 Firmware Upgrade
 Linux 2.4.32 ported to ADM5120
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

ericandor

12 Posts

Posted - 03/11/2006 :  22:30:16  Show Profile  Reply with Quote
quote:
Originally posted by TheKr1S

I downloaded AMiLDA-0.3.55.tar.bz2 twice, but I can't extractit. It seems to be incomplete. It's onle 25 MB while 3.33 is 35 MB. Please fix it. I want to use USB.



It looks like it wasn't uploaded completely.


[ericandor@home amilda]$ bzip2 -t AMiLDA-0.3.55.tar.bz2
bzip2: AMiLDA-0.3.55.tar.bz2: file ends unexpectedly

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.


Best wishes

Ericandor :)
Go to Top of Page

TheKr1S

Netherlands
24 Posts

Posted - 03/13/2006 :  23:19:33  Show Profile  Visit TheKr1S's Homepage  Reply with Quote
I have build a 2.4.31 kernel including USB. impatient as I am, I tried to merge the USB driver (usb-shci.c and some makefile/config stuff) to 2.4.32 but I can't get it running. Then tried it the other way around. Tried to make Amilda work on 2.4.31, and it works after some minor mods, except for the reset button. So now I have amilda runnig with USB. At last.


RMW
Go to Top of Page

margro

Netherlands
13 Posts

Posted - 03/14/2006 :  20:47:30  Show Profile  Reply with Quote
quote:
Originally posted by sergioag

quote:
Originally posted by vlad

please use driver from http://midge.vlad.org.ua/kamikaze/src/kamikaze-200602050443.tar.bz2


Thanks, that surely solves the problem.


Well, it didn't solve the problems for my Kamikaze 2.4.32 with USB on my Sweex. I still got those DMA and time-out messages. So, I've done some debugging and comparisons between the original 2.4.18 usb implementation and the 2.4.32 version. I have now a working driver that recognizes and works for my printer, usb card reader, camera and usb harddrive.

For the interested people that have problems with Vlads latest version in Kamikaze, try this one:
http://www.scintilla.utwente.nl/~marcelg/adm5120/usb-2.4.32/

One small remark: I've changed the "am5120" directory names in the patches to "adm5120", equal to the Amilda patches.

Grt,
Marcel



2x Modded Sweex LB000021 with USB and LCD, Linksys WRT54G
Go to Top of Page

TiTaN_pi8

30 Posts

Posted - 03/15/2006 :  17:03:05  Show Profile  Reply with Quote
Nice work!!

With this patch, is it possible to boot from a root filesystem on a USB Mass Storage Device?


I would like to ask how you have learned how to write a USB driver? I can code applications in Windows, so I know how to write applications. But I don't really understand how to begin developing a driver...

All sorts of questions arise in my head when thinking about this, for example: You would have to create procedures with specific names, right? Because (some part of) the linux kernel would have to call these procedures... Am I right?

Maybe you have links to some good tutorials about this on the net?

I hope I'm not too off-topic with this post..
Go to Top of Page

margro

Netherlands
13 Posts

Posted - 03/15/2006 :  21:39:05  Show Profile  Reply with Quote
quote:
Originally posted by TiTaN_pi8

Nice work!!

With this patch, is it possible to boot from a root filesystem on a USB Mass Storage Device?


It is not yet a complete patch, only a replacement version for a 2.4.32 kernel with an existing ADM5120 USB patch applied (e.g. Amilda's)
quote:

I would like to ask how you have learned how to write a USB driver? I can code applications in Windows, so I know how to write applications. But I don't really understand how to begin developing a driver...

Maybe you have links to some good tutorials about this on the net?


If you want to learn about writing Linux drivers (two good books):
Linux 2.2/2.4 kernel: http://www.xml.com/ldd/chapter/book/
Linux 2.6 kernel: http://lwn.net/Kernel/LDD3/

For me, the original usb-ohci driver helped me a lot as example...

I did not write this USB driver myself. The original version is from the Edimax GPL sources from their PS-3205U printer server, but it is for a 2.4.18 kernel and not complete (no ISOCHRONOUS support, required for audio). Other people (see Midge forum) already ported this driver to a 2.4.32 kernel and added additional code to fix the ISO support, but the main problem for me was that their driver did not work for my card reader and my printer. I've added a lot of debug lines to both their version and the original 2.4.18 version to see where the differences are with this (for me) working version as the result. It has still no ISO support, but I am working on that part.





2x Modded Sweex LB000021 with USB and LCD, Linksys WRT54G
Go to Top of Page

sergioag

Peru
51 Posts

Posted - 03/17/2006 :  00:27:20  Show Profile  Visit sergioag's Homepage  Reply with Quote
quote:
Originally posted by margro

quote:
Originally posted by TiTaN_pi8

Nice work!!

With this patch, is it possible to boot from a root filesystem on a USB Mass Storage Device?


It is not yet a complete patch, only a replacement version for a 2.4.32 kernel with an existing ADM5120 USB patch applied (e.g. Amilda's)
quote:

I would like to ask how you have learned how to write a USB driver? I can code applications in Windows, so I know how to write applications. But I don't really understand how to begin developing a driver...

Maybe you have links to some good tutorials about this on the net?


If you want to learn about writing Linux drivers (two good books):
Linux 2.2/2.4 kernel: http://www.xml.com/ldd/chapter/book/
Linux 2.6 kernel: http://lwn.net/Kernel/LDD3/

For me, the original usb-ohci driver helped me a lot as example...

I did not write this USB driver myself. The original version is from the Edimax GPL sources from their PS-3205U printer server, but it is for a 2.4.18 kernel and not complete (no ISOCHRONOUS support, required for audio). Other people (see Midge forum) already ported this driver to a 2.4.32 kernel and added additional code to fix the ISO support, but the main problem for me was that their driver did not work for my card reader and my printer. I've added a lot of debug lines to both their version and the original 2.4.18 version to see where the differences are with this (for me) working version as the result. It has still no ISO support, but I am working on that part.





2x Modded Sweex LB000021 with USB and LCD, Linksys WRT54G




Hi

Very good to know that there's finally a somewhat working usb driver. I'll include it in the next release of AMiLDA. 0.3.55 is already out, so check it out to see if it works. Anyway i'll merge the patch to the next version.

Sergio


Sergio Aguayo
http://www.amilda.org
Go to Top of Page

BnY

20 Posts

Posted - 04/11/2006 :  13:18:44  Show Profile  Reply with Quote
margro: Is this patch for a kamikaze distribution or AMiLDA?

NOTE: Haven't use 'patch' before :(

When i apply it like this ( from AMiLDA root dir ):

patch -p0 < 002*

I get some reject messages:

patching file linux-2.4.32/drivers/usb/Makefile
Hunk #1 succeeded at 74 with fuzz 1.
patching file linux-2.4.32/drivers/usb/host/Config.in
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file linux-2.4.32/drivers/usb/host/Config.in.rej
patching file linux-2.4.32/drivers/usb/host/Makefile
Hunk #1 FAILED at 9.
1 out of 1 hunk FAILED -- saving rejects to file linux-2.4.32/drivers/usb/host/Makefile.rej
patching file linux-2.4.32/drivers/usb/host/usb-shci.c
patching file linux-2.4.32/drivers/usb/host/usb-shci.h


I assume the text the patch program was looking for was not found litterly. So I thought maybe this patch is generated with kamikaze? I'm using AMiLDA. I could ofcourse try to manualy apply the changes necessary to use this shci driver instead of the current one. But I don't realy know how to appropriately change the configuration so it will be compiled correctly.
Go to Top of Page

sergioag

Peru
51 Posts

Posted - 04/11/2006 :  18:16:40  Show Profile  Visit sergioag's Homepage  Reply with Quote
Hi

Unluckily, i cannot confirm by myself that USB is working. With my Imation 128MB flash drive it doesn't work. I'll try to work on it. However, no dates can be given.

Regards


Sergio Aguayo
http://www.amilda.org
Go to Top of Page

Sunspot

United Kingdom
51 Posts

Posted - 04/13/2006 :  10:56:52  Show Profile  Visit Sunspot's Homepage  Reply with Quote
TheKr1S - have you uploaded the working USB firmware anywhere? - I would like to test it.
Could you easily rewrite it so that the web html files and cgi-bin or equivalent are on the USB stick and able to be modified via a Linux PC without changing the router firmware?
I want to send data to the serial port by such external mods but am not yet into embedded Linux.
Go to Top of Page

dave321

7 Posts

Posted - 04/14/2006 :  17:40:54  Show Profile  Reply with Quote

At http://www.scintilla.utwente.nl/~marcelg/adm5120/usb-2.4.32/
you'll find the usb-driver files which you can just drop into
AMilDA (linux-2.4.32-adm/drivers/usb/host), you have to rename
the files from usb-shci.h/.c to usb-ahci.h/.c and change one
line in the usb-ahci.c (to include usb-ahci.h i.s.o. usb-shci.h)

Unfortunately even the latest version does not work for me yet
although it looks very promising (usb sticks/drives are recognized
but reading from them doesn't seem to work for me).
Go to Top of Page

TiTaN_pi8

30 Posts

Posted - 04/16/2006 :  10:42:57  Show Profile  Reply with Quote
After compiling a 2.4.32 (AMiLDA) kernel with the files linked to above, I get these error messages when attaching a USB stick to the router:

hub.c: new USB device adm5120-hcd-1, assigned address 2
scsi0 : SCSI emulation for USB Mass Storage devices
usb_control/bulk_msg: timeout
td_fill_ahci: Error ~~~~~~!!
td_fill_ahci: Error ~~~~~~!!
usb_control/bulk_msg: timeout
td_fill_ahci: Error ~~~~~~!!
td_fill_ahci: Error ~~~~~~!!
usb_control/bulk_msg: timeout
scsi: device set offline - not ready or command retry failed after bus reset: host 0 channel 0 id 0 lun 0
hub.c: already running port 1 disabled by hub (EMI?), re-enabling...
usb.c: USB disconnect on device adm5120-hcd-1 address 2
hub.c: Cannot enable port 1 of hub 1, disabling port.
hub.c: Maybe the USB cable is bad?


Seems the code isn't working much better than the code supplied with AMiLDA by default. Or is this a problem with my router?
Go to Top of Page

dave321

7 Posts

Posted - 04/17/2006 :  15:05:21  Show Profile  Reply with Quote
That's more or less what I'm seeing.
But with this driver (or the v1.2 older) version for some
people it seems to work using the Midge version
See: http://midge.vlad.org.ua/forum/viewtopic.php?t=229

So maybe I'm going to try that (although there shouldn't be
any difference).
Go to Top of Page

TheKr1S

Netherlands
24 Posts

Posted - 04/21/2006 :  15:46:48  Show Profile  Visit TheKr1S's Homepage  Reply with Quote
quote:
Originally posted by Sunspot

TheKr1S - have you uploaded the working USB firmware anywhere? - I would like to test it.
Could you easily rewrite it so that the web html files and cgi-bin or equivalent are on the USB stick and able to be modified via a Linux PC without changing the router firmware?
I want to send data to the serial port by such external mods but am not yet into embedded Linux.



I did not put it somehere, but I can create an image that runs a webs server on port 80 serving files from USB /webs and a https server on port 81 serving files from USB /https. The configuration interface is on port 8080. Let me know if you still have interest. Then I will put it on my edimax server :-) : http://wasse632.speed.planet.nl


RMW

Edited by - TheKr1S on 04/21/2006 19:38:36
Go to Top of Page

TiTaN_pi8

30 Posts

Posted - 04/22/2006 :  19:06:54  Show Profile  Reply with Quote
I think a lot of people are interested in this, if you are talking about a 2.4.31 kernel with working USB support !
Go to Top of Page

TheKr1S

Netherlands
24 Posts

Posted - 04/23/2006 :  12:10:23  Show Profile  Visit TheKr1S's Homepage  Reply with Quote
This is indeed kernel 2.4.31 with USB support (no isochronous).

I've put the image on the router for download:
http://wasse632.speed.planet.nl:8081/RoRouter-6104K-0.3.34-vA.zip

This is a modified Amilda 3.33 with at least the following mods:
- USB support
- Merged ethernet driver of amilda's 2.4.32 kernel
- allow access to ports 80 and 81 from WAN when firewall enabled
- moved config interface to port 8080
- added webs server on port 80, hosting files from USB: /webs. default file: index.php
- added busybox httpd server on port 81, hosting files from USB: /https. default file: index.html
- experimented some with the leds.

I added the httpd because I could not use java applets with webs.

The USB storage must have ext2 fs

RMW

Edited by - TheKr1S on 04/23/2006 21:24:21
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
NoRocketScience Forum © NoRocketScience Go To Top Of Page
Snitz Forums 2000